Build failure when running "mvn clean install" - java

I used the following code to create the project. (I followed this tutorial)
git clone https://github.com/kolorobot/spring-mvc-quickstart-archetype.git
cd spring-mvc-quickstart-archetype
mvn clean install
And, when I tried to do a mvn clean install I got the following error message.
[INFO] [INFO] 1 error
[INFO] [INFO] -------------------------------------------------------------
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] BUILD FAILURE
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time: 6.844 s
[INFO] [INFO] Finished at: 2014-12-19T14:28:09+05:30
[INFO] [INFO] Final Memory: 11M/111M
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project basic: Compilation failure
[INFO] [ERROR] Failure executing javac, but could not parse the error:
[INFO] [ERROR] javac: invalid target release: 1.8
[INFO] [ERROR] Usage: javac <options> <source files>
[INFO] [ERROR] use -help for a list of possible options
[INFO] [ERROR] -> [Help 1]
[INFO] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project basic: Compilation failure
[INFO] Failure executing javac, but could not parse the error:
[INFO] javac: invalid target release: 1.8
[INFO] Usage: javac <options> <source files>
[INFO] use -help for a list of possible options
[INFO]
[INFO]
[INFO] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
[INFO] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
[INFO] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
[INFO] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
[INFO] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
[INFO] at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
[INFO] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
[INFO] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
[INFO] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
[INFO] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
[INFO] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
[INFO] at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
[INFO] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[INFO] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[INFO] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[INFO] at java.lang.reflect.Method.invoke(Method.java:606)
[INFO] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
[INFO] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
[INFO] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
[INFO] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[INFO] Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure
[INFO] Failure executing javac, but could not parse the error:
[INFO] javac: invalid target release: 1.8
[INFO] Usage: javac <options> <source files>
[INFO] use -help for a list of possible options
[INFO]
[INFO]
[INFO] at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:656)
[INFO] at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:128)
[INFO] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
[INFO] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
[INFO] ... 19 more
[INFO] [ERROR]
[INFO] [ERROR] Re-run Maven using the -X switch to enable full debug logging.
[INFO] [ERROR]
[INFO] [ERROR] For more information about the errors and possible solutions, please read the following articles:
[INFO] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[INFO] Post-archetype-generation invoker exit code: 1
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.726 s
[INFO] Finished at: 2014-12-19T14:28:10+05:30
[INFO] Final Memory: 13M/115M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:integration-test (default-integration-test) on project spring-mvc-quickstart:
[ERROR] Archetype IT 'basic' failed: Execution failure: exit code = 1
[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
How can I solve this?

you need jdk 8 to compile the project.(pom file in path:"spring-mvc-quickstart-archetype/src/main/resources/archetype-resources/pom.xml" force you to have jdk 8 installed).

Related

Error: "tag does not exist" when using maven release:perform to push container to ACR in bitbucket pipelines

I have used Quarkus and bitbucket pipelines for more than 2 years and it normally functions very well. From Quarkus version 2.15 I got a problem when pushing the tag/container to Azure Container Registry. The error is:
[io.quarkus.deployment.util.ExecUtil] tag does not exist: my-company.azurecr.io/my-app:1.2.30
The only difference from when it functions is that the Quarkus version is 2.15 and 2.16.
Here is the pipeline:
image: maven:3.8.7
pipelines:
branches:
master:
- step:
size: 2x
name: Build and Deploy Artifacts
caches:
- maven
- docker
services:
- docker
script:
- git config --global user.email "pipeline#bitbucket.com"
- git config --global user.name "Bitbucket Pipeline"
- git remote set-url origin ${BITBUCKET_GIT_SSH_ORIGIN}
- docker login my-company.azurecr.io -u $AZURE_CLIENT_ID --password $AZURE_SECRET
- mvn -B -DdryRun=true release:prepare -Dbitbucket.url=${BITBUCKET_GIT_SSH_ORIGIN}
- mvn -B release:clean release:prepare -Dbitbucket.url=${BITBUCKET_GIT_SSH_ORIGIN} -DscmCommentPrefix="[skip ci] " -Darguments="-Dmaven.test.skip=true"
- mvn -B release:perform -Dbitbucket.url=${BITBUCKET_GIT_SSH_ORIGIN} -DscmCommentPrefix="[skip ci] " -Darguments="-Dmaven.deploy.skip=true -Dmaven.test.skip=true -Pnative -Dquarkus.native.container-build=true -Dquarkus.container-image.push=true -Dquarkus.native.native-image-xmx=4g -Dquarkus.container-image.additional-tags=latest"
- git status
- git push
definitions:
services:
docker:
memory: 7100
Stack trace:
[INFO] [INFO] [io.quarkus.deployment.util.ExecUtil] tag does not exist: my-company.azurecr.io/my-app:1.2.30
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] BUILD FAILURE
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time: 04:50 min
[INFO] [INFO] Finished at: 2023-01-26T10:43:00Z
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [ERROR] Failed to execute goal io.quarkus.platform:quarkus-maven-plugin:2.16.0.Final:build (default) on project integration-experian: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[INFO] [ERROR] [error]: Build step io.quarkus.container.image.docker.deployment.DockerProcessor#dockerBuildFromNativeImage threw an exception: java.lang.RuntimeException: Execution of 'docker push $ACR_HELM_REPOinsight.azurecr.io/si-integration-experian:1.2.30' failed. See docker output for more details
[INFO] [ERROR] at io.quarkus.container.image.docker.deployment.DockerProcessor.dockerException(DockerProcessor.java:338)
[INFO] [ERROR] at io.quarkus.container.image.docker.deployment.DockerProcessor.pushImage(DockerProcessor.java:331)
[INFO] [ERROR] at io.quarkus.container.image.docker.deployment.DockerProcessor.lambda$createContainerImage$3(DockerProcessor.java:229)
[INFO] [ERROR] at java.base/java.util.stream.Streams$StreamBuilderImpl.forEachRemaining(Streams.java:411)
[INFO] [ERROR] at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:735)
[INFO] [ERROR] at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
[INFO] [ERROR] at io.quarkus.container.image.docker.deployment.DockerProcessor.createContainerImage(DockerProcessor.java:229)
[INFO] [ERROR] at io.quarkus.container.image.docker.deployment.DockerProcessor.dockerBuildFromNativeImage(DockerProcessor.java:153)
[INFO] [ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[INFO] [ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[INFO] [ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[INFO] [ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[INFO] [ERROR] at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:909)
[INFO] [ERROR] at io.quarkus.builder.BuildContext.run(BuildContext.java:281)
[INFO] [ERROR] at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
[INFO] [ERROR] at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
[INFO] [ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
[INFO] [ERROR] at java.base/java.lang.Thread.run(Thread.java:833)
[INFO] [ERROR] at org.jboss.threads.JBossThread.run(JBossThread.java:501)
[INFO] [ERROR] -> [Help 1]
[INFO] [ERROR]
[INFO] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[INFO] [ERROR] Re-run Maven using the -X switch to enable full debug logging.
[INFO] [ERROR]
[INFO] [ERROR] For more information about the errors and possible solutions, please read the following articles:
[INFO] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
I just tried to build the Quarkus app using bitbucket pipeline and push it to ACR.

Failed to execute goal on project Siafu: Could not resolve dependencies for project Siafu:Siafu:jar:1.0.6-SNAPSHOT

Siafu is a context simulator
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] MavenParent ........................................ SUCCESS [ 0.004 s]
[INFO] Siafu Simulator .................................... FAILURE [01:27 min]
[INFO] Siafu datatypes library ............................ SKIPPED
[INFO] Simulation-Glasgow ................................. SKIPPED
[INFO] Simulation-Leimen .................................. SKIPPED
[INFO] Simulation-Office .................................. SKIPPED
[INFO] Simulation-Testland ................................ SKIPPED
[INFO] Simulation-Valencia ................................ SKIPPED
[INFO] Simulations ........................................ SKIPPED
[INFO] SiafuAggregator .................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:27 min
[INFO] Finished at: 2017-04-24T15:45:12+08:00
[INFO] Final Memory: 10M/91M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project Siafu: Could not resolve dependencies for project Siafu:Siafu:jar:1.0.6-SNAPSHOT:
Failed to collect dependencies at org.eclipse.swt:org.eclipse.swt.gtk.linux.x86:jar:3.8:
Failed to read artifact descriptor for org.eclipse.swt:org.eclipse.swt.gtk.linux.x86:jar:3.8:
Could not transfer artifact org.eclipse.swt:org.eclipse.swt.gtk.linux.x86:pom:3.8 from/to swt-repo (https://swt-repo.googlecode.com/svn/repo/): Network is unreachable (connect failed) -> [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/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf
Please give me some help to solve this problem,thanks!

Maven : Getting compilation error using the Install command through cmd

Compilation error on using Maven Install command
Hi , When I use the Maven clean command it runs successfully but when I run the install command , I have been getting compilation errors . Follwing is the error I have been getting.Thanks
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building TigerFinal 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # TigerFinal ---
[INFO] Deleting C:\Users\Shashank_bisht\workspace\TigerFinal\target
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.517 s
[INFO] Finished at: 2016-01-04T22:53:12+05:30
[INFO] Final Memory: 6M/105M
[INFO] ------------------------------------------------------------------------
C:\Users\Shashank_bisht\workspace\TigerFinal>mvn install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building TigerFinal 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # TigerFinal ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\Shashank_bisht\workspace\TigerFinal\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # TigerFinal ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 11 source files to C:\Users\Shashank_bisht\workspace\TigerFinal\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /C:/Users/Shashank_bisht/workspace/TigerFinal/src/main/java/tiger/MyHomepage/Home.java:[11,27] packa
MyHomepageTestCases does not exist
[ERROR] /C:/Users/Shashank_bisht/workspace/TigerFinal/src/main/java/tiger/Utils/AppUtils.java:[14,27] packag
yHomepageTestCases does not exist
[INFO] 2 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.733 s
[INFO] Finished at: 2016-01-04T22:53:26+05:30
[INFO] Final Memory: 17M/153M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile)
project TigerFinal: Compilation failure: Compilation failure:
[ERROR] /C:/Users/Shashank_bisht/workspace/TigerFinal/src/main/java/tiger/MyHomepage/Home.java:[11,27] packa
MyHomepageTestCases does not exist
[ERROR] /C:/Users/Shashank_bisht/workspace/TigerFinal/src/main/java/tiger/Utils/AppUtils.java:[14,27] packag
yHomepageTestCases does not exist
[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
From the comments:
You need a full JDK (Java Development Kit), not a JRE (Java Runtime Environment)
Download a JDK from OpenJDK or Oracle, then set the environment variable JAVA_HOME to the root folder of your JDK.
Then re-try your Maven command

Error injecting: org.apache.maven.plugin.install.InstallMojo java.lang.NoClassDefFoundError

Hello I'm Developing J2EE Application using Maven and Spring ,when i tried to run Maven install command this error appear, and I don't know how to solve it, I searched the web but I got nothing, any help will be appreciated .
thanks.
I'm Using eclipse luna and I'm following Arthur Vin Tutorial.
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building J2EE Application 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # j2eeapplication ---
[WARNING] Using platform encoding (Cp1256 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) # j2eeapplication ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # j2eeapplication ---
[WARNING] Using platform encoding (Cp1256 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory C:\Java2EEtutorial\WorkSpace\j2eeapplication\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) # j2eeapplication ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # j2eeapplication ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-war-plugin:2.2:war (default-war) # j2eeapplication ---
[INFO] Packaging webapp
[INFO] Assembling webapp [j2eeapplication] in [C:\Java2EEtutorial\WorkSpace\j2eeapplication\target\j2eeapplication-0.0.1-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp resources [C:\Java2EEtutorial\WorkSpace\j2eeapplication\src\main\webapp]
[INFO] Webapp assembled in [20 msecs]
[INFO] Building war: C:\Java2EEtutorial\WorkSpace\j2eeapplication\target\j2eeapplication-0.0.1-SNAPSHOT.war
[INFO] WEB-INF\web.xml already added, skipping
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) # j2eeapplication ---
[WARNING] The POM for org.codehaus.plexus:plexus-utils:jar:3.0.5 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.codehaus.plexus:plexus-digest:jar:1.0 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] Error injecting: org.apache.maven.plugin.install.InstallMojo
java.lang.NoClassDefFoundError: org/codehaus/plexus/digest/DigesterException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
at java.lang.Class.getDeclaredConstructors(Class.java:2020)
at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:245)
at com.google.inject.internal.ConstructorBindingImpl.create(ConstructorBindingImpl.java:99)
at com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:653)
at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:863)
at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:790)
at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:278)
at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:210)
at com.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:986)
at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1019)
at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:982)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1032)
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:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
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.codehaus.plexus.digest.DigesterException
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
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)
... 54 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.527 s
[INFO] Finished at: 2015-03-22T21:02:50+02:00
[INFO] Final Memory: 11M/162M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install (default-install) on project j2eeapplication: Execution default-install of goal org.apache.maven.plugins:maven-install-plugin:2.4:install failed: A required class was missing while executing org.apache.maven.plugins:maven-install-plugin:2.4:install: org/codehaus/plexus/digest/DigesterException
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.apache.maven.plugins:maven-install-plugin:2.4
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/aghazey/.m2/repository/org/apache/maven/plugins/maven-install-plugin/2.4/maven-install-plugin-2.4.jar
[ERROR] urls[1] = file:/C:/Users/aghazey/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar
[ERROR] urls[2] = file:/C:/Users/aghazey/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.5/plexus-utils-3.0.5.jar
[ERROR] urls[3] = file:/C:/Users/aghazey/.m2/repository/org/codehaus/plexus/plexus-digest/1.0/plexus-digest-1.0.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------: org.codehaus.plexus.digest.DigesterException
[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
I deleted Repository and re install command and it works fine with me
If you are on windows, delete folder codehaus, you can find it on the following path.
C:\Users\MY_CURRENT_USER\.m2\repository\org
It works for me.
Delete only
REPOSITORY_DIRECTORY/org/codehaus/plexus
Try changing JRE by JDK
like this:
jdk
It works for me!

Unable to generate App Engine datastorecallbacks.xml using Maven

I am trying to migrate an existing App Engine app to Maven but I am running into a problem with generating datastorecallbacks.xml, so I tried to start a project from scratch using this tutorial: https://developers.google.com/appengine/docs/java/tools/maven and then added:
#PostPut(kinds = {"Greeting"})
void updateCache(PutContext context) {
Entity greeting = new Entity("Test", "test");
DatastoreService datastore =
DatastoreServiceFactory.getDatastoreService();
datastore.put(greeting);
}
The full source code can be found here: https://github.com/bogdan-nourescu/AppEngineMavenTest
The build fails with this error message:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building myapplication 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # myapplication ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\Bogdan\IdeaProjects\test9\myapplication\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) # myapplication ---
[INFO] Compiling 1 source file to C:\Users\Bogdan\IdeaProjects\test9\myapplication\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] error: Datastore Callbacks: java.lang.RuntimeException: Unable to read META-INF/datastorecallbacks.xml
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.421s
[INFO] Finished at: Thu Jan 16 13:41:43 EET 2014
[INFO] Final Memory: 17M/216M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project myapplication: Compilation failure
[ERROR] error: Datastore Callbacks: java.lang.RuntimeException: Unable to read META-INF/datastorecallbacks.xml
[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
What am I missing in the pom.xml that will correctly generate the datastorecallbacks.xml?

Categories