Build from GIT Repository - windows

I'm trying to build geoexplorer.war from github : https://github.com/boundlessgeo/suite/tree/master/geoexplorer, I already Installed maven, Java, Ivy, Ant, Python, Git for windows, Ruby. But still I cant build geoexplorer.war , it said no POM.
According to Instruction I use mvn install
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.148 s
[INFO] Finished at: 2014-07-08T01:18:40+08:00
[INFO] Final Memory: 4M/85M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM
in this directory (C:\Users\user1\suite\geoexplorer). Please verify you invoked
Maven from the correct directory. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProject
Exception
According Suggestion I use ant
C:\Users\user1\suite\geoexplorer>ant
Buildfile: C:\Users\user1\suite\geoexplorer\build.xml
help:
BUILD FAILED
C:\Users\Mikah\suite\build\common.xml:35: Execute failed: java.io.IOException: C
annot run program "ant": CreateProcess error=2, The system cannot find the file
specified
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1042)
at java.lang.Runtime.exec(Runtime.java:620)
at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Exec
ute.java:862)
at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:481)
at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:495)
at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:631)
at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:672)
at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:498)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:809)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find th
e file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
at java.lang.ProcessImpl.start(ProcessImpl.java:137)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1023)
... 24 more
Total time: 0 seconds
Any solution? I'm really new in this Git, Ant and Maven things.

Looks like the project is in the midst of build process overhaul.
I'd try checking out a released branch (git checkout r4.1 : https://github.com/boundlessgeo/suite/tree/r4.1/geoexplorer ) and building that with maven, as it has pom.xml.

It looks like the project uses Ant now instead of Maven:
https://github.com/boundlessgeo/suite/commit/f4e3adcb3ca70bd2811f9f475d5ca6443013ec74

Related

Maven: Could not find goal 'create' in plugin org.apache.maven.plugins:maven-archetype-plugin

I'm trying to create a Web Application Project with Maven as described here but I keep getting the following error
mvn archetype:create
-DgroupId=ru.jofsey
-DartifactId=example
-DarchetypeArtifactId=maven-archetype-webapp
-DinteractiveMode=false
-e
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.373 s
[INFO] Finished at: 2017-02-18T14:31:49+03:00
[INFO] Final Memory: 7M/123M
[INFO] ------------------------------------------------------------------------
[ERROR] Could not find goal 'create' in plugin org.apache.maven.plugins:maven-archetype-plugin:3.0.0 among available goals crawl, create-from-project, generate, help, integration-test, jar, update-local-catalog -> [Help 1]
org.apache.maven.plugin.MojoNotFoundException: Could not find goal 'create' in plugin org.apache.maven.plugins:maven-archetype-plugin:3.0.0 among available goals crawl, create-from-project, generate, help, integration-test, jar, update-local-catalog
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDescriptor(DefaultMavenPluginManager.java:290)
at org.apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor(DefaultBuildPluginManager.java:241)
at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.getMojoDescriptor(MojoDescriptorCreator.java:238)
at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:103)
at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:83)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:89)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoNotFoundException
As per the following release note, the plugin has removed support for the archetype-create goal. It was already marked as deprecated in recent versions of the plugin, and instead you should use the archetype:generate goal. The Jira issue (https://issues.apache.org/jira/browse/ARCHETYPE-437) mentions the following:
It's time to finally remove the support for the old create goal. For users still using it, it should fail the build with a message about using the generate goal instead.
The plugin documentation also removed any mentioning of archetype:create.
Using mvn archetype:generate instance of mvn archetype:create
mvn archetype:generate

IntelliJ Idea 14 giving error on grails application debug

I have started facing an issue with my Grails project after IntelliJ IDEA upgrade to 14.1.2 (from 14.1.1), all of a sudden my Grails project stopped working in debug mode. I believe a configuration change is required to enable debugging in newer version.
Here is the error that i am getting.
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.053 s
[INFO] Finished at: 2015-04-27T10:17:41+05:30
[INFO] Final Memory: 10M/244M
[INFO] ------------------------------------------------------------------------
[ERROR] Could not find goal 'run-app --stacktrace' in plugin org.grails:grails-maven-plugin:2.4.3 among available goals generate-all, exec, package-plugin, maven-war, package, init, maven-functional-test, help, run-app-https, console, create-service, run-app, war, validate, set-version, test-app, clean, list-plugins, maven-compile, generate-controller, maven-clean, generate-views, install-templates, maven-test, create-domain-class, init-plugin, upgrade, config-directories, create-unit-test, create-controller, create-pom, validate-plugin, maven-grails-app-war, run-war, create-script, create-tag-lib, create-integration-test -> [Help 1]
org.apache.maven.plugin.MojoNotFoundException: Could not find goal 'run-app --stacktrace' in plugin org.grails:grails-maven-plugin:2.4.3 among available goals generate-all, exec, package-plugin, maven-war, package, init, maven-functional-test, help, run-app-https, console, create-service, run-app, war, validate, set-version, test-app, clean, list-plugins, maven-compile, generate-controller, maven-clean, generate-views, install-templates, maven-test, create-domain-class, init-plugin, upgrade, config-directories, create-unit-test, create-controller, create-pom, validate-plugin, maven-grails-app-war, run-war, create-script, create-tag-lib, create-integration-test
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDescriptor(DefaultMavenPluginManager.java:273)
at org.apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor(DefaultBuildPluginManager.java:240)
at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.getMojoDescriptor(MojoDescriptorCreator.java:233)
at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:106)
at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:86)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:85)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
at org.codehaus.classworlds.Launcher.main(Launcher.java:46)
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
This is a bug that came into IntelliJ with version 14.1.2:
https://youtrack.jetbrains.com/issue/IDEA-139568
You can fix it by upgrading to version 14.1.3 or newer.

Maven creating a jar package

When I run this command:
mvn -e package
I got this error:
[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from /usr/local/apache-maven-3.1.1/conf/settings.xml
[DEBUG] Reading user settings from /root/.m2/settings.xml [DEBUG] Using local repository at /root/.m2/repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for /root/.m2/repository
[INFO] Scanning for projects...
[DEBUG] Extension realms for project org.apache.maven:standalone-pom:pom:1: (none)
[DEBUG] Looking up lifecyle mappings for packaging pom from ClassRealm[plexus.core, parent: null]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.090s
[INFO] Finished at: Thu Apr 24 11:47:01 CEST 2014 [INFO] Final Memory: 12M/362M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in
this directory (/root/src/storm-starter). Please verify you invoked Maven from the
correct directory. -> [Help 1] org.apache.maven.lifecycle.MissingProjectException: The
goal you specified requires a project to execute but there is no POM in this directory
(/root/src/storm-starter). Please verify you invoked Maven from the correct directory.
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:89)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
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)
[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/MissingProjectException
Maven requires a file named pom.xml in the directory at which you have your project and are executing maven in.
That is the default; if you have another file as your pom.xml like you described in your comment, m2-pom.xml you'll have to inform maven about it with the -f flag.
mvn -f m2-pom.xml clean package

Installing snappy for hadoop fails

I'm following the installation instructions for snappy from here https://code.google.com/p/hadoop-snappy/ . However, I'm not able to complete step 3. I did configure, make, sudo make install and snappy lies in the correct dict in /usr/local. So the next step is installing snappy for hadoop. Therefore as describe I call
snappy-1.1.2 Tom$ mvn -e package
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.123s
[INFO] Finished at: Wed Mar 05 22:12:10 CET 2014
[INFO] Final Memory: 6M/82M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/Users/Tom/Downloads/snappy-1.1.2). Please verify you invoked Maven from the correct directory. -> [Help 1]
org.apache.maven.lifecycle.MissingProjectException: The goal you specified requires a project to execute but there is no POM in this directory (/Users/Tom/Downloads/snappy-1.1.2). Please verify you invoked Maven from the correct directory.
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:89)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException
So, aparently there is no POM file available. Also in the source directory of snappy I do not see any POM files:
snappy-1.1.2 Tom$ ls
AUTHORS config.guess install-sh snappy-sinksource.cc snappy-test.h
COPYING config.h libsnappy.la snappy-sinksource.h snappy.cc
ChangeLog config.h.in libtool snappy-sinksource.lo snappy.h
INSTALL config.log ltmain.sh snappy-sinksource.o snappy.lo
Makefile config.status m4 snappy-stubs-internal.cc snappy.o
Makefile.am config.sub missing snappy-stubs-internal.h snappy_unittest
Makefile.in configure snappy-c.cc snappy-stubs-internal.lo snappy_unittest-snappy-test.o
NEWS configure.ac snappy-c.h snappy-stubs-internal.o snappy_unittest-snappy_unittest.o
README depcomp snappy-c.lo snappy-stubs-public.h snappy_unittest.cc
aclocal.m4 format_description.txt snappy-c.o snappy-stubs-public.h.in stamp-h1
autogen.sh framing_format.txt snappy-internal.h snappy-test.cc testdata
I checked that the requirements (maven3, java 6 etc) are fullfilled. So, how do I get this command to run?
Okay, question has been answered here: mvn and the make package error
In a nutshell: Go to https://github.com/electrum/hadoop-snappy download the zip and run the mvn package command inside the directory where the pom.xml lies. That's it.

Usage of maven-release-plugin in Jenkins with integrity (MKS) as Source Code Management

Please notice the second question in the end of this one!
I have got some trouble using Jenkins, the maven-release-plugin and integrity (using MKS) as source code Management (scm).
Well, I try to release my project from MKS via Jenkins to Sonartype Nexus. If I use "deploy" as maven goal within the maven-release-plugin, everything is fine and the release is deployed correct, BUT it is saved as a snapshot in Nexus.
To avoid this snapshot problem I decided to use the maven-release-plugin with release:perform. It should change the version number to a version without snapshot (like: 1.0.0), release it and add snapshot to the version number back again when the release was done. Version is increased also (like 1.0.1-SNAPSHOT).
But if I use "release:prepare" or "release:perform" as maven goals the output tells me:
[ERROR] No SCM URL was provided to perform the release from
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 24.405s
[INFO] Finished at: Fri Feb 14 11:56:40 CET 2014
[INFO] Final Memory: 10M/245M
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.0:perform (default-cli) on project javatests-test04: No SCM URL was provided to perform the release from -> [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
After I searched a now for a long time but did not found the answer I needed I came up with the idea to open this new question.
I tried things like:
adding information to pom.xml but not even sure if maven realized it (did not know what the correct URL would be for me was or if I even have one so I didn't changed it)
original from this site:
<scm>
<connection>scm:git:git#github.com:user/project.git</connection>
<url>scm:git:git#github.com:user/project.git</url>
<developerConnection>scm:git:git#github.com:user/project.git</developerConnection>
</scm>
my version:
<scm>
<connection>scm:integrity|myUser#myServer:7001|#p=d:/MKS/Tools/Tools.pj#s=Tests/Tests.pj#javatests-test04 </connection>
<url>scm:git:git#github.com:user/project.git</url>
<developerConnection>scm:integrity|myUser#myServer:7001|#p=d:/MKS/Tools/Tools.pj#s=Tests/Tests.pj#javatests-test04</developerConnection>
</scm>
I changed the maven goal as a second try(same with -Dproject.scm.developerConnerction):
release:perform -DconnectionUrl=scm:integrity:myUser#myMksServer:7001|#p=d:/MKS/Tools/Tools.pj#s=Tests/Tests.pj#javatests-test04
but it leads to a new error:
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-release-plugin:2.0:prepare
(default-cli) on project javatests-test04: The provider given in the
SCM URL could not be found: No such provider: 'integrity'.
I fact it works fine with "deploy" as maven goal, I am sure this is not the fault of wrong paths to project or to Sonartype Nexus.
Can anybody help me and/or tell me what my Maven goal should be like?
Do I have th change things in the pom? in the master pom? I want the release statement work...
I found a workaround that worked for me:
The plugin genreates some environment variables. Most of them are given and created automatic and one (IS_M2RELEASEBUILD) is editable in in the advanced settings of the option point "maven release build"
My solution:
1.) Check the "Maven release build" in the build environment to gain access to some values later.
2.) Create a "Conditional Step (Single)" as a Pre Step AND as a Post Step
2.1) Both should have a Boolean condition with a token: ${ENV,var="IS_M2RELEASEBUILD"}
2.2) Both should have "call Maven goal" as build step.
Goal for the pre step: *versions:set -DnewVersion=${MVN_RELEASE_VERSION}*
Goal for the post step: *versions:set -DnewVersion=${MVN_DEV_VERSION}*
The value of this variables are the same you enter when a release build is started.
3.) As "normal" build step i simple call a maven goal with "compile"
4.) Add Post-Build-Action: Integrity - CM Checkin with path to your MKS project and other options that are maybe needed here.
5.) Finished! (Dont forget to set your Distribution options in your pom.xml to tell Jenkins and Maven where the release results should be saved)
EDIT: I FOUND A WORKAROUND! SEE ANSWEAR WITH SOLUTION!
Okay, i have done 1 step in the right direction!
Just needed to add a reference into the pom.xml of my project to the currently used maven-release-plugin:
<build>
<plugins>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<checkModificationExcludes>
<checkModificationExclude>**/*pom.xml*</checkModificationExclude>
<checkModificationExclude>**/*.log</checkModificationExclude>
<checkModificationExclude>**/*.jar</checkModificationExclude>
<checkModificationExclude>**/target/**</checkModificationExclude>
</checkModificationExcludes>
</configuration>
</plugin>
</plugins>
</build>
BUT:
Now i have some other problems:
Console tells me that the login to MKS fails. The called user has got read AND write permissions, path to project and to Jenkins server are set right. I also made sure that the MKS folder is first in my path envionment variables. Just for your information: of course i used a real user with real password and real server and not "myUser", "myPassword" or "myServer"
I am pretty sure that i use the right configurations for my scm (developer-)connetction settings, because before the release takes part i download the projects content from MKS to my server with success! No error comes up here...
Usage of "scm:validate" tells me:
[INFO] --- maven-scm-plugin:1.9:validate (default-cli) # javatests-test04 ---
[INFO] MKS Integrity API Version: 4.10
[INFO] connectionUrl scm connection string is valid.
[INFO] MKS Integrity API Version: 4.10
[INFO] project.scm.connection scm connection string is valid.
[INFO] MKS Integrity API Version: 4.10
[INFO] project.scm.developerConnection scm connection string is valid.
What could be the reason for connections failures?
Console:
[...some more console output...]
Executing Maven: -B -f (pathToProject)\workspace\pom.xml -DdevelopmentVersion=0.0.5-SNAPSHOT -DreleaseVersion=0.0.4 -Dusername=myUser -Dresume=false compile release:prepare -Dpassword=**********
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building my test project 0.0.4-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-release-plugin:2.4.1:prepare (default-cli) # javatests-test04 ---
[some other debug infos]
[DEBUG] -- end configuration --
[DEBUG] User/Password information supplied: myUser/myPasswort
[DEBUG] Host/Port information supplied: myServer:7001
[INFO] MKS Integrity API Version: 4.10
[DEBUG] Configuration Path: #p=d:/MKS/Tools/Tools.pj#s=Tests/Tests.pj#javatests-test04
[INFO] Verifying that there are no local modifications...
[INFO] ignoring changes on: **\release.properties, **\pom.xml.next, **\*pom.xml*, **\*.jar, **\pom.xml.releaseBackup, **\pom.xml.backup, **\pom.xml.branch, **\target\**, **\pom.xml.tag, **\*.log
[DEBUG] User/Password information supplied: myUser/myPasswort
[DEBUG] Host/Port information supplied: myServer:7001
[INFO] MKS Integrity API Version: 4.10
[DEBUG] Configuration Path: #p=d:/MKS/Tools/Tools.pj#s=Tests/Tests.pj#javatests-test04
[INFO] Attempting to connect with the MKS Integrity Server
[INFO] Creating session for myUser/***********
[INFO] Attempting to establish connection using myUser#myServer:7001
com.mks.connect.BlimpException: Attempt to launch MKS Integrity Client Timed out. To solve this please try the following:
- Verify that the user you are logged in as has read and write permissions to the Integrity Client install directory.
- Make sure the Integrity Client install directory is the very first entry in the path.
at com.mks.connect.ClientCmdRunnerImpl.icInitialize(Native Method)
at com.mks.connect.ClientCmdRunnerImpl.checkIntegrityClientForLaunch(ClientCmdRunnerImpl.java:71)
at com.mks.connect.ClientCmdRunnerImpl.executePreCondition(ClientCmdRunnerImpl.java:95)
at com.mks.connect.AbstractCmdRunner.executeCommand(AbstractCmdRunner.java:235)
at com.mks.connect.AbstractCmdRunner.execute(AbstractCmdRunner.java:394)
at org.apache.maven.scm.provider.integrity.APISession.connect(APISession.java:134)
at org.apache.maven.scm.provider.integrity.command.login.IntegrityLoginCommand.executeLoginCommand(IntegrityLoginCommand.java:66)
at org.apache.maven.scm.command.login.AbstractLoginCommand.executeCommand(AbstractLoginCommand.java:45)
at org.apache.maven.scm.command.AbstractCommand.execute(AbstractCommand.java:59)
at org.apache.maven.scm.provider.integrity.IntegrityScmProvider.login(IntegrityScmProvider.java:182)
at org.apache.maven.scm.provider.AbstractScmProvider.login(AbstractScmProvider.java:742)
at org.apache.maven.scm.provider.AbstractScmProvider.status(AbstractScmProvider.java:784)
at org.apache.maven.shared.release.phase.ScmCheckModificationsPhase.execute(ScmCheckModificationsPhase.java:126)
at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:234)
at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:169)
at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:146)
at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:107)
at org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease(PrepareReleaseMojo.java:277)
at org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareReleaseMojo.java:232)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
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:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:117)
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.launchStandard(Launcher.java:329)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:178)
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 hudson.maven.Maven3Builder.call(Maven3Builder.java:134)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:69)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:328)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
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:744)
[ERROR] MKS API Exception: Attempt to launch MKS Integrity Client Timed out. To solve this please try the following:
- Verify that the user you are logged in as has read and write permissions to the Integrity Client install directory.
- Make sure the Integrity Client install directory is the very first entry in the path.
[INFO] exited with return code -1
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 39.694s
[INFO] Finished at: Mon Feb 17 16:49:07 CET 2014
[INFO] Final Memory: 17M/310M
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.4.1:prepare (default-cli) on project javatests-test04: An error occurred during the status check process: Can't login.
[ERROR] Exit Code: -1
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.4.1:prepare (default-cli) on project javatests-test04: An error occurred during the status check process: Can't login.
Exit Code: -1
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:117)
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.launchStandard(Launcher.java:329)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:178)
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 hudson.maven.Maven3Builder.call(Maven3Builder.java:134)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:69)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:328)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
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:744)
Caused by: org.apache.maven.plugin.MojoExecutionException: An error occurred during the status check process: Can't login.
Exit Code: -1
at org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease(PrepareReleaseMojo.java:281)
at org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareReleaseMojo.java:232)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 30 more
Caused by: org.apache.maven.shared.release.ReleaseExecutionException: An error occurred during the status check process: Can't login.
Exit Code: -1
at org.apache.maven.shared.release.phase.ScmCheckModificationsPhase.execute(ScmCheckModificationsPhase.java:131)
at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:234)
at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:169)
at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:146)
at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:107)
at org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease(PrepareReleaseMojo.java:277)
... 33 more
Caused by: org.apache.maven.scm.ScmException: Can't login.
Exit Code: -1
at org.apache.maven.scm.provider.AbstractScmProvider.login(AbstractScmProvider.java:746)
at org.apache.maven.scm.provider.AbstractScmProvider.status(AbstractScmProvider.java:784)
at org.apache.maven.shared.release.phase.ScmCheckModificationsPhase.execute(ScmCheckModificationsPhase.java:126)
... 38 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[JENKINS] Archiving pathToWorkspace\workspace\pom.xml to pathToRepository/javatests-test04/0.0.4-SNAPSHOT/javatests-test04-0.0.4-SNAPSHOT.pom
[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
channel stopped
Finished: FAILURE
Thanks for your Help! :)

Resources