Problem using Maven with Cargo plug-in - maven-2

When I'm using Maven with the cargo plug-ing to handle hot deployments to tomcat, maven fails on the clean task if the .war artifact doesn't currently exist. So if I run mvn clean, then mvn clean package - it errors out. What can I do to have cargo ignore that?
C:\work2\Fresh\fresh-ui>mvn clean
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building fresh-ui
[INFO] task-segment: [clean]
[INFO] ------------------------------------------------------------------------
[INFO] [cargo:deployer-undeploy {execution: clean-undeploy}]
[INFO] [mcat5xRemoteDeployer] Undeploying [C:\work2\Fresh\fresh-ui\target\fresh.
war]
[INFO] [clean:clean {execution: default-clean}]
[INFO] Deleting directory C:\work2\Fresh\fresh-ui\target
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5 seconds
[INFO] Finished at: Tue Aug 18 09:49:16 PDT 2009
[INFO] Final Memory: 9M/16M
[INFO] ------------------------------------------------------------------------
C:\work2\Fresh\fresh-ui>mvn clean
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building fresh-ui
[INFO] task-segment: [clean]
[INFO] ------------------------------------------------------------------------
[INFO] [cargo:deployer-undeploy {execution: clean-undeploy}]
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to create deployable for the parameters (container [id = [tomcat5x
]], deployable type [war]).
C:\work2\Fresh\fresh-ui\target\fresh.war (The system cannot find the path specif
ied)
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.codehaus.cargo.container.ContainerException: Failed to create deployable for
the parameters (container [id = [tomcat5x]], deployable type [war]).
at org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.createImple
mentation(AbstractGenericHintFactory.java:157)
at org.codehaus.cargo.generic.spi.AbstractIntrospectionGenericHintFactor
y.createImplementation(AbstractIntrospectionGenericHintFactory.java:86)
at org.codehaus.cargo.generic.deployable.DefaultDeployableFactory.create
Deployable(DefaultDeployableFactory.java:163)
at org.codehaus.cargo.maven2.configuration.Deployable.createDeployable(D
eployable.java:136)
at org.codehaus.cargo.maven2.AbstractDeployerMojo.performDeployerActionO
nAllDeployables(AbstractDeployerMojo.java:99)
at org.codehaus.cargo.maven2.AbstractDeployerMojo.doExecute(AbstractDepl
oyerMojo.java:47)
at org.codehaus.cargo.maven2.AbstractCargoMojo.execute(AbstractCargoMojo
.java:255)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:483)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:678)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:540)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:519)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:371)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:332)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:181)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:4
1)
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.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.codehaus.cargo.generic.deployable.DefaultDeployableFactory.create
Instance(DefaultDeployableFactory.java:196)
at org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.createImple
mentation(AbstractGenericHintFactory.java:153)
... 25 more
Caused by: org.codehaus.cargo.container.ContainerException: Failed to parse Tomc
at WAR file in [C:\work2\Fresh\fresh-ui\target\fresh.war]
at org.codehaus.cargo.container.tomcat.TomcatWAR.<init>(TomcatWAR.java:5
5)
... 31 more
Caused by: org.codehaus.cargo.util.CargoException: Failed to find file [C:\work2
\Fresh\fresh-ui\target\fresh.war]
at org.codehaus.cargo.util.DefaultFileHandler.getInputStream(DefaultFile
Handler.java:351)
at org.codehaus.cargo.module.DefaultJarArchive.getContentAsStream(Defaul
tJarArchive.java:231)
at org.codehaus.cargo.module.DefaultJarArchive.getResource(DefaultJarArc
hive.java:154)
at org.codehaus.cargo.module.webapp.tomcat.TomcatWarArchive.parseTomcatC
ontextXml(TomcatWarArchive.java:92)
at org.codehaus.cargo.module.webapp.tomcat.TomcatWarArchive.<init>(Tomca
tWarArchive.java:61)
at org.codehaus.cargo.container.tomcat.TomcatWAR.<init>(TomcatWAR.java:5
1)
... 31 more
Caused by: java.io.FileNotFoundException: C:\work2\Fresh\fresh-ui\target\fresh.w
ar (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at org.codehaus.cargo.util.DefaultFileHandler.getInputStream(DefaultFile
Handler.java:347)
... 36 more
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.codehaus.cargo.generic.deployable.DefaultDeployableFactory.create
Instance(DefaultDeployableFactory.java:196)
at org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.createImple
mentation(AbstractGenericHintFactory.java:153)
at org.codehaus.cargo.generic.spi.AbstractIntrospectionGenericHintFactor
y.createImplementation(AbstractIntrospectionGenericHintFactory.java:86)
at org.codehaus.cargo.generic.deployable.DefaultDeployableFactory.create
Deployable(DefaultDeployableFactory.java:163)
at org.codehaus.cargo.maven2.configuration.Deployable.createDeployable(D
eployable.java:136)
at org.codehaus.cargo.maven2.AbstractDeployerMojo.performDeployerActionO
nAllDeployables(AbstractDeployerMojo.java:99)
at org.codehaus.cargo.maven2.AbstractDeployerMojo.doExecute(AbstractDepl
oyerMojo.java:47)
at org.codehaus.cargo.maven2.AbstractCargoMojo.execute(AbstractCargoMojo
.java:255)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:483)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:678)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:540)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:519)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:371)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:332)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:181)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:4
1)
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.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.codehaus.cargo.container.ContainerException: Failed to parse Tomc
at WAR file in [C:\work2\Fresh\fresh-ui\target\fresh.war]
at org.codehaus.cargo.container.tomcat.TomcatWAR.<init>(TomcatWAR.java:5
5)
... 31 more
Caused by: org.codehaus.cargo.util.CargoException: Failed to find file [C:\work2
\Fresh\fresh-ui\target\fresh.war]
at org.codehaus.cargo.util.DefaultFileHandler.getInputStream(DefaultFile
Handler.java:351)
at org.codehaus.cargo.module.DefaultJarArchive.getContentAsStream(Defaul
tJarArchive.java:231)
at org.codehaus.cargo.module.DefaultJarArchive.getResource(DefaultJarArc
hive.java:154)
at org.codehaus.cargo.module.webapp.tomcat.TomcatWarArchive.parseTomcatC
ontextXml(TomcatWarArchive.java:92)
at org.codehaus.cargo.module.webapp.tomcat.TomcatWarArchive.<init>(Tomca
tWarArchive.java:61)
at org.codehaus.cargo.container.tomcat.TomcatWAR.<init>(TomcatWAR.java:5
1)
... 31 more
Caused by: java.io.FileNotFoundException: C:\work2\Fresh\fresh-ui\target\fresh.w
ar (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at org.codehaus.cargo.util.DefaultFileHandler.getInputStream(DefaultFile
Handler.java:347)
... 36 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Tue Aug 18 09:49:22 PDT 2009
[INFO] Final Memory: 8M/16M
[INFO] ------------------------------------------------------------------------
C:\work2\Fresh\fresh-ui>

From what I can see, you've bound deployer-undeploy to the pre-clean phase of the clean lifecycle. Thus, when performing the first clean, the war is safely undeployed and then target is removed. When performing the second clean, cargo:deployer-undeploy can't find the war in target and fails.
To me, Cargo shouldn't fail and this is likely a bug in Cargo's maven 2 plugin or in the core API that should handle this case gracefully. I'd open an issue in Cargo's issue tracker.
As mentioned by Rich in a comment, the current workaround is to run clean only once.

Related

Apache Usergrid Build error on buildling Usergrid Launcher

Hi I am trying to do a fresh build of Apache Usergrid but have been running into a build error when it reaches the Usergrid Launcher. The following is the log that gets displayed when I run: mvn -X clean install -DskipTests=true
Am I correct that it seems to be pointing to Apple Java Extensions to be the cause of the problem? If so how do I go about fixing the issue?
[DEBUG] junit:junit:jar:4.11:test
[DEBUG] org.hamcrest:hamcrest-core:jar:1.3:test
[DEBUG] org.springframework:spring-test:jar:3.1.2.RELEASE:test
[DEBUG] org.slf4j:jcl-over-slf4j:jar:1.6.1:compile
[DEBUG] org.slf4j:jul-to-slf4j:jar:1.6.1:compile
[DEBUG] log4j:log4j:jar:1.2.16:compile
[DEBUG] com.apple:AppleJavaExtensions:jar:1.5.4:compile
[DEBUG] org.slf4j:slf4j-api:jar:1.6.1:compile
[DEBUG] Using connector WagonRepositoryConnector with priority 0.0 for file://D:\incubator-usergrid-master\incubator-usergrid-master\stack\launcher/../m/repository
Downloading: file://D:\incubator-usergrid-master\incubator-usergrid-master\stack\launcher/../m2/repository/com/apple/AppleJavaExtensions/1.5.4/AppleJavaExtensions-1.5.4.jar
[DEBUG] Writing tracking file C:\Users\Alex\.m2\repository\com\apple\AppleJavaExtensions\1.5.4\AppleJavaExtensions-1.5.4.jar.lastUpdated
[DEBUG] Using connector WagonRepositoryConnector with priority 0.0 for https://repo.maven.apache.org/maven2
Downloading: https://repo.maven.apache.org/maven2/com/apple/AppleJavaExtensions/1.5.4/AppleJavaExtensions-1.5.4.jar
[DEBUG] Writing tracking file C:\Users\Alex\.m2\repository\com\apple\AppleJavaExtensions\1.5.4\AppleJavaExtensions-1.5.4.jar.lastUpdated
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Usergrid Parent .................................... SUCCESS [01:29 min]
[INFO] Usergrid Java SDK (old) ............................ SUCCESS [ 8.208 s]
[INFO] Usergrid Build Tools ............................... SUCCESS [ 0.955 s]
[INFO] Usergrid Config .................................... SUCCESS [ 1.616 s]
[INFO] Usergrid Test Utils ................................ SUCCESS [ 9.847 s]
[INFO] Usergrid Core ...................................... SUCCESS [ 31.411 s]
[INFO] Usergrid Services .................................. SUCCESS [ 27.583 s]
[INFO] Usergrid MongoDB Emulator .......................... SUCCESS [ 10.643 s]
[INFO] Usergrid REST ...................................... SUCCESS [01:02 min]
[INFO] Usergrid Tools ..................................... SUCCESS [13:34 min]
[INFO] Usergrid Websocket ................................. SUCCESS [ 27.734 s]
[INFO] Usergrid Launcher .................................. FAILURE [ 21.943 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18:27 min
[INFO] Finished at: 2014-08-28T00:05:29-06:00
[INFO] Final Memory: 58M/178M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project usergrid-launcher: Could not resolve dependencies for project org.apache.usergrid:usergrid-launcher:jar:1.0.0:
Could not find artifact com.apple:AppleJavaExtensions:jar:1.5.4 in local-dependencies (file://D:\incubator-usergrid-master\incubator-usergrid-master\stack\launcher/../m2/repository) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project usergrid-launcher: Could not resolve dependencies
for project org.apache.usergrid:usergrid-launcher:jar:1.0.0: Could not find artifact com.apple:AppleJavaExtensions:jar:1.5.4 in
local-dependencies (file://D:\incubator-usergrid-master\incubator-usergrid-master\stack\launcher/../m2/repository)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:220)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:127)
at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:257)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:200)
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:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
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: org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for
project org.apache.usergrid:usergrid-launcher:jar:1.0.0: Could not find artifact
com.apple:AppleJavaExtensions:jar:1.5.4 in local-dependencies
(file://D:\incubator-usergrid-master\incubator-usergrid-master\stack\launcher/../m2/repository)
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:198)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDpendencyResolver.java:195)
... 22 more
Caused by: org.eclipse.aether.resolution.DependencyResolutionException: Could not find artifact
com.apple:AppleJavaExtensions:jar:1.5.4 in local-dependencies (file://D:\incubator-usergrid-master\incubator-usergrid-master\stack\launcher/../m2/repository)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:384)
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:192)
... 23 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact
com.apple:AppleJavaExtensions:jar:1.5.4 in local-dependencies (file://D:\incubator-usergrid-master\incubator-usergrid-master\stack\launcher/../m2/repository)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:459)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:262)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:367)
... 24 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact
com.apple:AppleJavaExtensions:jar:1.5.4 in local-dependencies (file://D:\incubator-usergrid-master\incubator-usergrid-master\stack\launcher/../m2/repository)
at org.eclipse.aether.connector.wagon.WagonRepositoryConnector$6.wrap(WagonRepositoryConnector.java:1012)
at org.eclipse.aether.connector.wagon.WagonRepositoryConnector$6.wrap(WagonRepositoryConnector.java:1004)
at org.eclipse.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:725)
at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
[ERROR]
[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 :usergrid-launcher D:\incubator-usergrid-master\incubator-usergrid-master\stack>
Any help would be greatly appreciated. Thanks.
Clearly its missing in a repo somewhere, for now get the jar from
https://code.google.com/r/ahduros-ooo-maven/source/browse/repository/com/apple/applejavaextensions/1.5.4/
and install it locally with
mvn install:install-file -Dfile=<path-to-file> -DpomFile=<path-to-pomfile>
You also have to either hack the jar or the pom.xml for launcher around a bit. I did the latter:
<dependency>
<groupId>com.apple</groupId>
<artifactId>applejavaextensions</artifactId>
<version>1.5.4</version>
</dependency>

Maven install/compile Failure

I am getting below exception , When i compile/install through maven in command prompt / eclipse.
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) # dashboard ---
May 22, 2013 3:55:50 PM org.sonatype.guice.bean.reflect.Logs$JULSink warnWARNING: Error injecting: org.apache.maven.plugin.resources.ResourcesMojo java.lang.NoClassDefFoundError: org/apache/maven/shared/filtering/MavenFiltering
Exception
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2413)
at java.lang.Class.getDeclaredConstructors(Class.java:1855)
at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.
java:245)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.050s
[INFO] Finished at: Wed May 22 15:55:50 MDT 2013
[INFO] Final Memory: 9M/111M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.5:resources (default-resources) on project dashboard: Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:2.5:resources failed: A required class was missing while executing org.apache.maven.plugins:maven-resources-plugin:2.5:resources: org/apache/maven/shared/filtering/MavenFilteringException
I have tried by changing the repository location and also deleting the existing plugins in the repository directory.
Try if another task locks the maven-filtering jar file (.m2/repository/org/apache/maven/shared/maven-filtering/1.xx/maven-filtering-1.xx.jar). In my case Eclipse had locked that file somehow. Kill that task and maven should be ok.

Error while executing atlas-create-jira-plugin

I am getting this error while executing atlas-create-jira-plugin command, I am starting Jira plugin development:
A new plugin structure is required for JIRA 5 plugins due to significant changes in the APIs.
Create a plugin for?
1) JIRA 5
2) JIRA 4 (or earlier)
#?1
Executing: "C:\atlassian-plugin-sdk\apache-maven\bin\mvn.bat" com.atlassian.maven.plugins:maven-jira-plugin:4.1.6:create
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [com.atlassian.maven.plugins:maven-jira-plugin:4.1.6:create] (aggregator-style)
[INFO] ------------------------------------------------------------------------
Downloading: http://www.laughingpanda.org/maven2/org/twdata/maven/maven-cli-plugin-parent/0.7/maven-cli-plugin-parent-0.
7.pom
[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '21a121ae3afd67024dd862f90189be2fb4931146'; remote
= '<!DOCTYPE' - RETRYING
Downloading: http://www.laughingpanda.org/maven2/org/twdata/maven/maven-cli-plugin-parent/0.7/maven-cli-plugin-parent-0.
7.pom
[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '21a121ae3afd67024dd862f90189be2fb4931146'; remote
= '<!DOCTYPE' - IGNORING
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: null:maven-cli-plugin:maven-plugin:0.7
Reason: Cannot find parent: org.twdata.maven:maven-cli-plugin-parent for project: null:maven-cli-plugin:maven-plugin:0.7
for project null:maven-cli-plugin:maven-plugin:0.7
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16 seconds
[INFO] Finished at: Tue Apr 30 15:43:10 IST 2013
[INFO] Final Memory: 18M/43M
Please let me know how can I proceed.
Thanks,
Rhishi

while creating archetype getting following error

D:\Training\workspace\vppsource>mvn archetype:generate -B -DarchetypeGroupId=org
.appfuse.archetypes -DarchetypeArtifactId=appfuse-modular-struts-archetype -Darc
hetypeVersion=2.1.0-M1 -DgroupId=com.vmware -DartifactId=vpp
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [archetype:generate] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] Preparing archetype:generate
[INFO] No goals needed for project - skipping
[INFO] [archetype:generate {execution: default-cli}]
[INFO] Generating project in Batch mode
[WARNING] Error reading archetype catalog http://repo1.maven.org/maven2
org.apache.maven.wagon.TransferFailedException: Error transferring file: Connect
ion timed out: connect
at org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputD
ata(LightweightHttpWagon.java:143)
at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:11
6)
at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
at org.apache.maven.archetype.source.RemoteCatalogArchetypeDataSource.ge
tArchetypeCatalog(RemoteCatalogArchetypeDataSource.java:97)
at org.apache.maven.archetype.DefaultArchetypeManager.getRemoteCatalog(D
efaultArchetypeManager.java:195)
at org.apache.maven.archetype.DefaultArchetypeManager.getRemoteCatalog(D
efaultArchetypeManager.java:184)
at org.apache.maven.archetype.ui.DefaultArchetypeSelector.getArchetypesB
yCatalog(DefaultArchetypeSelector.java:278)
at org.apache.maven.archetype.ui.DefaultArchetypeSelector.selectArchetyp
e(DefaultArchetypeSelector.java:69)
at org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execu
te(CreateProjectFromArchetypeMojo.java:186)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:694)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
Goal(DefaultLifecycleExecutor.java:569)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:539)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:284)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:6
0)
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.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
at sun.net.www.http.HttpClient.(HttpClient.java:233)
at sun.net.www.http.HttpClient.New(HttpClient.java:306)
at sun.net.www.http.HttpClient.New(HttpClient.java:323)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLC
onnection.java:860)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConne
ction.java:801)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection
.java:726)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
nection.java:1049)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373
)
at org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputD
ata(LightweightHttpWagon.java:115)
... 28 more
[WARNING] No archetype found in Remote catalog. Defaulting to internal Catalog
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 46 seconds
[INFO] Finished at: Wed Jun 09 16:11:07 IST 2010
[INFO] Final Memory: 11M/28M
[INFO] ------------------------------------------------------------------------
Are you behind a proxy server? You may need to configure proxy settings in your Maven settings.xml file.
I had the same problem.
Adding this:
<proxies>
<proxy>
<active>true</active>
<protocol>http</protocol>
<host>proxy.acme.com</host>
<port>8080</port>
<username>myusername</username>
<password>mypassword</password>
<nonProxyHosts></nonProxyHosts>
</proxy>
</proxies>
to the bottom of my C:\Users\myuser.m2\settings.xml file fixed the issue.
See http://maven.apache.org/guides/mini/guide-proxies.html for more details.

Maven changelog plugin with Mercurial problem

I have configured my Maven2 project to generate a changelog report from a Mercurial repository (accessible via file:// protocol) but the goal execution fails with the following message:
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'changelog'.
[INFO] ------------------------------------------------------------------------
[INFO] Building Phobos3 Prototype
[INFO] task-segment: [changelog:changelog]
[INFO] ------------------------------------------------------------------------
[INFO] [changelog:changelog {execution: default-cli}]
[INFO] Generating changed sets xml to: D:\Documents and Settings\501845922\Workspace\phobos3.prototype\target\changelog.xml
[INFO] EXECUTING: hg log --verbose
[WARNING] Could not figure out: abort: Invalid argument
[ERROR]
EXECUTION FAILED
Execution of cmd : log failed with exit code: -1.
Working directory was:
D:\Documents and Settings\501845922\Workspace\phobos3.prototype
Your Hg installation seems to be valid and complete.
Hg version: 1.4.3+20100201 (OK)
[ERROR] Provider message:
[ERROR]
EXECUTION FAILED
Execution of cmd : log failed with exit code: -1.
Working directory was:
D:\Documents and Settings\501845922\Workspace\phobos3.prototype
Your Hg installation seems to be valid and complete.
Hg version: 1.4.3+20100201 (OK)
[ERROR] Command output:
[ERROR]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] An error has occurred in Change Log report generation.
Embedded error: An error has occurred during changelog command :
Command failed.
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: An error has occurred in Change Log report generation.
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: An error has occurred in Change Log report generation.
at org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenReport.java:79)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
... 17 more
Caused by: org.apache.maven.reporting.MavenReportException: An error has occurred during changelog command :
at org.apache.maven.plugin.changelog.ChangeLogReport.generateChangeSetsFromSCM(ChangeLogReport.java:555)
at org.apache.maven.plugin.changelog.ChangeLogReport.getChangedSets(ChangeLogReport.java:393)
at org.apache.maven.plugin.changelog.ChangeLogReport.executeReport(ChangeLogReport.java:340)
at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:98)
at org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenReport.java:73)
... 19 more
Caused by: org.apache.maven.plugin.MojoExecutionException: Command failed.
at org.apache.maven.plugin.changelog.ChangeLogReport.checkResult(ChangeLogReport.java:705)
at org.apache.maven.plugin.changelog.ChangeLogReport.generateChangeSetsFromSCM(ChangeLogReport.java:467)
... 23 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Thu Apr 29 17:10:06 CEST 2010
[INFO] Final Memory: 5M/10M
[INFO] ------------------------------------------------------------------------
What did I miss in a configuration? (I hope it is a configuration problem not a Maven plugins related bug!:) My repository URL seems to be ok (the plugin has been complaining before, I fixed that up), I also set a date format for parsing (also been complaining, also fixed).
target/changelog.xml being promised was not generated at all.
Maven 2.2.1
Mercurial 1.4.3
Windows XP SP3
mvn scm:changelog command provides an expected output.
Thanks for any suggestions, I haven't googled up anything (nor binged up;).
I did a test with a random project (noop, to be precise):
hg clone https://noop.googlecode.com/hg/ noop
And after configuring the dateFormat of the maven-changelog-plugin in the top pom.xml:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-changelog-plugin</artifactId>
<configuration>
<dateFormat>EEE MMM dd hh:mm:ss yyyy Z</dateFormat>
</configuration>
</plugin>
I've been able to run mvn changelog:changelog without troubles. My point is that the plugin seems to work for at least one project (chosen randomly :).
I'd really like to know if hg log --verbose behave correctly as the plugin seems to complain about it not running successfully. If it does, could you try to pass the -X option when running Maven and see if you get more useful information.
Also, please provide the content of your <scm> element.