Hi Mirko,
>
I just tried this with a small multimodule pet project, see the mvn321
branch (https://github.com/1and1/testlink-junit/compare/master...mvn321).
Just forked it give it a try..
Now giving revision as a property (mvn321 -Drevision=NULL clean
verify) does *not* work, enforcer complains about being not able to
resolve the reactor artifacts. You have to put revision into the
environment, so
env revision=NULL mvn321 clean verify does the trick.
that looks strange...cause if i do that i get the following:
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (default-enforce) @
tljunit-surefire ---
Downloading:
http://localhost:8081/nexus/content/groups/public/net/oneandone/testlinkjunit/tljunit-parent/3.0.3-${revision}/tljunit-parent-3.0.3-${revision}.pom
[WARNING] Rule 3:
org.apache.maven.plugins.enforcer.RequireNoRepositories failed with message:
Could not transfer artifact
net.oneandone.testlinkjunit:tljunit-parent:pom:3.0.3-${revision} from/to
nexus (http://localhost:8081/nexus/content/groups/public): Illegal
character in path at index 100:
http://localhost:8081/nexus/content/groups/public/net/oneandone/testlinkjunit/tljunit-parent/3.0.3-${revision}/tljunit-parent-3.0.3-${revision}.pom
net.oneandone.testlinkjunit:tljunit-parent:pom:3.0.3-${revision}
from the specified remote repositories:
nexus (http://localhost:8081/nexus/content/groups/public,
releases=true, snapshots=true)
That looks like a issue with maven-enforcer .......i will start writing
an integration tests for that....
Furthermore i have taken a look into the project and found something
strange:
in the dependencyManagement of the parent:
<dependency>
<groupId>net.oneandone.testlinkjunit</groupId>
<artifactId>tljunit-surefire</artifactId>
<version>${project.version}</version>
<classifier>tests</classifier>
</dependency>
Should this reference the test-jar which is produced in the sub-module
by using maven-jar-plugin:test-jar goal ?
Yes...than the dependency entry is wrong. It must be done like the
following:
<dependency>
<groupId>net.oneandone.testlinkjunit</groupId>
<artifactId>tljunit-surefire</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
And this dependeny is used in the module:
<artifactId>tljunit-eclipse</artifactId>
which produces your error about the not resolvable artifact in the
reactor....
If you are using the maven-release-plugin you need to give the
parameters in a different way cause maven-release-plugin calls maven a
second time which will result in the following:
mvn -Drevision=NULL -Darguments="-Drevision=NULL" release:prepare
This looks a bit strange but it works except that i get a message about
not existing SNAPSHOT version...but no failure.....
If you enhance your configuration of the maven-release-plugin with the
following line:
<arguments>-Drevision=${revision}</arguments>
You can reduce the above call to:
mvn -Drevision=NULL release:prepare
Kind regards
Karl-Heinz Marbaise
--
SoftwareEntwicklung Beratung Schulung Tel.: +49 (0) 2405 / 415 893
Dipl.Ing.(FH) Karl-Heinz Marbaise ICQ#: 135949029
Hauptstrasse 177 USt.IdNr: DE191347579
52146 Würselen http://www.soebes.de
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]