Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Not A Bug
-
Affects Version/s: 1.5
-
Fix Version/s: None
-
Labels:None
-
Environment:HideApache Maven 3.0 (r1004208; 2010-10-04 13:50:56+0200)
Java version: 1.6.0_22
Java home: /usr/lib/jvm/java-6-sun-1.6.0.22/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux" version: "2.6.32-25-generic-pae" arch: "i386" Family: "unix"
ShowApache Maven 3.0 (r1004208; 2010-10-04 13:50:56+0200) Java version: 1.6.0_22 Java home: /usr/lib/jvm/java-6-sun-1.6.0.22/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux" version: "2.6.32-25-generic-pae" arch: "i386" Family: "unix"
-
Testcase included:yes
-
Number of attachments :1
Description
When I build http://code.google.com/p/mycila/source/browse/mycila-testing/trunk?r=1448 on revision 1448, the build failed. r1449 is a workaround.
the maven command is : mvn clean deploy
the build failed when running plugin invoker:run with maven3 BUT succeed with maven2
the failure is due of a missing artifact in the its local repository, the searched version is a SNAPSHOT, the present version is a timestamped SNAPSHOT
the dependency com.mycila.testing:mycila-testing-api:jar:2.6-SNAPSHOT is not found because the invoker:install copy the SNAPSHOT with the timestamp during deploy. And then after during the test, the dependency could not be found. The reason is because maven3 always deploy using a timestamped version.
! workaround
remove <localRepositoryPath>$
/local-repo</localRepositoryPath> from the invoker configuration
-
- MINVOKER-107.diff
- 21/Sep/11 11:19 AM
- 0.7 kB
- Tony Chemit
Activity
Your workaround is not acceptable for me : using directly the local repository spoils it.
We have the same problem on the project http://svn.nuiton.org/svn/topia/trunk/, but what is amazing is that sometimes it works and some other time it does NOT :
Example (not working):
[INFO] Installing /home/maven-release/projets/nuiton-central/topia/pom.xml to /home/maven-release/projets/nuiton-central/topia/topia-persistence/target/local-repo/org/nuiton/topia/2.6.2-SNAPSHOT/topia-2.6.2-20110921.121707-5.pom
Example (is working):
[INFO] Installing /home/tchemit/projets/nuiton-central/topia/pom.xml to /home/tchemit/projets/nuiton-central/topia/topia-persistence/target/local-repo/org/nuiton/topia/2.6.2-SNAPSHOT/topia-2.6.2-SNAPSHOT.pom
Is there a problem with the ArtifactInstaller tool ?
In our case the problem occurs only on the parent pom, the pom of the project using the invoker plugin is ok :
[INFO] Installing /home/maven-release/projets/nuiton-central/topia/pom.xml to /home/maven-release/projets/nuiton-central/topia/topia-persistence/target/local-repo/org/nuiton/topia/2.6.2-SNAPSHOT/topia-2.6.2-20110921.143434-8.pom [INFO] Installing /home/maven-release/projets/nuiton-central/topia/topia-persistence/pom.xml to /home/maven-release/projets/nuiton-central/topia/topia-persistence/target/local-repo/org/nuiton/topia/topia-persistence/2.6.2-SNAPSHOT/topia-persistence-2.6.2-SNAPSHOT.pom [INFO] Installing /home/maven-release/projets/nuiton-central/topia/topia-persistence/target/topia-persistence-2.6.2-SNAPSHOT.jar to /home/maven-release/projets/nuiton-central/topia/topia-persistence/target/local-repo/org/nuiton/topia/topia-persistence/2.6.2-SNAPSHOT/topia-persistence-2.6.2-SNAPSHOT.jar
Here is patch which fix the problem.
It works fine (all its are ok except the one which was already broken before the patch).
I don't know exatcly the ArtifactInstaller api with also the ArtifactTransformation one.
Hope somebody can have a look at it and correct the patch if required.
Thanks.
Tony, could you add an unit-test or IT to verify this and to prevent regression?
I tried to make a IT but could not reproduce the bug... Still I have the problem in real life.
IMHO mine is an acceptable one, ludovic workaround is not acceptable since you can not ask maven user to spoil his local repository with its (but you can do it for yourself).
My ultimate workaround is to NOT deploy for a snapshot with running its at the same time ![]()
Robert :
Tony, could you add an unit-test or IT to verify this and to prevent regression?
I found a project in the haus which predocue this problem : the webstart-maven-plugin.
svn : https://svn.codehaus.org/mojo/trunk/mojo/webstart/webstart-maven-plugin
Just try a mvn clean deploy and it will failed ![]()
ok, got it. Somehow the clean seems to cause trouble: I've tried mvn deploy twice without any problem. To be continued.
Tony, I've tried to reproduce this issue and somehow I can't anymore. Are you still having this issue?
Robert, Same for me, I can no more reproduce it on the webstart project. I will try with other projects I know it fails
This issue is a bug and is repeatable for me. The invoker plugin installs shapshot versions of artefacts but this happens ONLY if running:
mvn clean deploy
and NOT if running:
mvn clean verify
So it is the deployment of artefacts that somehow renders -SNAPSHOT versions to concrete numbered revisions. Build logs from our Bamboo where this is apparent:
Passing build (mvn clean verify):
http://builds.carrot2.org/browse/RNDTEST-MASTER-JOB1-109/log
Failing build (mvn clean deploy):
http://builds.carrot2.org/browse/RNDTEST-MASTER-JOB1-108/log
Passing build's invoker install section:
22-Jan-2012 11:31:03 [INFO] --- maven-invoker-plugin:1.5:install (integration-test) @ junit4-maven-plugin-tests --- 22-Jan-2012 11:31:04 [INFO] Installing /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/runner/pom.xml to /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/integration-maven/junit4-maven-plugin-tests/target/local-repo/com/carrotsearch/randomizedtesting/randomizedtesting-runner/0.0.5-SNAPSHOT/randomizedtesting-runner-0.0.5-SNAPSHOT.pom 22-Jan-2012 11:31:04 [INFO] Installing /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/runner/target/randomizedtesting-runner-0.0.5-SNAPSHOT.jar to /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/integration-maven/junit4-maven-plugin-tests/target/local-repo/com/carrotsearch/randomizedtesting/randomizedtesting-runner/0.0.5-SNAPSHOT/randomizedtesting-runner-0.0.5-SNAPSHOT.jar 22-Jan-2012 11:31:04 [INFO] Installing /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/pom.xml to /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/integration-maven/junit4-maven-plugin-tests/target/local-repo/com/carrotsearch/randomizedtesting/randomizedtesting-parent/0.0.5-SNAPSHOT/randomizedtesting-parent-0.0.5-SNAPSHOT.pom 22-Jan-2012 11:31:04 [INFO] Installing /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/integration-maven/junit4-maven-plugin/pom.xml to /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/integration-maven/junit4-maven-plugin-tests/target/local-repo/com/carrotsearch/randomizedtesting/junit4-maven-plugin/0.0.5-SNAPSHOT/junit4-maven-plugin-0.0.5-SNAPSHOT.pom 22-Jan-2012 11:31:04 [INFO] Installing /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/integration-maven/junit4-maven-plugin/target/junit4-maven-plugin-0.0.5-SNAPSHOT.jar to /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/integration-maven/junit4-maven-plugin-tests/target/local-repo/com/carrotsearch/randomizedtesting/junit4-maven-plugin/0.0.5-SNAPSHOT/junit4-maven-plugin-0.0.5-SNAPSHOT.jar 22-Jan-2012 11:31:04 [INFO] Installing /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/integration-ant/ant-junit4/pom.xml to /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/integration-maven/junit4-maven-plugin-tests/target/local-repo/com/carrotsearch/randomizedtesting/ant-junit4/0.0.5-SNAPSHOT/ant-junit4-0.0.5-SNAPSHOT.pom 22-Jan-2012 11:31:04 [INFO] Installing /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/integration-ant/ant-junit4/target/ant-junit4-0.0.5-SNAPSHOT.jar to /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/integration-maven/junit4-maven-plugin-tests/target/local-repo/com/carrotsearch/randomizedtesting/ant-junit4/0.0.5-SNAPSHOT/ant-junit4-0.0.5-SNAPSHOT.jar 22-Jan-2012 11:31:04 [INFO] Installing /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/integration-maven/junit4-maven-plugin-tests/pom.xml to /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/integration-maven/junit4-maven-plugin-tests/target/local-repo/com/carrotsearch/randomizedtesting/junit4-maven-plugin-tests/0.0.5-SNAPSHOT/junit4-maven-plugin-tests-0.0.5-SNAPSHOT.pom 22-Jan-2012 11:31:04 [INFO] Installing /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/integration-maven/junit4-maven-plugin-tests/target/junit4-maven-plugin-tests-0.0.5-SNAPSHOT.jar to /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/integration-maven/junit4-maven-plugin-tests/target/local-repo/com/carrotsearch/randomizedtesting/junit4-maven-plugin-tests/0.0.5-SNAPSHOT/junit4-maven-plugin-tests-0.0.5-SNAPSHOT.jar
Failing build's invoker install section:
22-Jan-2012 11:26:32 [INFO] --- maven-invoker-plugin:1.5:install (integration-test) @ junit4-maven-plugin-tests --- 22-Jan-2012 11:26:33 [INFO] Installing /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/runner/pom.xml to /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/integration-maven/junit4-maven-plugin-tests/target/local-repo/com/carrotsearch/randomizedtesting/randomizedtesting-runner/0.0.5-SNAPSHOT/randomizedtesting-runner-0.0.5-SNAPSHOT.pom 22-Jan-2012 11:26:33 [INFO] Installing /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/runner/target/randomizedtesting-runner-0.0.5-SNAPSHOT.jar to /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/integration-maven/junit4-maven-plugin-tests/target/local-repo/com/carrotsearch/randomizedtesting/randomizedtesting-runner/0.0.5-SNAPSHOT/randomizedtesting-runner-0.0.5-20120122.102516-54.jar 22-Jan-2012 11:26:33 [INFO] Installing /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/runner/pom.xml to /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/integration-maven/junit4-maven-plugin-tests/target/local-repo/com/carrotsearch/randomizedtesting/randomizedtesting-runner/0.0.5-SNAPSHOT/randomizedtesting-runner-0.0.5-20120122.102516-54.pom 22-Jan-2012 11:26:33 [INFO] Installing /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/pom.xml to /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/integration-maven/junit4-maven-plugin-tests/target/local-repo/com/carrotsearch/randomizedtesting/randomizedtesting-parent/0.0.5-SNAPSHOT/randomizedtesting-parent-0.0.5-20120122.102443-55.pom 22-Jan-2012 11:26:33 [INFO] Installing /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/integration-maven/junit4-maven-plugin/pom.xml to /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/integration-maven/junit4-maven-plugin-tests/target/local-repo/com/carrotsearch/randomizedtesting/junit4-maven-plugin/0.0.5-SNAPSHOT/junit4-maven-plugin-0.0.5-SNAPSHOT.pom 22-Jan-2012 11:26:33 [INFO] Installing /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/integration-maven/junit4-maven-plugin/target/junit4-maven-plugin-0.0.5-SNAPSHOT.jar to /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/integration-maven/junit4-maven-plugin-tests/target/local-repo/com/carrotsearch/randomizedtesting/junit4-maven-plugin/0.0.5-SNAPSHOT/junit4-maven-plugin-0.0.5-20120122.102625-6.jar 22-Jan-2012 11:26:33 [INFO] Installing /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/integration-maven/junit4-maven-plugin/pom.xml to /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/integration-maven/junit4-maven-plugin-tests/target/local-repo/com/carrotsearch/randomizedtesting/junit4-maven-plugin/0.0.5-SNAPSHOT/junit4-maven-plugin-0.0.5-20120122.102625-6.pom 22-Jan-2012 11:26:33 [INFO] Installing /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/integration-ant/ant-junit4/pom.xml to /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/integration-maven/junit4-maven-plugin-tests/target/local-repo/com/carrotsearch/randomizedtesting/ant-junit4/0.0.5-SNAPSHOT/ant-junit4-0.0.5-SNAPSHOT.pom 22-Jan-2012 11:26:33 [INFO] Installing /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/integration-ant/ant-junit4/target/ant-junit4-0.0.5-SNAPSHOT.jar to /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/integration-maven/junit4-maven-plugin-tests/target/local-repo/com/carrotsearch/randomizedtesting/ant-junit4/0.0.5-SNAPSHOT/ant-junit4-0.0.5-20120122.102614-54.jar 22-Jan-2012 11:26:33 [INFO] Installing /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/integration-ant/ant-junit4/pom.xml to /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/integration-maven/junit4-maven-plugin-tests/target/local-repo/com/carrotsearch/randomizedtesting/ant-junit4/0.0.5-SNAPSHOT/ant-junit4-0.0.5-20120122.102614-54.pom 22-Jan-2012 11:26:33 [INFO] Installing /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/integration-maven/junit4-maven-plugin-tests/pom.xml to /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/integration-maven/junit4-maven-plugin-tests/target/local-repo/com/carrotsearch/randomizedtesting/junit4-maven-plugin-tests/0.0.5-SNAPSHOT/junit4-maven-plugin-tests-0.0.5-SNAPSHOT.pom 22-Jan-2012 11:26:33 [INFO] Installing /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/integration-maven/junit4-maven-plugin-tests/target/junit4-maven-plugin-tests-0.0.5-SNAPSHOT.jar to /home/bamboo/bamboo3-work/xml-data/build-dir/RNDTEST-MASTER-JOB1/integration-maven/junit4-maven-plugin-tests/target/local-repo/com/carrotsearch/randomizedtesting/junit4-maven-plugin-tests/0.0.5-SNAPSHOT/junit4-maven-plugin-tests-0.0.5-SNAPSHOT.jar
Just for the record: I am able to regularly reproduce this bug in combination of Maven 3.0.3 and invoking deploy goal (I was baffled why it passes on me locally, and failing on CI: simply, I was doing as usual mvn clean install and CI was doing mvn clean deploy). This was stated above too by David.
OTOH, Maven 3.0.4 for me locally, does NOT triggers this bug, and the invoker:install step goes just fine with deploy goal invoked on CLI.
So for me, workaround is to upgrade CI to Maven 3.0.4 (as for me locally mvn clean deploy + Maven 3.0.4 does not fails, in contrary as doing same with Maven 3.0.3, which does).
I'd like to close this as "not a bug", the root cause seems to be in Maven and is fixed in version 3.0.4
TIPS : to make maven deploy working with http://code.google.com/p/mycila/source/browse/mycila-testing/trunk?r=1448, distributionManagement.snapshotRepository.url path in the root /pom.xml should be replaced with local file://