Bintray 409 conflict - mvn release plugin uploading jar twice? - maven-release-plugin

I'm struggling to push releases to Bintray in full.
From what I can tell, the issue seems to be caused by the maven release plugin trying to push the sources jar twice -- hence the HTTP 409 conflict response being returned.
So far I've not been able to locate the cause. Help would be appreciated!
I can see the jars on bintray up to the point that it fails, indicating it doesn't seem to be a credentials issue
Appending ;override=1 to the end of the url seemingly allows the release to succeed (I'm still new at this, so not 100% sure what I should be seeing)
Another collaborator is able to release fine - he's using a slightly older version of maven (downgrading from 3.6 to 3.5 is my next step, but it seems unusual/odd/unlikely?)
mvn test/package/install etc are fine - no concerns there
the version number is a full release number, not a snapshot (e.g. 1.2.3, not 1.2.3-SNAPSHOT)
edit: similar results are found using both Windows and Ubuntu (virtualbox guest)
Here's a snippet of what I believe to be the relevant parts of the mvn output, but can post more if needed.
[INFO] [INFO] --- maven-install-plugin:3.0.0-M1:install (default-install) # YYY-core ---
[INFO] [INFO] Installing /home/XXX/YYY/target/checkout/YYY-core/target/YYY-core-VERSION.jar to /home/XXX/.m2/repository/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION.jar
[INFO] [INFO] Installing /home/XXX/YYY/target/checkout/YYY-core/pom.xml to /home/XXX/.m2/repository/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION.pom
[INFO] [INFO] Installing /home/XXX/YYY/target/checkout/YYY-core/target/YYY-core-VERSION-sources.jar to /home/XXX/.m2/repository/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION-sources.jar
[INFO] [INFO] Installing /home/XXX/YYY/target/checkout/YYY-core/target/YYY-core-VERSION-sources.jar to /home/XXX/.m2/repository/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION-sources.jar
[INFO] [INFO] Installing /home/XXX/YYY/target/checkout/YYY-core/target/YYY-core-VERSION-javadoc.jar to /home/XXX/.m2/repository/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION-javadoc.jar
[INFO] [INFO]
[INFO] [INFO] --- maven-deploy-plugin:3.0.0-M1:deploy (default-deploy) # YYY-core ---
[INFO] [INFO] Uploading to bintray-YYY-ZZZ: https://api.bintray.com/maven/YYY/ZZZ/YYY/;publish=1/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION.jar
[INFO] [INFO] Uploaded to bintray-YYY-ZZZ: https://api.bintray.com/maven/YYY/ZZZ/YYY/;publish=1/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION.jar (1.2 MB at 112 kB/s)
[INFO] [INFO] Uploading to bintray-YYY-ZZZ: https://api.bintray.com/maven/YYY/ZZZ/YYY/;publish=1/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION.pom
[INFO] [INFO] Uploaded to bintray-YYY-ZZZ: https://api.bintray.com/maven/YYY/ZZZ/YYY/;publish=1/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION.pom (4.9 kB at 824 B/s)
[INFO] [INFO] Uploading to bintray-YYY-ZZZ: https://api.bintray.com/maven/YYY/ZZZ/YYY/;publish=1/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION-sources.jar
[INFO] [INFO] Uploaded to bintray-YYY-ZZZ: https://api.bintray.com/maven/YYY/ZZZ/YYY/;publish=1/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION-sources.jar (781 kB at 96 kB/s)
[INFO] [INFO] Uploading to bintray-YYY-ZZZ: https://api.bintray.com/maven/YYY/ZZZ/YYY/;publish=1/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION-sources.jar
[INFO] [INFO] Uploading to bintray-YYY-ZZZ: https://api.bintray.com/maven/YYY/ZZZ/YYY/;publish=1/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION-javadoc.jar
[INFO] [INFO] Uploaded to bintray-YYY-ZZZ: https://api.bintray.com/maven/YYY/ZZZ/YYY/;publish=1/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION-javadoc.jar (3.8 MB at 218 kB/s)
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Reactor Summary for YYY-parent VERSION:
[INFO] [INFO]
[INFO] [INFO] YYY-parent ...................... SUCCESS [ 18.058 s]
[INFO] [INFO] YYY-core ........................ FAILURE [01:37 min]
[INFO] [INFO] YYY-core-testing ................ SKIPPED
[INFO] [INFO] YYY-B-core ...................... SKIPPED
[INFO] [INFO] YYY-B-testing ................... SKIPPED
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] BUILD FAILURE
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time: 01:56 min
[INFO] [INFO] Finished at: 2020-03-28T03:33:28Z
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy (default-deploy) on project YYY-core: ArtifactDeployerException: Failed to deploy artifacts: Could not transfer artifact com.github.YYY:YYY-core:jar:sources:VERSION from/to bintray-YYY-ZZZ (https://api.bintray.com/maven/YYY/ZZZ/YYY/;publish=1): Failed to transfer file: https://api.bintray.com/maven/YYY/ZZZ/YYY/;publish=1/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION-sources.jar. Return code is: 409, ReasonPhrase: Conflict. -> [Help 1]

Since your pom file isn't attached, I am relying on this example.
The 409 conflict is because you are publishing the same file name to the same path twice.
From the attached logs it looks like you are deploying YYY-core-VERSION-sources.jar twice (it has 2 entries of Installing and Uploading in the log). This means that you are trying to publish a jar with the same name and to the same path. This causes the conflict.
I don't know from the input you gave why you have two identical sources files. One solution, as you have mentioned, is to use the override flag ;override=1 as shown in the Upload API example. I would also take a look why you have 2 files while another collaborator has, probably, only one.

Related

Build failure: cannot download mule-extensions-3.8.3.pom unauthorized

I have problem with credentials to the repository-master.mulesoft.org
Could you help me?
[INFO] Building Mule connector-salesforce Application 1.0.0-SNAPSHOT
[INFO] --------------------------------------------------------------------- ---
[INFO] Downloading: https://repository- master.mulesoft.org/nexus/content/repositories/releases- ee/org/mule/extensions/mule-extensions/3.8.3/mule-extensions-3.8.3.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 23.892 s
download this to your local repository
https://repository.mulesoft.org/nexus/content/groups/public/org/mule/extensions/mule-extensions/3.8.3-SNAPSHOT/mule-extensions-3.8.3-20161125.034027-63.pom
under
[user].m2\repository\org\mule\extensions\mule-extensions\3.8.3

Maven clean install only works with sudo on a certain project?

Without getting into the details of my project. I am wondering if this is a common issue. without sudo I get NPM errors. NPM was installed correctly. On MAC Yosemite?
error below
C00427#C17PN92CG8WN ~/s/c/ui>
mvn clean install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ACS.org CQ5 --> PARENT --> UI 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # ui ---
[INFO] Deleting /Users/C00427/sites/cq5/ui/target
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.180 s
[INFO] Finished at: 2015-11-12T09:59:46-05:00
[INFO] Final Memory: 15M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project ui: Failed to clean project: Failed to delete /Users/C00427/sites/cq5/ui/target/org.acs.cq-code-1.0-SNAPSHOT.jar -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
C00427#C17PN92CG8WN ~/s/c/ui>
If I use sudo it works perfectly fine
C00427#C17PN92CG8WN ~/s/c/ui> sudo mvn clean install
Password:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ACS.org CQ5 --> PARENT --> UI 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # ui ---
[INFO] Deleting /Users/C00427/sites/cq5/ui/target
[INFO]
[INFO] --- frontend-maven-plugin:0.0.25:install-node-and-npm (install node and npm) # ui ---
[INFO] Node v5.0.0 is already installed.
[INFO] Found NPM version 3.3.9
[INFO]
[INFO] --- frontend-maven-plugin:0.0.25:npm (npm install) # ui ---
[INFO] Running 'npm install --color=false' in /Users/C00427/sites/cq5/ui
[ERROR] npm WARN EPACKAGEJSON ui#0.0.0 No repository field.
[INFO]
[INFO] --- frontend-maven-plugin:0.0.25:gulp (gulp build) # ui ---
[INFO] Running 'gulp.js --no-color' in /Users/C00427/sites/cq5/ui
[INFO] [10:02:23] Using gulpfile ~/sites/cq5/ui/gulpfile.js
[INFO] [10:02:23] Starting 'default'...
[INFO] [10:02:23] Starting 'coffee'...
[INFO] [10:02:23] Finished 'default' after 11 ms
[INFO] [10:02:24] Finished 'coffee' after 657 ms
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # ui ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 6 resources to META-INF
[INFO] Copying 2093 resources to jcr_root
[INFO]
[INFO] --- maven-dependency-plugin:2.9:copy-dependencies (copy-bundles) # ui ---
[INFO] Copying jackson-databind-2.5.1.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/jackson-databind-2.5.1.jar
[INFO] Copying org.apache.sling.models.api-1.1.0.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/org.apache.sling.models.api-1.1.0.jar
[INFO] Copying guice-1.0.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/guice-1.0.jar
[INFO] Copying commons-lang3-3.0.1.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/commons-lang3-3.0.1.jar
[INFO] Copying com.springsource.org.apache.commons.codec-1.3.0.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/com.springsource.org.apache.commons.codec-1.3.0.jar
[INFO] Copying com.springsource.org.apache.commons.logging-1.1.1.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/com.springsource.org.apache.commons.logging-1.1.1.jar
[INFO] Copying com.springsource.org.aopalliance-1.0.0.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/com.springsource.org.aopalliance-1.0.0.jar
[INFO] Copying com.springsource.org.cyberneko.html-1.9.13.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/com.springsource.org.cyberneko.html-1.9.13.jar
[INFO] Copying com.springsource.org.apache.commons.httpclient-3.1.0.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/com.springsource.org.apache.commons.httpclient-3.1.0.jar
[INFO] Copying jackson-annotations-2.5.1.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/jackson-annotations-2.5.1.jar
[INFO] Copying com.springsource.org.apache.httpcomponents.httpclient-4.1.1.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/com.springsource.org.apache.httpcomponents.httpclient-4.1.1.jar
[INFO] Copying groovy-all-2.3.8.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/groovy-all-2.3.8.jar
[INFO] Copying com.springsource.org.apache.httpcomponents.httpcore-4.1.1.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/com.springsource.org.apache.httpcomponents.httpcore-4.1.1.jar
[INFO] Copying commons-beanutils-1.8.3.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/commons-beanutils-1.8.3.jar
[INFO] Copying commons-logging-1.1.1.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/commons-logging-1.1.1.jar
[INFO] Copying jackson-core-2.5.1.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/jackson-core-2.5.1.jar
[INFO] Copying com.springsource.org.apache.xmlcommons-1.3.4.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/com.springsource.org.apache.xmlcommons-1.3.4.jar
[INFO] Copying io.wcm.cq5.sling.models-1.0.0.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/io.wcm.cq5.sling.models-1.0.0.jar
[INFO] Copying com.springsource.org.openid4java-0.9.6.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/com.springsource.org.openid4java-0.9.6.jar
[INFO] Copying com.springsource.org.apache.xerces-2.9.1.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/com.springsource.org.apache.xerces-2.9.1.jar
[INFO] Copying org.apache.sling.models.impl-1.1.0.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/org.apache.sling.models.impl-1.1.0.jar
[INFO] Copying com.springsource.org.apache.httpcomponents.httpmime-4.1.1.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/com.springsource.org.apache.httpcomponents.httpmime-4.1.1.jar
[INFO] Copying com.springsource.org.apache.httpcomponents.httpclient-cache-4.1.1.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/com.springsource.org.apache.httpcomponents.httpclient-cache-4.1.1.jar
[INFO] Copying ehcache-2.7.0.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/ehcache-2.7.0.jar
[INFO] Copying com.springsource.org.apache.xml.resolver-1.2.0.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/com.springsource.org.apache.xml.resolver-1.2.0.jar
[INFO] Copying com.springsource.com.google.inject-2.0.0.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/com.springsource.com.google.inject-2.0.0.jar
[INFO] Copying com.springsource.net.spy.memcached-2.5.0.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/com.springsource.net.spy.memcached-2.5.0.jar
[INFO]
[INFO] --- maven-compiler-plugin:3.2:compile (default-compile) # ui ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # ui ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/C00427/sites/cq5/ui/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) # ui ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) # ui ---
[INFO] No tests to run.
[INFO]
[INFO] --- replacer:1.5.0:replace (default) # ui ---
[INFO] Replacement run on 1 file.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) # ui ---
[INFO] Building jar: /Users/C00427/sites/cq5/ui/target/org.acs.cq-code-1.0-SNAPSHOT.jar
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) # ui ---
[INFO] Installing /Users/C00427/sites/cq5/ui/target/org.acs.cq-code-1.0-SNAPSHOT.jar to /var/root/.m2/repository/org/acs/cq/ui/1.0-SNAPSHOT/ui-1.0-SNAPSHOT.jar
[INFO] Installing /Users/C00427/sites/cq5/ui/pom.xml to /var/root/.m2/repository/org/acs/cq/ui/1.0-SNAPSHOT/ui-1.0-SNAPSHOT.pom
[INFO]
[INFO] --- cq-deploy-plugin:0.0.4:install-package (install-package-author) # ui ---
[INFO] execute
[INFO] Connecting to server: http://localhost:4502
[INFO] Connecting with user: admin
[INFO] Deleting package at path: org.acs.cq-code-1.0-SNAPSHOT.jar
[WARNING] Delete failed: no package
[WARNING] Delete failed with jar, trying with zip.
[INFO] Deleting package at path: org.acs.cq-code-1.0-SNAPSHOT.zip
[INFO] Delete succeeded
[INFO] Uploading package /Users/C00427/sites/cq5/ui/target/org.acs.cq-code-1.0-SNAPSHOT.jar to path: org.acs.cq-code-1.0-SNAPSHOT.jar
[INFO] Upload succeeded
[INFO] Package upload successful
[INFO] Installing package at path: org.acs.cq-code-1.0-SNAPSHOT.jar
[WARNING] Installation failed: no package
[WARNING] Installation failed with jar, trying with zip.
[INFO] Installing package at path: org.acs.cq-code-1.0-SNAPSHOT.zip
[INFO] Installation succeeded
[INFO] Package installation successful
[INFO] Package Upload/Installation Completed Successfully
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.859 s
[INFO] Finished at: 2015-11-12T10:02:36-05:00
[INFO] Final Memory: 28M/514M
[INFO] ------------------------------------------------------------------------
The Issue was resolved by reinstalling NPM. As many times as I tried to uninstall and install NPM, i never deleted hidden files that were left over inside usr/ folder.
I don't really understand why sudo worked. But the issue was resolved.

How to run Griffon application successfully?

I am new to Griffon 2 Framework. I am going to create new project using Griffon 2. I am going with http://griffon-framework.org/tutorials/1_getting_started.html reference. I am able to create new project successfully but when I run project using maven then project clean install Success but not run. I get following output on "mvn clean install"
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Unnamed - com.griffon:sample:jar:0.1.0-SNAPSHOT
[INFO] task-segment: [clean, install]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] Deleting /home/piyush/Documents/GriffonExample/sample/target
[INFO] [jacoco:prepare-agent {execution: prepare-agent}]
[INFO] argLine set to -javaagent:/home/piyush/.m2/repository/org/jacoco/org.jacoco.agent/0.7.3.201502191951/org.jacoco.agent-0.7.3.201502191951-runtime.jar=destfile=/home/piyush/Documents/GriffonExample/sample/target/jacoco.exec
[INFO] [build-helper:add-source {execution: add-source}]
[INFO] Source directory: /home/piyush/Documents/GriffonExample/sample/griffon-app/conf added.
[INFO] Source directory: /home/piyush/Documents/GriffonExample/sample/griffon-app/controllers added.
[INFO] Source directory: /home/piyush/Documents/GriffonExample/sample/griffon-app/models added.
[INFO] Source directory: /home/piyush/Documents/GriffonExample/sample/griffon-app/services added.
[INFO] Source directory: /home/piyush/Documents/GriffonExample/sample/griffon-app/views added.
[INFO] Source directory: /home/piyush/Documents/GriffonExample/sample/griffon-app/lifecycle added.
[INFO] [processor:process {execution: default}]
[WARNING] No processors specified. Using default discovery mechanism.
[INFO] [build-helper:add-resource {execution: add-resource}]
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 1 resource
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 8 source files to /home/piyush/Documents/GriffonExample/sample/target/classes
[INFO] [gplus:compile {execution: default}]
[ERROR] Unable to determine Groovy version. Is Groovy declared as a dependency?
[ERROR] Unable to determine Groovy version. Is Groovy declared as a dependency?
[ERROR] Unable to determine Groovy version. Is Groovy declared as a dependency?
[ERROR] Unable to determine Groovy version. Is Groovy declared as a dependency?
[ERROR] Your Groovy version (null) doesn't support compilation. The minimum version of Groovy required is 1.5.0. Skipping compiling.
[WARNING] DEPRECATED [tasks]: Use target instead
[INFO] [antrun:run {execution: process-resources}]
[WARNING] Parameter tasks is deprecated, use target instead
[INFO] Executing tasks
main:
[copy] Copied 1 empty directory to 1 empty directory under /home/piyush/Documents/GriffonExample/sample/target/test-classes
[copy] Copying 1 file to /home/piyush/Documents/GriffonExample/sample/target/classes
[copy] Copying 8 files to /home/piyush/Documents/GriffonExample/sample/target/classes
[copy] Copying 2 files to /home/piyush/Documents/GriffonExample/sample/target/classes
[copy] Copying 1 file to /home/piyush/Documents/GriffonExample/sample/target/classes
[INFO] Executed tasks
[INFO] [resources:testResources {execution: default-testResources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /home/piyush/Documents/GriffonExample/sample/target/test-classes
[INFO] [gplus:testCompile {execution: default}]
[INFO] No sources specified for compilation. Skipping.
[INFO] [surefire:test {execution: default-test}]
[INFO] Surefire report directory: /home/piyush/Documents/GriffonExample/sample/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.gt.SignUpControllerTest
[2015-07-04 15:19:12,515] [main] INFO org.codehaus.griffon.runtime.core.DefaultApplicationBootstrapper - Griffon 2.3.0
[2015-07-04 15:19:12,516] [main] INFO org.codehaus.griffon.runtime.core.DefaultApplicationBootstrapper - Build: 2015-06-02T23:14:51.218+0200
[2015-07-04 15:19:12,516] [main] INFO org.codehaus.griffon.runtime.core.DefaultApplicationBootstrapper - JVM: 1.7.0_80 (Oracle Corporation 24.80-b11)
[2015-07-04 15:19:12,516] [main] INFO org.codehaus.griffon.runtime.core.DefaultApplicationBootstrapper - OS: Linux 3.13.0-37-generic amd64
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.236 sec - in com.gt.SignUpControllerTest
Results :
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] [jar:jar {execution: default-jar}]
[INFO] Building jar: /home/piyush/Documents/GriffonExample/sample/target/sample-0.1.0-SNAPSHOT.jar
[INFO] [site:attach-descriptor {execution: attach-descriptor}]
[INFO] [checkstyle:checkstyle {execution: run-checkstyle}]
[INFO]
[INFO] There are 1 checkstyle errors.
[WARNING] Unable to locate Source XRef to link to - DISABLED
[INFO] [install:install {execution: default-install}]
[INFO] Installing /home/piyush/Documents/GriffonExample/sample/target/sample-0.1.0-SNAPSHOT.jar to /home/piyush/.m2/repository/com/griffon/sample/0.1.0-SNAPSHOT/sample-0.1.0-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18 seconds
[INFO] Finished at: Sat Jul 04 15:19:19 IST 2015
[INFO] Final Memory: 74M/369M
[INFO] ------------------------------------------------------------------------
but when I run project with "mvn Prun" I get following error.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Invalid task 'Prun': you must specify a valid lifecycle phase, or a goal in the format plugin:goal or pluginGroupId:pluginArtifactId:pluginVersion:goal
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Sat Jul 04 15:22:59 IST 2015
[INFO] Final Memory: 2M/74M
[INFO] ------------------------------------------------------------------------
any one help me run Griffon 2 project?

maven deploy + nexus failed on bad request

I am experiencing some problems with my build process.
the build is finishing fine and Jenkins starts to upload files to nexus. everything works well, but then it fails for some reason, the weirdest part is that the file that is mentioned to not be uploaded is actually uploaded and i can find it in nexus.
here is the output:
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] pn-parent
[INFO] pn-domain
[INFO] pn-infra
[INFO] pn-config
[INFO] datalink-repository
[INFO] pn-service
[INFO] pn-backend
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building pn-parent 0.0.707
[INFO] ------------------------------------------------------------------------
[WARNING] The artifact junit:junit-dep:pom:4.11 has been relocated to junit:junit:pom:4.11
[INFO]
[INFO] --- maven-jar-plugin:2.5:jar (default-cli) # pn-parent ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: /var/lib/jenkins/jobs/webapps-server-side-release/workspace/pn-parent/target/pn-parent-0.0.707.jar
[INFO]
[INFO] --- maven-deploy-plugin:2.7:deploy (default-cli) # pn-parent ---
Uploading: http://maven.mycompany.com:8081/nexus/content/repositories/releases/com/mycompany/pn-parent/0.0.707/pn-parent-0.0.707.pom
Uploaded: http://maven.mycompany.com:8081/nexus/content/repositories/releases/com/mycompany/pn-parent/0.0.707/pn-parent-0.0.707.pom (15 KB at 111.6 KB/sec)
Downloading: http://maven.mycompany.com:8081/nexus/content/repositories/releases/com/mycompany/pn-parent/maven-metadata.xml
Downloaded: http://maven.mycompany.com:8081/nexus/content/repositories/releases/com/mycompany/pn-parent/maven-metadata.xml (21 KB at 1036.9 KB/sec)
Uploading: http://maven.mycompany.com:8081/nexus/content/repositories/releases/com/mycompany/pn-parent/maven-metadata.xml
Uploaded: http://maven.mycompany.com:8081/nexus/content/repositories/releases/com/mycompany/pn-parent/maven-metadata.xml (21 KB at 864.7 KB/sec)
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building pn-domain 0.0.707
[INFO] ------------------------------------------------------------------------
[WARNING] The artifact junit:junit-dep:pom:4.11 has been relocated to junit:junit:pom:4.11
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-cli) # pn-domain ---
[INFO]
[INFO] --- maven-deploy-plugin:2.7:deploy (default-cli) # pn-domain ---
Uploading: http://maven.mycompany.com:8081/nexus/content/repositories/releases/com/mycompany/pn-domain/0.0.707/pn-domain-0.0.707.jar
Uploaded: http://maven.mycompany.com:8081/nexus/content/repositories/releases/com/mycompany/datalink-repository/0.0.707/datalink-repository-0.0.707.jar (624 KB at 7606.1 KB/sec)
Uploading: http://maven.mycompany.com:8081/nexus/content/repositories/releases/com/mycompany/datalink-repository/0.0.707/datalink-repository-0.0.707.pom
2/4 KB
4/4 KB
Uploaded: http://maven.mycompany.com:8081/nexus/content/repositories/releases/com/mycompany/datalink-repository/0.0.707/datalink-repository-0.0.707.pom (4 KB at 93.0 KB/sec)
Downloading: http://maven.mycompany.com:8081/nexus/content/repositories/releases/com/mycompany/datalink-repository/maven-metadata.xml
Downloaded: http://maven.mycompany.com:8081/nexus/content/repositories/releases/com/mycompany/datalink-repository/maven-metadata.xml (21 KB at 1382.8 KB/sec)
Uploading: http://maven.mycompany.com:8081/nexus/content/repositories/releases/com/mycompany/datalink-repository/maven-metadata.xml
Uploaded: http://maven.mycompany.com:8081/nexus/content/repositories/releases/com/mycompany/datalink-repository/maven-metadata.xml (21 KB at 1037.8 KB/sec)
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building pn-service 0.0.707
[INFO] ------------------------------------------------------------------------
[WARNING] The artifact junit:junit-dep:pom:4.11 has been relocated to junit:junit:pom:4.11
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-cli) # pn-service ---
[INFO]
[INFO] --- maven-deploy-plugin:2.7:deploy (default-cli) # pn-service ---
Uploading: http://maven.mycompany.com:8081/nexus/content/repositories/releases/com/mycompany/pn-service/0.0.707/pn-service-0.0.707.jar
Uploaded: http://maven.mycompany.com:8081/nexus/content/repositories/releases/com/mycompany/pn/pn-backend/0.0.707/pn-backend-0.0.707.war (1247 KB at 19480.3 KB/sec)
Uploading: http://maven.mycompany.com:8081/nexus/content/repositories/releases/com/mycompany/pn/pn-backend/0.0.707/pn-backend-0.0.707.pom
Uploaded: http://maven.mycompany.com:8081/nexus/content/repositories/releases/com/mycompany/pn/pn-backend/0.0.707/pn-backend-0.0.707.pom (11 KB at 376.2 KB/sec)
Downloading: http://maven.mycompany.com:8081/nexus/content/repositories/releases/com/mycompany/pn/pn-backend/maven-metadata.xml
Downloaded: http://maven.mycompany.com:8081/nexus/content/repositories/releases/com/mycompany/pn/pn-backend/maven-metadata.xml (21 KB at 1213.1 KB/sec)
Uploading: http://maven.mycompany.com:8081/nexus/content/repositories/releases/com/mycompany/pn/pn-backend/maven-metadata.xml
Uploaded: http://maven.mycompany.com:8081/nexus/content/repositories/releases/com/mycompany/pn/pn-backend/maven-metadata.xml (21 KB at 1031.7 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] pn-parent ................................... SUCCESS [ 1.081 s]
[INFO] pn-domain ................................... SUCCESS [ 0.696 s]
[INFO] pn-infra .................................... SUCCESS [ 0.295 s]
[INFO] pn-config ................................... SUCCESS [ 0.275 s]
[INFO] datalink-repository ............................... SUCCESS [ 0.390 s]
[INFO] pn-service .................................. SUCCESS [ 0.475 s]
[INFO] pn-backend .................................. SUCCESS [ 1.043 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.234 s
[INFO] Finished at: 2014-07-17T14:31:30+00:00
[INFO] Final Memory: 19M/206M
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile "release" could not be activated because it does not exist.
using global settings config with name mycompany-global-dev-maven-settings
[workspace] $ /var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/Maven-3.1.1/bin/mvn -gs /tmp/global-settings8833627416958413984.xml deploy:deploy-file -Durl=http://maven.mycompany.com:8081/nexus/content/repositories/releases/ -DrepositoryId=mycompany.repository -DpomFile=pn-parent/Backend/pom.xml -Dfile=pn-parent/Backend/target/pn-backend.war
[WARNING]
[WARNING] Some problems were encountered while building the effective settings
[WARNING] 'usePluginRegistry' is deprecated and has no effect. # /var/lib/jenkins/.m2/settings.xml
[WARNING]
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-deploy-plugin:2.7:deploy-file (default-cli) # standalone-pom ---
Uploading: http://maven.mycompany.com:8081/nexus/content/repositories/releases/com/mycompany/pn/pn-backend/0.0.707/pn-backend-0.0.707.war
...
Uploading: http://maven.mycompany.com:8081/nexus/content/repositories/releases/com/mycompany/pn/pn-backend/0.0.707/pn-backend-0.0.707.pom
2/11 KB
4/11 KB
6/11 KB
8/11 KB
10/11 KB
11/11 KB
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.928 s
[INFO] Finished at: 2014-07-17T14:31:33+00:00
[INFO] Final Memory: 6M/142M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy-file (default-cli) on project standalone-pom: Failed to deploy artifacts: Could not transfer artifact com.mycompany.pn:pn-backend:war:0.0.707 from/to mycompany.repository (http://maven.mycompany.com:8081/nexus/content/repositories/releases/): Failed to transfer file: http://maven.mycompany.com:8081/nexus/content/repositories/releases/com/mycompany/pn/pn-backend/0.0.707/pn-backend-0.0.707.war. Return code is: 400, ReasonPhrase: Bad Request. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Build step 'Conditional steps (multiple)' marked build as failure
[locks-and-latches] Releasing all the locks
[locks-and-latches] All the locks released
[Current build status] check if current [FAILURE] is worse or equals then [SUCCESS] and better or equals then [SUCCESS]
Run condition [Current build status] preventing perform for step [Record JaCoCo coverage report]
Description set:
Start to submit Nexus scheduled tasks.
Submitting... [id: 36, name: release-build, type: Rebuild Maven Metadata Files]
End to submit Nexus scheduled tasks successfully.
Notifying upstream projects of job completion
Finished: FAILURE
A colleague of mine just ran into the same problem with maven attempting to upload artifacts twice.
We found some help in the forums, links included below.
Bae's answer did the trick for us:
Try running mvn -Prelease-profile help:effective-pom. You will find
that you have two execution sections for maven-source-plugin
[...]
To fix this problem, find everywhere you have used
maven-sources-plugin and make sure that you use the "id"
attach-sources so that it is the same as the release profile. Then
these sections will be merged. Best practice says that to get
consistency you need to configure this in the root pom of your project
in build > pluginManagement and NOT in your child poms. In the child
pom you just specify in build > plugins that you want to use
maven-source-plugin but you provide no executions.
Nexus accepts upload but says it failed and Maven release plugin fails : source artifacts getting deployed twice
snapshot and release confliction also results in 400 bad request. The project you are trying to update may be a snapshot like this in pom:
<version>0.0.1-SNAPSHOT</version>
while the repository in settings.xml rejects snapshot. solution:
<version>0.0.1</version>
This also happens the other way round: trying to deploy a release (version has no snapshot) version to a snapshot repository.
I also came across this problem. In my case I'd configured the Nexus repository policy to accept release artefacts but I was actually pushing a snapshot artefact to the repo. Since I wanted a snapshot repo I simply changed the policy and all was well.
This happened to me as well. In my case, I was deploying a release version. To fix, make sure the version number doesn't exist in Nexus yet. If it's a multi-module project, check the sub-modules' versions as well.

Maven Dependency Plugin appendOutput Parameter is Failing?

UPDATE: This issue seems to have resolved itself. I could still produce it on a copy of the source code, but it was a temporary copy that I deleted before realizing I would need it to pin this issue down. I'm continuing to track this and see if I can identify a root cause. If not, I will close the issue.
When I run mvn dependency:list -DoutputFile=/path/to/file.txt -DappendOutput=true from the root directory of a multi-module Maven project, the resultant output file only contains the dependencies of the last module declared in the modules section of the root pom.xml file. Is there something different I need to do to get the output of each submodule to append to the output file?
Configuration:
Maven 3.0.3
maven-dependency-plugin 2.6
When I'm using the following command: -
mvn dependency:list -DoutputFile=/path/to/file.txt -DappendOutput=true
The result is invalid and the Maven told me that
[INFO] --- maven-dependency-plugin:2.1:list (default-cli) # ...
Then I change to specify the version
mvn org.apache.maven.plugins:maven-dependency-plugin:2.6:list -DoutputFile=/path/to/file.txt -DappendOutput=true
The result is valid and the Maven told me that
[INFO] --- maven-dependency-plugin:2.6:list (default-cli) # ...
I would suggest you to ensure that the executing is the version 2.6. Anyhow I always use the following command as
mvn dependency:list > /path/to/file.txt
IMHO the result is better and more clear for each module as the following example: -
[INFO] Scanning for projects...
[INFO] -------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] my-parent
[INFO] my-sub1
[INFO] my-sub2
[INFO]
[INFO] -------------------------------------------------------------------
[INFO] Building my-parent
[INFO] -------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.1:list (default-cli) # my-parent ---
[INFO]
[INFO] The following files have been resolved:
...
[INFO] -------------------------------------------------------------------
[INFO] Building my-sub1
[INFO] -------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.1:list (default-cli) # my-sub1 ---
[INFO]
[INFO] The following files have been resolved:
...
[INFO] -------------------------------------------------------------------
[INFO] Building my-sub2
[INFO] -------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.1:list (default-cli) # my-sub2 ---
[INFO]
[INFO] The following files have been resolved:
...
[INFO]
[INFO] -------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] my-parent ........................................ SUCCESS [0.745s]
[INFO] my-sub1 .......................................... SUCCESS [0.675s]
[INFO] my-sub2 .......................................... SUCCESS [0.671s]
[INFO] -------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] -------------------------------------------------------------------
[INFO] Total time: 2.938s
[INFO] Finished at: Fri Mar 01 17:01:39 ICT 2013
[INFO] Final Memory: 17M/218M
[INFO] -------------------------------------------------------------------
I hope this may help.
Regards,
Charlee Ch.

Resources