while creating archetype getting following error - appfuse

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.

Related

How to get 'mvn lagom:runAll' to get my service listening on a port?

I was having problems getting my first service to run and decided to add the hello-api and hello-impl projects from the lagom Maven archtype project to see if it would work. It did but mine do not.
Background
Since other team members are pure Java developers, I was trying to avoid leveraging sbt and activator. Thus, the objective is that everything works in maven.
Here's a snippet of the 'mvn install' script output to show the other services built.
$ mvn install
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Archetype - mai-svcs
[INFO] mai-svc-common
[INFO] mai-actors-api <======= WANT THE SERVICE FOR THIS ONE TO RUN
[INFO] mai-namespace-api
[INFO] mai-actors-impl
[INFO] mai-namespace-impl
[INFO] mai-i18n-phrases-api
[INFO] hello-api
[INFO] hello-impl
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Archetype - mai-svcs 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Archetype - mai-svcs ............................... SUCCESS [ 2.774 s]
[INFO] mai-svc-common ..................................... SUCCESS [ 7.190 s]
[INFO] mai-actors-api ..................................... SUCCESS [ 24.706 s]
[INFO] mai-namespace-api .................................. SUCCESS [ 12.628 s]
[INFO] mai-actors-impl .................................... SUCCESS [ 29.061 s]
[INFO] mai-namespace-impl ................................. SUCCESS [ 21.294 s]
[INFO] mai-i18n-phrases-api ............................... SUCCESS [ 22.091 s]
[INFO] hello-api .......................................... SUCCESS [ 3.546 s]
NOTES: An MAIActorsModule class analogous to the HelloModule class was created and the application.conf file added in the src/main/resources folder.
When the command 'mvn lagom:runAll' is issued, initially, the services are the hello service port is logged but no other service's port is.
$ mvn lagom:runAll
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Archetype - mai-svcs
[INFO] mai-svc-common
[INFO] mai-actors-api
[INFO] mai-namespace-api
[INFO] mai-actors-impl
[INFO] mai-namespace-impl
[INFO] mai-i18n-phrases-api
[INFO] hello-api
[INFO] hello-impl
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Archetype - mai-svcs 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- lagom-maven-plugin:1.2.1:runAll (default-cli) # mai-svcs ---
[INFO] Starting Kafka
[INFO] Starting Cassandra
.[INFO] Did not find Netty's native epoll transport in the classpath, defaulting to NIO.
....[INFO] Using data-center name 'datacenter1' for DCAwareRoundRobinPolicy (if this is incorrect, please provide the correct datacenter name with DCAwareRoundRobinPolicy constructor)
[INFO] New Cassandra host /127.0.0.1:4000 added
[INFO] Cassandra server running at 127.0.0.1:4000
[INFO] Service locator is running at http://localhost:8000
[INFO] Service gateway is running at http://localhost:9000
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory C:\Users\lusp\mai_svcs\mai-svcs\hello-api\src\main\resources
[INFO] Nothing to compile - all classes are up to date
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
**[INFO] Nothing to compile - all classes are up to date
[INFO] Service hello-impl listening for HTTP on 0:0:0:0:0:0:0:0:57797
// ----- NO ENTRY FOR mai-actors-impl!!! -----
[INFO] (Service started, press enter to stop and go back to the console...)**
What step(s) did I miss?
Each of your <service>-impl projects need to:
Invoke the lagom-maven-plugin
Configure it with the property <lagomService>true</lagomService>
Here's an example snippet of what you need to add to your pom.xml file in each service implementation project:
<build>
<plugins>
<plugin>
<groupId>com.lightbend.lagom</groupId>
<artifactId>lagom-maven-plugin</artifactId>
<configuration>
<lagomService>true</lagomService>
</configuration>
</plugin>
</plugins>
</build>
The Lagom documentation has more details in the page titled Defining a Lagom build

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>

Maven2 problem to access plugins repository !

i just come to install maven2, after configuring the settings.xml in ${user.home}/.m2 and fixing a proxy error. Now by executing the command :
mvn -U archetype:create -DgroupId=maven-test -DartifactId=maven-test
-DpackageName=net.ensode.maventest
i get this error :
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] org.apache.maven.plugins: checking for updates from central
[WARNING] repository metadata for: 'org.apache.maven.plugins' could not be retri
eved from repository: central due to an error: Authorization failed: Access deni
ed to: http://repo2.maven.org/maven2/org/apache/maven/plugins/maven-metadata.xml
[INFO] Repository 'central' will be blacklisted
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does not exi
st or no valid version could be found
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Thu Apr 29 16:05:40 CEST 2010
[INFO] Final Memory: 2M/247M
[INFO] ------------------------------------------------------------------------
any idea of what could cause it ?
thanks !
I think that the most likely cause is that your proxy requires you to authenticate, and you haven't configured the authentication details into your settings.xml file.

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.

Problem using Maven with Cargo plug-in

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.