Using "WildFly Swarm Project Generator" tool via website, it generates a demo project to download, but when local Maven executes the steps of building and execution the following error happens:
mvn clean wildfly-swarm:run
Pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>demo</artifactId>
<name>WildFly Swarm Example</name>
<version>1.0.0-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
<version.wildfly.swarm>2018.5.0</version.wildfly.swarm>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<failOnMissingWebXml>false</failOnMissingWebXml>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>bom-all</artifactId>
<version>${version.wildfly.swarm}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<finalName>demo</finalName>
<plugins>
<plugin>
<groupId>org.wildfly.swarm</groupId>
<artifactId>wildfly-swarm-plugin</artifactId>
<version>${version.wildfly.swarm}</version>
<executions>
<execution>
<goals>
<goal>package</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<!-- Java EE 7 dependency -->
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
<!-- WildFly Swarm Fractions -->
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>jaxrs</artifactId>
</dependency>
</dependencies>
</project>
Log:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building WildFly Swarm Example 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # demo ---
[INFO] Deleting /home/cbelleza/Downloads/demo/target
[INFO]
[INFO] >>> wildfly-swarm-plugin:2018.5.0:run (default-cli) > package # demo >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # demo ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/cbelleza/Downloads/demo/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # demo ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /home/cbelleza/Downloads/demo/target/classes
[WARNING] error reading /home/cbelleza/.m2/repository/javax/javaee-api/7.0/javaee-api-7.0.jar; invalid LOC header (bad signature)
[WARNING] error reading /home/cbelleza/.m2/repository/org/wildfly/swarm/bootstrap/2018.5.0/bootstrap-2018.5.0.jar; invalid LOC header (bad signature)
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # demo ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/cbelleza/Downloads/demo/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # demo ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # demo ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-war-plugin:2.2:war (default-war) # demo ---
[INFO] Packaging webapp
[INFO] Assembling webapp [demo] in [/home/cbelleza/Downloads/demo/target/demo]
[INFO] Processing war project
[INFO] Copying webapp resources [/home/cbelleza/Downloads/demo/src/main/webapp]
[INFO] Webapp assembled in [78 msecs]
[INFO] Building war: /home/cbelleza/Downloads/demo/target/demo.war
[INFO]
[INFO] --- wildfly-swarm-plugin:2018.5.0:package (default) # demo ---
[WARNING] Error injecting: org.wildfly.swarm.plugin.maven.PackageMojo
java.lang.NoClassDefFoundError: org/wildfly/swarm/bootstrap/util/MavenArtifactDescriptor
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:401)
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.getDeclaredMethods(Class.java:1975)
at com.google.inject.spi.InjectionPoint.getInjectionPoints(InjectionPoint.java:688)
at com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:380)
at com.google.inject.internal.ConstructorBindingImpl.getInternalDependencies(ConstructorBindingImpl.java:164)
at com.google.inject.internal.InjectorImpl.getInternalDependencies(InjectorImpl.java:613)
at com.google.inject.internal.InjectorImpl.cleanup(InjectorImpl.java:569)
at com.google.inject.internal.InjectorImpl.initializeJitBinding(InjectorImpl.java:555)
at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:884)
at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:805)
at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:282)
at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:214)
at com.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:1006)
at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1038)
at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1001)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1051)
at org.eclipse.sisu.space.AbstractDeferredClass.get(AbstractDeferredClass.java:48)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:53)
at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:65)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115)
at org.eclipse.sisu.bean.BeanScheduler$Activator.onProvision(BeanScheduler.java:176)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:126)
at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:63)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
at org.eclipse.sisu.inject.Guice4$1.get(Guice4.java:162)
at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:81)
at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:51)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:263)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:255)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:517)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:121)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.MojoExecutor.executeForkedExecutions(MojoExecutor.java:352)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:197)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: java.lang.ClassNotFoundException: org.wildfly.swarm.bootstrap.util.MavenArtifactDescriptor
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
... 76 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.262 s
[INFO] Finished at: 2018-05-20T13:04:45-03:00
[INFO] Final Memory: 28M/250M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.wildfly.swarm:wildfly-swarm-plugin:2018.5.0:package (default) on project demo: Execution default of goal org.wildfly.swarm:wildfly-swarm-plugin:2018.5.0:package failed: A required class was missing while executing org.wildfly.swarm:wildfly-swarm-plugin:2018.5.0:package: org/wildfly/swarm/bootstrap/util/MavenArtifactDescriptor
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.wildfly.swarm:wildfly-swarm-plugin:2018.5.0
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/home/cbelleza/.m2/repository/org/wildfly/swarm/wildfly-swarm-plugin/2018.5.0/wildfly-swarm-plugin-2018.5.0.jar
[ERROR] urls[1] = file:/home/cbelleza/.m2/repository/org/wildfly/swarm/fraction-metadata/2018.5.0/fraction-metadata-2018.5.0.jar
[ERROR] urls[2] = file:/home/cbelleza/.m2/repository/org/wildfly/swarm/meta-spi/2018.5.0/meta-spi-2018.5.0.jar
[ERROR] urls[3] = file:/home/cbelleza/.m2/repository/org/jboss/shrinkwrap/descriptors/shrinkwrap-descriptors-impl-javaee/2.0.0/shrinkwrap-descriptors-impl-javaee-2.0.0.jar
[ERROR] urls[4] = file:/home/cbelleza/.m2/repository/org/jboss/shrinkwrap/descriptors/shrinkwrap-descriptors-impl-base/2.0.0/shrinkwrap-descriptors-impl-base-2.0.0.jar
[ERROR] urls[5] = file:/home/cbelleza/.m2/repository/org/jboss/shrinkwrap/descriptors/shrinkwrap-descriptors-spi/2.0.0/shrinkwrap-descriptors-spi-2.0.0.jar
[ERROR] urls[6] = file:/home/cbelleza/.m2/repository/org/ow2/asm/asm/6.0/asm-6.0.jar
[ERROR] urls[7] = file:/home/cbelleza/.m2/repository/com/eclipsesource/minimal-json/minimal-json/0.9.4/minimal-json-0.9.4.jar
[ERROR] urls[8] = file:/home/cbelleza/.m2/repository/org/wildfly/swarm/tools/2018.5.0/tools-2018.5.0.jar
[ERROR] urls[9] = file:/home/cbelleza/.m2/repository/org/wildfly/swarm/bootstrap/2018.5.0/bootstrap-2018.5.0.jar
[ERROR] urls[10] = file:/home/cbelleza/.m2/repository/org/jboss/modules/jboss-modules/1.6.1.Final/jboss-modules-1.6.1.Final.jar
[ERROR] urls[11] = file:/home/cbelleza/.m2/repository/org/yaml/snakeyaml/1.17/snakeyaml-1.17.jar
[ERROR] urls[12] = file:/home/cbelleza/.m2/repository/org/jboss/shrinkwrap/shrinkwrap-api/1.2.6/shrinkwrap-api-1.2.6.jar
[ERROR] urls[13] = file:/home/cbelleza/.m2/repository/org/jboss/shrinkwrap/shrinkwrap-spi/1.2.6/shrinkwrap-spi-1.2.6.jar
[ERROR] urls[14] = file:/home/cbelleza/.m2/repository/org/jboss/shrinkwrap/shrinkwrap-impl-base/1.2.6/shrinkwrap-impl-base-1.2.6.jar
[ERROR] urls[15] = file:/home/cbelleza/.m2/repository/org/jboss/shrinkwrap/descriptors/shrinkwrap-descriptors-api-jboss/2.0.0/shrinkwrap-descriptors-api-jboss-2.0.0.jar
[ERROR] urls[16] = file:/home/cbelleza/.m2/repository/org/jboss/shrinkwrap/descriptors/shrinkwrap-descriptors-api-javaee/2.0.0/shrinkwrap-descriptors-api-javaee-2.0.0.jar
[ERROR] urls[17] = file:/home/cbelleza/.m2/repository/org/jboss/shrinkwrap/descriptors/shrinkwrap-descriptors-api-base/2.0.0/shrinkwrap-descriptors-api-base-2.0.0.jar
[ERROR] urls[18] = file:/home/cbelleza/.m2/repository/org/jboss/shrinkwrap/descriptors/shrinkwrap-descriptors-impl-jboss/2.0.0/shrinkwrap-descriptors-impl-jboss-2.0.0.jar
[ERROR] urls[19] = file:/home/cbelleza/.m2/repository/net/lingala/zip4j/zip4j/1.3.2/zip4j-1.3.2.jar
[ERROR] urls[20] = file:/home/cbelleza/.m2/repository/org/wildfly/swarm/spi/2018.5.0/spi-2018.5.0.jar
[ERROR] urls[21] = file:/home/cbelleza/.m2/repository/org/jboss/jandex/2.0.3.Final/jandex-2.0.3.Final.jar
[ERROR] urls[22] = file:/home/cbelleza/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.20/plexus-utils-3.0.20.jar
[ERROR] urls[23] = file:/home/cbelleza/.m2/repository/org/eclipse/aether/aether-util/1.0.0.v20140518/aether-util-1.0.0.v20140518.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------: org.wildfly.swarm.bootstrap.util.MavenArtifactDescriptor
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
Is there any step missing? Or even a configuration to be applied in Maven.
In your error logs there is that message, invalid LOC header (bad signature).
Delete that jar so maven will download it again; see also Deploying Maven project throws java.util.zip.ZipException: invalid LOC header (bad signature)
Related
I am trying to do a mvn clean package to my Maven Springboot Project but I see the following message. What can be the reason? I already searched everything on the internet; it is a common situation but nobody has a definitive solution which can be useful for me.
My maven version is 3.6.3; I tried to do this from command line; my o.s. is Linux Mint Cinnamnon latest; my java is OpendJDK 11.0.5; maven compiler plugin 3.8.0.
[INFO] ------------------------------------------------------------------------
---------------------------------------------------
constituent[0]: file:/home/user/.sdkman/candidates/maven/current/conf/logging/
constituent[1]: file:/home/user/.sdkman/candidates/maven/current/lib/maven-model-builder-3.6.3.jar
constituent[2]: file:/home/user/.sdkman/candidates/maven/current/lib/commons-io-2.5.jar
constituent[3]: file:/home/user/.sdkman/candidates/maven/current/lib/maven-model-3.6.3.jar
constituent[4]: file:/home/user/.sdkman/candidates/maven/current/lib/maven-settings-3.6.3.jar
constituent[5]: file:/home/user/.sdkman/candidates/maven/current/lib/jcl-over-slf4j-1.7.29.jar
constituent[6]: file:/home/user/.sdkman/candidates/maven/current/lib/cdi-api-1.0.jar
constituent[7]: file:/home/user/.sdkman/candidates/maven/current/lib/wagon-http-3.3.4-shaded.jar
constituent[8]: file:/home/user/.sdkman/candidates/maven/current/lib/maven-embedder-3.6.3.jar
constituent[9]: file:/home/user/.sdkman/candidates/maven/current/lib/maven-resolver-api-1.4.1.jar
constituent[10]: file:/home/user/.sdkman/candidates/maven/current/lib/wagon-provider-api-3.3.4.jar
constituent[11]: file:/home/user/.sdkman/candidates/maven/current/lib/plexus-interpolation-1.25.jar
constituent[12]: file:/home/user/.sdkman/candidates/maven/current/lib/guice-4.2.1-no_aop.jar
constituent[13]: file:/home/user/.sdkman/candidates/maven/current/lib/maven-slf4j-provider-3.6.3.jar
constituent[14]: file:/home/user/.sdkman/candidates/maven/current/lib/maven-resolver-connector-basic-1.4.1.jar
constituent[15]: file:/home/user/.sdkman/candidates/maven/current/lib/org.eclipse.sisu.plexus-0.3.4.jar
constituent[16]: file:/home/user/.sdkman/candidates/maven/current/lib/plexus-cipher-1.7.jar
constituent[17]: file:/home/user/.sdkman/candidates/maven/current/lib/maven-shared-utils-3.2.1.jar
constituent[18]: file:/home/user/.sdkman/candidates/maven/current/lib/maven-artifact-3.6.3.jar
constituent[19]: file:/home/user/.sdkman/candidates/maven/current/lib/plexus-sec-dispatcher-1.4.jar
constituent[20]: file:/home/user/.sdkman/candidates/maven/current/lib/maven-resolver-impl-1.4.1.jar
constituent[21]: file:/home/user/.sdkman/candidates/maven/current/lib/org.eclipse.sisu.inject-0.3.4.jar
constituent[22]: file:/home/user/.sdkman/candidates/maven/current/lib/slf4j-api-1.7.29.jar
constituent[23]: file:/home/user/.sdkman/candidates/maven/current/lib/guava-25.1-android.jar
constituent[24]: file:/home/user/.sdkman/candidates/maven/current/lib/plexus-component-annotations-2.1.0.jar
constituent[25]: file:/home/user/.sdkman/candidates/maven/current/lib/maven-core-3.6.3.jar
constituent[26]: file:/home/user/.sdkman/candidates/maven/current/lib/maven-plugin-api-3.6.3.jar
constituent[27]: file:/home/user/.sdkman/candidates/maven/current/lib/jsr250-api-1.0.jar
constituent[28]: file:/home/user/.sdkman/candidates/maven/current/lib/plexus-utils-3.2.1.jar
constituent[29]: file:/home/user/.sdkman/candidates/maven/current/lib/maven-repository-metadata-3.6.3.jar
constituent[30]: file:/home/user/.sdkman/candidates/maven/current/lib/jsoup-1.12.1.jar
constituent[31]: file:/home/user/.sdkman/candidates/maven/current/lib/commons-lang3-3.8.1.jar
constituent[32]: file:/home/user/.sdkman/candidates/maven/current/lib/maven-compat-3.6.3.jar
constituent[33]: file:/home/user/.sdkman/candidates/maven/current/lib/commons-cli-1.4.jar
constituent[34]: file:/home/user/.sdkman/candidates/maven/current/lib/wagon-file-3.3.4.jar
constituent[35]: file:/home/user/.sdkman/candidates/maven/current/lib/maven-resolver-transport-wagon-1.4.1.jar
constituent[36]: file:/home/user/.sdkman/candidates/maven/current/lib/maven-settings-builder-3.6.3.jar
constituent[37]: file:/home/user/.sdkman/candidates/maven/current/lib/maven-resolver-util-1.4.1.jar
constituent[38]: file:/home/user/.sdkman/candidates/maven/current/lib/maven-resolver-spi-1.4.1.jar
constituent[39]: file:/home/user/.sdkman/candidates/maven/current/lib/javax.inject-1.jar
constituent[40]: file:/home/user/.sdkman/candidates/maven/current/lib/jansi-1.17.1.jar
constituent[41]: file:/home/user/.sdkman/candidates/maven/current/lib/maven-builder-support-3.6.3.jar
constituent[42]: file:/home/user/.sdkman/candidates/maven/current/lib/maven-resolver-provider-3.6.3.jar
---------------------------------------------------
Exception in thread "main" java.lang.AssertionError
at jdk.compiler/com.sun.tools.javac.util.Assert.error(Assert.java:155)
at jdk.compiler/com.sun.tools.javac.util.Assert.check(Assert.java:46)
at jdk.compiler/com.sun.tools.javac.comp.Modules.enter(Modules.java:247)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.readSourceFile(JavaCompiler.java:837)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$ImplicitCompleter.complete(JavacProcessingEnvironment.java:1529)
at jdk.compiler/com.sun.tools.javac.code.Symbol.complete(Symbol.java:642)
at jdk.compiler/com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:1326)
at jdk.compiler/com.sun.tools.javac.code.Type$ClassType.complete(Type.java:1140)
at jdk.compiler/com.sun.tools.javac.code.Type$ClassType.getTypeArguments(Type.java:1066)
at jdk.compiler/com.sun.tools.javac.code.Printer.visitClassType(Printer.java:237)
at jdk.compiler/com.sun.tools.javac.code.Printer.visitClassType(Printer.java:52)
at jdk.compiler/com.sun.tools.javac.code.Type$ClassType.accept(Type.java:993)
at jdk.compiler/com.sun.tools.javac.code.Printer.visit(Printer.java:136)
at jdk.compiler/com.sun.tools.javac.util.AbstractDiagnosticFormatter.formatArgument(AbstractDiagnosticFormatter.java:199)
at jdk.compiler/com.sun.tools.javac.util.AbstractDiagnosticFormatter.formatArguments(AbstractDiagnosticFormatter.java:167)
at jdk.compiler/com.sun.tools.javac.util.BasicDiagnosticFormatter.formatMessage(BasicDiagnosticFormatter.java:111)
at jdk.compiler/com.sun.tools.javac.util.BasicDiagnosticFormatter.formatMessage(BasicDiagnosticFormatter.java:67)
at jdk.compiler/com.sun.tools.javac.util.AbstractDiagnosticFormatter.formatArgument(AbstractDiagnosticFormatter.java:185)
at jdk.compiler/com.sun.tools.javac.util.AbstractDiagnosticFormatter.formatArguments(AbstractDiagnosticFormatter.java:167)
at jdk.compiler/com.sun.tools.javac.util.BasicDiagnosticFormatter.formatMessage(BasicDiagnosticFormatter.java:111)
at jdk.compiler/com.sun.tools.javac.util.BasicDiagnosticFormatter.formatMessage(BasicDiagnosticFormatter.java:67)
at jdk.compiler/com.sun.tools.javac.util.JCDiagnostic.getMessage(JCDiagnostic.java:788)
at jdk.compiler/com.sun.tools.javac.api.ClientCodeWrapper$DiagnosticSourceUnwrapper.getMessage(ClientCodeWrapper.java:799)
at org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess(JavaxToolsCompiler.java:131)
at org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile(JavacCompiler.java:174)
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:1129)
at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:188)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
And this is the previous part of the output
user#User-VirtualBox-Mint:~/Desktop/mycompany/myapp$ mvn clean package -U -Dwithout-frontend
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] myapp [pom]
[INFO] myapp-server [jar]
[INFO]
[INFO] -----------------------< com.mycompany:myapp >------------------------
[INFO] Building myapp 1.0.0-SNAPSHOT [1/2]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) # myapp ---
[INFO]
[INFO] --------------------< com.mycompany:myapp-server >--------------------
[INFO] Building myapp-server 1.0.0-SNAPSHOT [2/2]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) # myapp-server ---
[INFO] Deleting /home/user/Desktop/mycompany/myapp/server/target
[INFO]
[INFO] --- git-commit-id-plugin:2.2.6:revision (default) # myapp-server ---
[INFO]
[INFO] --- spring-boot-maven-plugin:2.1.7.RELEASE:build-info (default) # myapp-server ---
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) # myapp-server ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) # myapp-server ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 17 source files to /home/user/Desktop/mycompany/myapp/server/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for myapp 1.0.0-SNAPSHOT:
[INFO]
[INFO] myapp ............................................. SUCCESS [ 0.252 s]
[INFO] myapp-server ...................................... FAILURE [ 4.913 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.494 s
[INFO] Finished at: 2019-12-12T14:48:34+01:00
[INFO] ------------------------------------------------------------------------
---------------------------------------------------
If I try to add javaccompilerforce use in my main pom.xml such that this part is as following
<version>3.8.0</version>
<configuration>
<forceJavacCompilerUse>true</forceJavacCompilerUse>
<compilerArgs>
<arg>-parameters</arg>
</compilerArgs>
</configuration>
</plugin>
I see this time this new error
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project myapp-server: Compilation failure: Compilation failure:
[ERROR] /home/user/Desktop/mycompany/myapp/server/src/main/java/com/mycompany/myapp/representation/rest/RestControllerAdvice.java:[8,38] error: package com.mycompany.myapp.exception does not exist
[ERROR] /home/user/Desktop/mycompany/myapp/server/src/main/java/com/mycompany/myapp/representation/rest/RestControllerAdvice.java:[25,84] error: cannot find symbol
[ERROR] symbol: class InvalidPropertyValueException
[ERROR] location: class RestControllerAdvice
[ERROR] /home/user/Desktop/mycompany/myapp/server/src/main/java/com/mycompany/myapp/representation/rest/RestControllerAdvice.java:[25,24] error: cannot find symbol
[ERROR] symbol: class InvalidPropertyValueException
[ERROR] location: class RestControllerAdvice
[ERROR] /home/user/Desktop/mycompany/myapp/server/src/main/java/com/mycompany/myapp/representation/rest/RestControllerAdvice.java:[24,20] error: cannot find symbol
[ERROR] symbol: class InvalidPropertyValueException
[ERROR] location: class RestControllerAdvice
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :myapp-server
Really, is the reason of the problem the absence of one folder or package? Or this second row is simply related to the javaccompilerforce option itself and not with the core of the app? It seems me too strange or banal. And, in add, the exactly same app works perfectly in another computer.
Edit
Thanks to all for your time, I think, the problem is the absence of some components. I tried to add those and now the error message is changed. At this point, I am a little bit in trouble because I see this maven output:
[ERROR] /home/user/Desktop/mycompany/myapp/server/src/main/java/com/mycompany/myapp/representation/rest/RestControllerAdvice.java:[8,38] error: cannot find symbol
[ERROR] symbol: class InvalidPropertyValueException
[ERROR] location: package com.mycompany.myapp.exception
So, I searched the 8 row in that file and I found this one
import org.springframework.web.bind.annotation.ExceptionHandler;
But, the line which is referred to InvalidPropertyValueException is 2 rows before:
import com.mycompany.myapp.exception.InvalidPropertyValueException;
And, the strange thing, in the package com.mycompanny.myapp.exception I didn't found any class or file named InvalidPropertyValueException. But Eclipse accept it and present me in the option list. And this class don't generate any error or red line.
you can try this command with skip your unit test cases
"mvn clean install -DskipTests=true"
Description : Same POM works locally with same suit but when i am swtiching to Jenkins execution, it shows the errors. Can anyone please help me to understand why this may happening?
Error Message recevied while running job from jenkins :
Started by user unknown or anonymous
[EnvInject] - Loading node environment variables.
Building in workspace /var/lib/jenkins/workspace/WanderlyAutomationSuite
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url git#github.com:orionhcs/automation-tests.git # timeout=10
Fetching upstream changes from git#github.com:orionhcs/automation-tests.git
> git --version # timeout=10
using GIT_SSH to set credentials
> git fetch --tags --progress git#github.com:orionhcs/automation-tests.git +refs/heads/*:refs/remotes/origin/*
> git rev-parse refs/remotes/origin/master^{commit} # timeout=10
> git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision 53f5d799bb2578706e48d80e1f428ca5a324e96c (refs/remotes/origin/master)
> git config core.sparsecheckout # timeout=10
> git checkout -f 53f5d799bb2578706e48d80e1f428ca5a324e96c
Commit message: "updated the code"
> git rev-list --no-walk 53f5d799bb2578706e48d80e1f428ca5a324e96c # timeout=10
[WanderlyAutomationSuite] $ /bin/sh -xe /tmp/jenkins8894762653318384960.sh
+ export M2_HOME=/srv/maven/
Parsing POMs
Established TCP socket on 37493
[WanderlyAutomationSuite] $ /usr/lib/jvm/java-8-openjdk-amd64//bin/java -cp /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven35-agent-1.12.jar:/var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/Maven_3.5.4/boot/plexus-classworlds-2.5.2.jar:/var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/Maven_3.5.4/conf/logging jenkins.maven3.agent.Maven35Main /var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/Maven_3.5.4 /var/cache/jenkins/war/WEB-INF/lib/remoting-3.19.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven35-interceptor-1.12.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.12.jar 37493
<===[JENKINS REMOTING CAPACITY]===>channel started
Executing Maven: -B -f /var/lib/jenkins/workspace/WanderlyAutomationSuite/pom.xml compile test
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------< Wanderly:WanderlyScenarios >---------------------
[INFO] Building WanderlyScenarios 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # WanderlyScenarios ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /var/lib/jenkins/workspace/WanderlyAutomationSuite/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # WanderlyScenarios ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # WanderlyScenarios ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /var/lib/jenkins/workspace/WanderlyAutomationSuite/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # WanderlyScenarios ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # WanderlyScenarios ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /var/lib/jenkins/workspace/WanderlyAutomationSuite/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # WanderlyScenarios ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) # WanderlyScenarios ---
[INFO] No tests to run.
[INFO] Surefire report directory: /var/lib/jenkins/workspace/WanderlyAutomationSuite/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running TestSuite
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[JENKINS] Recording test results
hudson.AbortException: Test reports were found but none of them are new. Did leafNodes run?
For example, /var/lib/jenkins/workspace/WanderlyAutomationSuite/target/surefire-reports/TEST-TestSuite.xml is 37 min old
at hudson.tasks.junit.TestResult.parse(TestResult.java:266)
at hudson.tasks.junit.TestResult.parse(TestResult.java:231)
at hudson.maven.reporters.SurefireArchiver.postExecute(SurefireArchiver.java:148)
at hudson.maven.Maven3Builder$MavenExecutionListener.recordMojoEnded(Maven3Builder.java:629)
at hudson.maven.Maven3Builder$MavenExecutionListener.mojoFailed(Maven3Builder.java:662)
at hudson.maven.Maven3Builder$JenkinsEventSpy.onEvent(Maven3Builder.java:306)
at org.apache.maven.eventspy.internal.EventSpyDispatcher.onEvent(EventSpyDispatcher.java:104)
at org.apache.maven.eventspy.internal.EventSpyExecutionListener.mojoFailed(EventSpyExecutionListener.java:138)
at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:90)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:220)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
at org.jvnet.hudson.maven3.launcher.Maven35Launcher.main(Maven35Launcher.java:130)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at jenkins.maven3.agent.Maven35Main.launch(Maven35Main.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:139)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:70)
at hudson.remoting.UserRequest.perform(UserRequest.java:212)
at hudson.remoting.UserRequest.perform(UserRequest.java:54)
at hudson.remoting.Request$2.run(Request.java:369)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.440 s
[INFO] Finished at: 2019-03-06T12:25:02-08:00
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project WanderlyScenarios: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test failed: There was an error in the forked process
[ERROR] org.testng.TestNGException:
[ERROR] Cannot find class in classpath: com.scenarios.Wanderly_ApplyJob_Scenario
[ERROR] at org.testng.xml.XmlClass.loadClass(XmlClass.java:81)
[ERROR] at org.testng.xml.XmlClass.init(XmlClass.java:73)
[ERROR] at org.testng.xml.XmlClass.<init>(XmlClass.java:59)
[ERROR] at org.testng.xml.TestNGContentHandler.startElement(TestNGContentHandler.java:546)
[ERROR] at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
[ERROR] at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
[ERROR] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1339)
[ERROR] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2784)
[ERROR] at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
[ERROR] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
[ERROR] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842)
[ERROR] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
[ERROR] at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
[ERROR] at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
[ERROR] at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
[ERROR] at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:327)
[ERROR] at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
[ERROR] at org.testng.xml.XMLParser.parse(XMLParser.java:38)
[ERROR] at org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:16)
[ERROR] at org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:9)
[ERROR] at org.testng.xml.Parser.parse(Parser.java:172)
[ERROR] at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:300)
[ERROR] at org.testng.TestNG.run(TestNG.java:1021)
[ERROR] at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:295)
[ERROR] at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:84)
[ERROR] at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:90)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
[JENKINS] Archiving /var/lib/jenkins/workspace/WanderlyAutomationSuite/pom.xml to Wanderly/WanderlyScenarios/0.0.1-SNAPSHOT/WanderlyScenarios-0.0.1-SNAPSHOT.pom
channel stopped
Finished: FAILURE
Below is the POM file which has created to run the script :
http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
<groupId>Wanderly</groupId>
<artifactId>WanderlyScenarios</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>WanderlyScenarios</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>testngExecutor.xml</suiteXmlFile>
</suiteXmlFiles>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-chrome-driver -->
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-chrome-driver -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-chrome-driver</artifactId>
<version>3.14.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.testng/testng -->
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.9.9</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>2.46.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.17</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.17</version>
</dependency>
<!-- https://mvnrepository.com/artifact/log4j/log4j -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.qmetry/qaf -->
<dependency>
<groupId>com.qmetry</groupId>
<artifactId>qaf</artifactId>
<version>2.1.14-RC2</version>
</dependency>
</dependencies>
</project>
After using "**mvn clean install**" shows below error :
it seems the error is related with maven with surefire plugin:
Can you please help me on this?
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------< Wanderly:WanderlyScenarios >---------------------
[INFO] Building WanderlyScenarios 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom (3.9 kB at 1.5 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-plugins/22/maven-plugins-22.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-plugins/22/maven-plugins-22.pom (13 kB at 24 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.jar
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.jar (25 kB at 38 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-jar-plugin/2.4/maven-jar-plugin-2.4.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-jar-plugin/2.4/maven-jar-plugin-2.4.pom (5.8 kB at 11 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-jar-plugin/2.4/maven-jar-plugin-2.4.jar
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-jar-plugin/2.4/maven-jar-plugin-2.4.jar (34 kB at 44 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.4/maven-install-plugin-2.4.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.4/maven-install-plugin-2.4.pom (6.4 kB at 15 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.4/maven-install-plugin-2.4.jar
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.4/maven-install-plugin-2.4.jar (27 kB at 48 kB/s)
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # WanderlyScenarios ---
Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.0/plexus-utils-3.0.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.0/plexus-utils-3.0.pom (4.1 kB at 10 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/sonatype/spice/spice-parent/16/spice-parent-16.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/sonatype/spice/spice-parent/16/spice-parent-16.pom (8.4 kB at 19 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/sonatype/forge/forge-parent/5/forge-parent-5.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/sonatype/forge/forge-parent/5/forge-parent-5.pom (8.4 kB at 19 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.0/plexus-utils-3.0.jar
Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.0/plexus-utils-3.0.jar (226 kB at 181 kB/s)
[INFO] Deleting E:\Study Material\Selenium\WanderlyScenarios - NormalFW\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # WanderlyScenarios ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory E:\Study Material\Selenium\WanderlyScenarios - NormalFW\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # WanderlyScenarios ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # WanderlyScenarios ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory E:\Study Material\Selenium\WanderlyScenarios - NormalFW\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # WanderlyScenarios ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) # WanderlyScenarios ---
[INFO] No tests to run.
[INFO] Surefire report directory: E:\Study Material\Selenium\WanderlyScenarios - NormalFW\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running TestSuite
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:11 min
[INFO] Finished at: 2019-03-07T11:16:08+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project WanderlyScenarios: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test failed: There was an error in the forked process
[ERROR] org.testng.TestNGException:
[ERROR] Cannot find class in classpath: com.scenarios.Wanderly_ApplyJob_Scenario
[ERROR] at org.testng.xml.XmlClass.loadClass(XmlClass.java:81)
[ERROR] at org.testng.xml.XmlClass.init(XmlClass.java:73)
[ERROR] at org.testng.xml.XmlClass.<init>(XmlClass.java:59)
[ERROR] at org.testng.xml.TestNGContentHandler.startElement(TestNGContentHandler.java:546)
[ERROR] at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
[ERROR] at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
[ERROR] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1339)
[ERROR] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2784)
[ERROR] at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
[ERROR] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
[ERROR] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842)
[ERROR] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
[ERROR] at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
[ERROR] at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
[ERROR] at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
[ERROR] at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:327)
[ERROR] at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
[ERROR] at org.testng.xml.XMLParser.parse(XMLParser.java:38)
[ERROR] at org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:16)
[ERROR] at org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:9)
[ERROR] at org.testng.xml.Parser.parse(Parser.java:172)
[ERROR] at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:300)
[ERROR] at org.testng.TestNG.run(TestNG.java:1021)
[ERROR] at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:295)
[ERROR] at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:84)
[ERROR] at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:90)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
Even when I am using "mvn compile test", its working for me locally. Even when I am trying to run inside eclispe then also it works properly*
I downloaded the current version of the JUnit 5 sample code from https://github.com/junit-team/junit5-samples/tree/r5.2.0/ and extracted the subfolder junit5-jupiter-starter-maven to a local temp folder.
Then I openend a console window and tried to run that sample with mvnw clean test, but all I got was an java.lang.NoClassDefFoundError: org/junit/platform/launcher/core/LauncherFactory
Full maven output (of re-run without downloads):
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building junit5-vanilla-maven 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # junit5-vanilla-maven ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\temp\junit5-jupiter-starter-maven\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) # junit5-vanilla-maven ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # junit5-vanilla-maven ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\temp\junit5-jupiter-starter-maven\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.7.0:testCompile (default-testCompile) # junit5-vanilla-maven ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.21.0:test (default-test) # junit5-vanilla-maven ---
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.245 s
[INFO] Finished at: 2018-06-01T16:31:25+02:00
[INFO] Final Memory: 11M/306M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.21.0:test (default-test) on project junit5-vanilla-maven: There are test failures.
[ERROR]
[ERROR] Please refer to C:\temp\junit5-jupiter-starter-maven\target\surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
[ERROR] There was an error in the forked process
[ERROR] java.lang.NoClassDefFoundError: org/junit/platform/launcher/core/LauncherFactory
[ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process
[ERROR] java.lang.NoClassDefFoundError: org/junit/platform/launcher/core/LauncherFactory
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:658)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:533)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:278)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:244)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1149)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:978)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:854)
[ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
[ERROR] at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
[ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
[ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
[ERROR] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
[ERROR] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
[ERROR] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
[ERROR] at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:498)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:498)
[ERROR] at org.apache.maven.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:39)
[ERROR] at org.apache.maven.wrapper.WrapperExecutor.execute(WrapperExecutor.java:122)
[ERROR] at org.apache.maven.wrapper.MavenWrapperMain.main(MavenWrapperMain.java:50)
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
mvnw --version:
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T21:39:06+02:00)
Maven home: C:\Users\<XXX>\.m2\wrapper\dists\apache-maven-3.5.0-bin\6ps54u5pnnbbpr6ds9rppcc7iv\apache-maven-3.5.0
Java version: 1.8.0_171, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_171\jre
Default locale: de_AT, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
Did I do something wrong, or can you reproduce this problem?
Since the error is
[ERROR] java.lang.NoClassDefFoundError: org/junit/platform/launcher/core/LauncherFactory
I suggest to check the junit-platform-launcher jar file. Maybe it is corrupted.
It should be the one of\.m2\repository\org\junit\platform\junit-platform-launcher\1.2.0\junit-platform-launcher-1.2.0.jar
For my it was a different problem. Multimodule maven project has two modules A and B, where A is using junit-pioneer:1.9.1 (having transitive dependency from junit-platform-launcher:1.8.2) when module B doesn't use junit-pioneer but fails to build because of java.lang.NoClassDefFoundError: org/junit/platform/launcher/core/LauncherFactory when building the whole project with mvn clean install.
My solution was to add (unused) test dependency from junit-pioneer to module B.
I'm trying to build the example project in this web page:
http://open-services.net/resources/tutorials/integrating-products-with-oslc/running-the-examples/
Everything builds ok but when launching project Ninacrm (last step) I'm getting an exception.
Got an error like this:
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilde with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building nina-crm-example 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> jetty-maven-plugin:9.3.0.v20150612:run-exploded (default-cli) # ninacrm >>>
[WARNING] The POM for woodstox:wstx-asl:jar:3.0.0 is missing, no dependency information available
[WARNING] The artifact jdom:jdom:jar:1.1 has been relocated to org.jdom:jdom:jar:1.1
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # ninacrm ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) # ninacrm ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # ninacrm ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) # ninacrm ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # ninacrm ---
[INFO] Surefire report directory: C:\Users\markel\git\org.eclipse.lyo.docs\ninacrm\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.ecliplse.lyo.samples.ninacrm.ParseTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.025 sec
Results :
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-war-plugin:2.2:war (default-war) # ninacrm ---
[INFO] Packaging webapp
[INFO] Assembling webapp [ninacrm] in [C:\Users\markel\git\org.eclipse.lyo.docs\ninacrm\target\ninacrm]
[INFO] Processing war project
[INFO] Copying webapp resources [C:\Users\markel\git\org.eclipse.lyo.docs\ninacrm\src\main\webapp]
[INFO] Webapp assembled in [107 msecs]
[INFO] Building war: C:\Users\markel\git\org.eclipse.lyo.docs\ninacrm\target\ninacrm.war
[INFO] WEB-INF\web.xml already added, skipping
[INFO]
[INFO] <<< jetty-maven-plugin:9.3.0.v20150612:run-exploded (default-cli) # ninacrm <<<
[WARNING] The artifact jdom:jdom:jar:1.1 has been relocated to org.jdom:jdom:jar:1.1
[INFO]
[INFO] --- jetty-maven-plugin:9.3.0.v20150612:run-exploded (default-cli) # ninacrm ---
[WARNING] Error injecting: org.eclipse.jetty.maven.plugin.JettyRunWarExplodedMojo
java.lang.TypeNotPresentException: Type org.eclipse.jetty.maven.plugin.JettyRunWarExplodedMojo not present
at org.eclipse.sisu.space.URLClassSpace.loadClass(URLClassSpace.java:115)
at org.eclipse.sisu.space.NamedClass.load(NamedClass.java:46)
at org.eclipse.sisu.space.AbstractDeferredClass.get(AbstractDeferredClass.java:48)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:86)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:55)
at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:70)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:100)
at org.eclipse.sisu.plexus.PlexusLifecycleManager.onProvision(PlexusLifecycleManager.java:133)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:109)
at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:55)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:68)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:47)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:997)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1047)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:993)
at com.google.inject.Scopes$1$1.get(Scopes.java:59)
at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:82)
at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:51)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:260)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:252)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:462)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:120)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: java.lang.UnsupportedClassVersionError: org/eclipse/jetty/maven/plugin/JettyRunWarExplodedMojo : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:389)
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:235)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
at org.eclipse.sisu.space.URLClassSpace.loadClass(URLClassSpace.java:107)
... 41 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.193 s
[INFO] Finished at: 2015-10-16T11:36:44+01:00
[INFO] Final Memory: 15M/224M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.jetty:jetty-maven-plugin:9.3.0.v20150612:run-exploded (default-cli) on project ninacrm: Execution default-cli of goal org.eclipse.jetty:jetty-maven-plugin:9.3.0.v20150612:run-exploded failed: Unable to load the mojo 'run-exploded' in the plugin 'org.eclipse.jetty:jetty-maven-plugin:9.3.0.v20150612' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: org/eclipse/jetty/maven/plugin/JettyRunWarExplodedMojo : Unsupported major.minor version 52.0
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.eclipse.jetty:jetty-maven-plugin:9.3.0.v20150612
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/markel/.m2/repository/org/eclipse/jetty/jetty-maven-plugin/9.3.0.v20150612/jetty-maven-plugin-9.3.0.v20150612.jar
[ERROR] urls[1] = file:/C:/Users/markel/.m2/repository/org/sonatype/sisu/sisu-inject-bean/2.1.1/sisu-inject-bean-2.1.1.jar
[ERROR] urls[2] = file:/C:/Users/markel/.m2/repository/org/sonatype/sisu/sisu-guice/2.9.4/sisu-guice-2.9.4-no_aop.jar
[ERROR] urls[3] = file:/C:/Users/markel/.m2/repository/org/codehaus/plexus/plexus-utils/2.0.6/plexus-utils-2.0.6.jar
[ERROR] urls[4] = file:/C:/Users/markel/.m2/repository/org/sonatype/aether/aether-util/1.11/aether-util-1.11.jar
[ERROR] urls[5] = file:/C:/Users/markel/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.14/plexus-interpolation-1.14.jar
[ERROR] urls[6] = file:/C:/Users/markel/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
[ERROR] urls[7] = file:/C:/Users/markel/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
[ERROR] urls[8] = file:/C:/Users/markel/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[9] = file:/C:/Users/markel/.m2/repository/org/apache/maven/plugin-tools/maven-plugin-tools-api/3.1/maven-plugin-tools-api-3.1.jar
[ERROR] urls[10] = file:/C:/Users/markel/.m2/repository/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar
[ERROR] urls[11] = file:/C:/Users/markel/.m2/repository/org/eclipse/jetty/jetty-util/9.3.0.v20150612/jetty-util-9.3.0.v20150612.jar
[ERROR] urls[12] = file:/C:/Users/markel/.m2/repository/org/eclipse/jetty/jetty-webapp/9.3.0.v20150612/jetty-webapp-9.3.0.v20150612.jar
[ERROR] urls[13] = file:/C:/Users/markel/.m2/repository/org/eclipse/jetty/jetty-xml/9.3.0.v20150612/jetty-xml-9.3.0.v20150612.jar
[ERROR] urls[14] = file:/C:/Users/markel/.m2/repository/org/eclipse/jetty/jetty-servlet/9.3.0.v20150612/jetty-servlet-9.3.0.v20150612.jar
[ERROR] urls[15] = file:/C:/Users/markel/.m2/repository/org/eclipse/jetty/jetty-quickstart/9.3.0.v20150612/jetty-quickstart-9.3.0.v20150612.jar
[ERROR] urls[16] = file:/C:/Users/markel/.m2/repository/org/eclipse/jetty/jetty-jaas/9.3.0.v20150612/jetty-jaas-9.3.0.v20150612.jar
[ERROR] urls[17] = file:/C:/Users/markel/.m2/repository/org/eclipse/jetty/jetty-security/9.3.0.v20150612/jetty-security-9.3.0.v20150612.jar
[ERROR] urls[18] = file:/C:/Users/markel/.m2/repository/org/eclipse/jetty/jetty-plus/9.3.0.v20150612/jetty-plus-9.3.0.v20150612.jar
[ERROR] urls[19] = file:/C:/Users/markel/.m2/repository/org/eclipse/jetty/jetty-jndi/9.3.0.v20150612/jetty-jndi-9.3.0.v20150612.jar
[ERROR] urls[20] = file:/C:/Users/markel/.m2/repository/org/eclipse/jetty/jetty-server/9.3.0.v20150612/jetty-server-9.3.0.v20150612.jar
[ERROR] urls[21] = file:/C:/Users/markel/.m2/repository/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar
[ERROR] urls[22] = file:/C:/Users/markel/.m2/repository/org/eclipse/jetty/jetty-http/9.3.0.v20150612/jetty-http-9.3.0.v20150612.jar
[ERROR] urls[23] = file:/C:/Users/markel/.m2/repository/org/eclipse/jetty/jetty-io/9.3.0.v20150612/jetty-io-9.3.0.v20150612.jar
[ERROR] urls[24] = file:/C:/Users/markel/.m2/repository/org/eclipse/jetty/jetty-jmx/9.3.0.v20150612/jetty-jmx-9.3.0.v20150612.jar
[ERROR] urls[25] = file:/C:/Users/markel/.m2/repository/org/eclipse/jetty/jetty-annotations/9.3.0.v20150612/jetty-annotations-9.3.0.v20150612.jar
[ERROR] urls[26] = file:/C:/Users/markel/.m2/repository/javax/annotation/javax.annotation-api/1.2/javax.annotation-api-1.2.jar
[ERROR] urls[27] = file:/C:/Users/markel/.m2/repository/org/ow2/asm/asm/5.0.1/asm-5.0.1.jar
[ERROR] urls[28] = file:/C:/Users/markel/.m2/repository/org/ow2/asm/asm-commons/5.0.1/asm-commons-5.0.1.jar
[ERROR] urls[29] = file:/C:/Users/markel/.m2/repository/org/ow2/asm/asm-tree/5.0.1/asm-tree-5.0.1.jar
[ERROR] urls[30] = file:/C:/Users/markel/.m2/repository/org/eclipse/jetty/websocket/javax-websocket-server-impl/9.3.0.v20150612/javax-websocket-server-impl-9.3.0.v20150612.jar
[ERROR] urls[31] = file:/C:/Users/markel/.m2/repository/org/eclipse/jetty/websocket/javax-websocket-client-impl/9.3.0.v20150612/javax-websocket-client-impl-9.3.0.v20150612.jar
[ERROR] urls[32] = file:/C:/Users/markel/.m2/repository/javax/websocket/javax.websocket-api/1.0/javax.websocket-api-1.0.jar
[ERROR] urls[33] = file:/C:/Users/markel/.m2/repository/org/eclipse/jetty/websocket/websocket-server/9.3.0.v20150612/websocket-server-9.3.0.v20150612.jar
[ERROR] urls[34] = file:/C:/Users/markel/.m2/repository/org/eclipse/jetty/websocket/websocket-common/9.3.0.v20150612/websocket-common-9.3.0.v20150612.jar
[ERROR] urls[35] = file:/C:/Users/markel/.m2/repository/org/eclipse/jetty/websocket/websocket-api/9.3.0.v20150612/websocket-api-9.3.0.v20150612.jar
[ERROR] urls[36] = file:/C:/Users/markel/.m2/repository/org/eclipse/jetty/websocket/websocket-client/9.3.0.v20150612/websocket-client-9.3.0.v20150612.jar
[ERROR] urls[37] = file:/C:/Users/markel/.m2/repository/org/eclipse/jetty/websocket/websocket-servlet/9.3.0.v20150612/websocket-servlet-9.3.0.v20150612.jar
[ERROR] urls[38] = file:/C:/Users/markel/.m2/repository/org/eclipse/jetty/apache-jsp/9.3.0.v20150612/apache-jsp-9.3.0.v20150612.jar
[ERROR] urls[39] = file:/C:/Users/markel/.m2/repository/org/eclipse/jetty/toolchain/jetty-schemas/3.1.M0/jetty-schemas-3.1.M0.jar
[ERROR] urls[40] = file:/C:/Users/markel/.m2/repository/org/mortbay/jasper/apache-jsp/8.0.20.M0/apache-jsp-8.0.20.M0.jar
[ERROR] urls[41] = file:/C:/Users/markel/.m2/repository/org/mortbay/jasper/apache-el/8.0.20.M0/apache-el-8.0.20.M0.jar
[ERROR] urls[42] = file:/C:/Users/markel/.m2/repository/org/eclipse/jetty/orbit/org.eclipse.jdt.core/3.8.2.v20130121/org.eclipse.jdt.core-3.8.2.v20130121.jar
[ERROR] urls[43] = file:/C:/Users/markel/.m2/repository/org/eclipse/jetty/apache-jstl/9.3.0.v20150612/apache-jstl-9.3.0.v20150612.jar
[ERROR] urls[44] = file:/C:/Users/markel/.m2/repository/org/apache/taglibs/taglibs-standard-spec/1.2.1/taglibs-standard-spec-1.2.1.jar
[ERROR] urls[45] = file:/C:/Users/markel/.m2/repository/org/apache/taglibs/taglibs-standard-impl/1.2.1/taglibs-standard-impl-1.2.1.jar
[ERROR] urls[46] = file:/C:/Users/markel/.m2/repository/javax/transaction/javax.transaction-api/1.2/javax.transaction-api-1.2.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
And here's the pom.xml file of Ninacrm project:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>net.openservices</groupId>
<artifactId>ninacrm</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>nina-crm-example</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>jdom</groupId>
<artifactId>jdom</artifactId>
<version>1.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.hp.hpl.jena</groupId>
<artifactId>jena</artifactId>
<version>2.5.7</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<finalName>ninacrm</finalName>
<plugins>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.3.0.v20150612</version>
<configuration>
<webAppConfig>
<contextPath>/ninacrm</contextPath>
</webAppConfig>
<!-- Jetty config adds logging -->
<jettyConfig>${project.build.directory}/test-classes/jetty.xml</jettyConfig>
<systemProperties>
<systemProperty>
<name>config.dir</name>
<value>${basedir}/src/test/resources</value>
</systemProperty>
<systemProperty>
<name>jetty.logs</name>
<value>${basedir}/target</value>
</systemProperty>
<systemProperty>
<name>jetty.port</name>
<value>8181</value>
</systemProperty>
</systemProperties>
</configuration>
</plugin>
</plugins>
</build>
</project>
I'm working with Eclipse Luna and jdk 1.7, and tried also with Mars and jdk 1.8.
Does anybody have any idea of what's going on?
Thanks in advance.
In Run configuration, under JRE tab, use Java 1.8 to run it.
I'm trying to go through Hibernate tutorial and got stuck on running the command
C:\Users\Eyal\workspace\FirstHibernateTutorial>mvn exec:java -Dexec.mainclass="o
rg.hsqldb.Server" -Dexec.args="-database.O file:target/data/tutorial" -e
and get these errors.
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for
org.hibernate.tutorials:hibernate-tutorial:jar:1.0.0-SNAPSHOT
[WARNING] The expression ${artifactId} is deprecated. Please use ${project.artif
actId} instead.
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten t
he stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support buildin
g such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building First Hibernate Tutorial 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> exec-maven-plugin:1.2:java (default-cli) # hibernate-tutorial >>>
[INFO]
[INFO] <<< exec-maven-plugin:1.2:java (default-cli) # hibernate-tutorial <<<
[INFO]
[INFO] --- exec-maven-plugin:1.2:java (default-cli) # hibernate-tutorial ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.964s
[INFO] Finished at: Thu Apr 21 18:31:10 IDT 2011
[INFO] Final Memory: 4M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2:java (def
ault-cli) on project hibernate-tutorial: The parameters 'mainClass' for goal org
.codehaus.mojo:exec-maven-plugin:1.2:java are missing or invalid -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o
rg.codehaus.mojo:exec-maven-plugin:1.2:java (default-cli) on project hibernate-t
utorial: The parameters 'mainClass' for goal org.codehaus.mojo:exec-maven-plugin
:1.2:java are missing or invalid
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:221)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBu
ild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
352)
Caused by: org.apache.maven.plugin.PluginParameterException: The parameters 'mai
nClass' for goal org.codehaus.mojo:exec-maven-plugin:1.2:java are missing or inv
alid
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.populatePl
uginFields(DefaultMavenPluginManager.java:576)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfigu
redMojo(DefaultMavenPluginManager.java:529)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:92)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:209)
... 19 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginParamete
rException
I did changed one thing in the pom file. I added the versions of the dependencies. this is the pom.xml. I changed it because without it, I'm getting errors about lack of version specification.
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/
maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.hibernate.tutorials</groupId>
<artifactId>hibernate-tutorial</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>First Hibernate Tutorial</name>
<build>
<!-- we dont want the version to be part of the generated war file name -->
<finalName>${artifactId}</finalName>
</build>
<dependencies>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>3.3.1.GA</version>
</dependency>
<!-- Because this is a web app, we also have a dependency on the servlet api. -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>[2.4,)</version>
</dependency>
<!-- Hibernate uses slf4j for logging, for our purposes here use the simple backend -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.5.6</version>
</dependency>
<!-- Hibernate gives you a choice of bytecode providers between cglib and javassist -->
<dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
<version>[3.0,)</version>
</dependency>
</dependencies>
</project>
I think the main problem is in the line
The parameters 'mainClass' for goal org
.codehaus.mojo:exec-maven-plugin:1.2:java are missing or invalid -> [Help 1]
Why does mainClass is not valid?
Can you see something I don't?
EDIT:
OK, I changed "mainclass" to "mainClass" and it gives me this error about not finding "org.hsqldb.Server". I added hsqldb.jar to Eclipse' reference libraries but still it gives me the same error.
This is the stack print:
C:\Users\Eyal\workspace\FirstHibernateTutorial>mvn exec:java -Dexec.mainClass="o
rg.hsqldb.Server" -Dexec.args="-database.O file:target/data/tutorial" -e
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for
org.hibernate.tutorials:hibernate-tutorial:jar:1.0.0-SNAPSHOT
[WARNING] The expression ${artifactId} is deprecated. Please use ${project.artif
actId} instead.
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten t
he stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support buildin
g such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building First Hibernate Tutorial 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> exec-maven-plugin:1.2:java (default-cli) # hibernate-tutorial >>>
[INFO]
[INFO] <<< exec-maven-plugin:1.2:java (default-cli) # hibernate-tutorial <<<
[INFO]
[INFO] --- exec-maven-plugin:1.2:java (default-cli) # hibernate-tutorial ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.106s
[INFO] Finished at: Sat Apr 23 10:46:09 IDT 2011
[INFO] Final Memory: 4M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2:java (def
ault-cli) on project hibernate-tutorial: An exception occured while executing th
e Java class. org.hsqldb.Server -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o
rg.codehaus.mojo:exec-maven-plugin:1.2:java (default-cli) on project hibernate-t
utorial: An exception occured while executing the Java class. org.hsqldb.Server
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBu
ild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
352)
Caused by: org.apache.maven.plugin.MojoExecutionException: An exception occured
while executing the Java class. org.hsqldb.Server
at org.codehaus.mojo.exec.ExecJavaMojo.execute(ExecJavaMojo.java:346)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:209)
... 19 more
Caused by: java.lang.ClassNotFoundException: org.hsqldb.Server
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:284)
at java.lang.Thread.run(Thread.java:662)
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
xception
C:\Users\Eyal\workspace\FirstHibernateTutorial>
It should be mainClass not mainclass.
-Dexec.mainClass="org.hsqldb.Server"
Read more on this here and here.
And hsqldb should be in your maven dependencies:
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>2.0.0</version>
</dependency>
Please be aware, that the "configuration" section must be out of the execution section (see example below). Otherwise you get the "missing or invalid mainClass" error.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2</version>
<dependencies>
<dependency>
<groupId>org.versly</groupId>
<artifactId>versly-wsdoc</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
<executions>
<execution>
<phase>prepare-package</phase>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>org.versly.rest.wsdoc.RestDocAssembler</mainClass>
<arguments>
<argument>${project.build.directory}/classes</argument>
</arguments>
</configuration>
</plugin>