You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Dan Tran <da...@gmail.com> on 2014/02/24 20:23:36 UTC
about https://jira.codehaus.org/browse/MNG-5576 (Allow continuous
delivery friendly versions)
Now that Maven 3.2.1 is out. May I ask how this may be used?
Thanks
-D
Re: about https://jira.codehaus.org/browse/MNG-5576 (Allow continuous
delivery friendly versions)
Posted by Mirko Friedenhagen <mf...@gmail.com>.
Hello Karl-Heinz,
thanks for you suggestions, I replaced classifier tests with type
test-jar. As you stated release:prepare does not work because I do not
have a SNAPSHOT-version. My other concern is still true, running:
env revision=NULL mvn321 clean install
still has the non-resolved property ${revision} in the installed pom
in my localRepository.
Regards Mirko
--
http://illegalstateexception.blogspot.com/
https://github.com/mfriedenhagen/ (http://osrc.dfm.io/mfriedenhagen)
https://bitbucket.org/mfriedenhagen/
On Mon, Feb 24, 2014 at 11:05 PM, Karl Heinz Marbaise <kh...@gmx.de> wrote:
> 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: about https://jira.codehaus.org/browse/MNG-5576 (Allow continuous
delivery friendly versions)
Posted by Karl Heinz Marbaise <kh...@gmx.de>.
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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: about https://jira.codehaus.org/browse/MNG-5576 (Allow continuous
delivery friendly versions)
Posted by Mirko Friedenhagen <mf...@gmail.com>.
Hello,
I just tried this with a small multimodule pet project, see the mvn321
branch (https://github.com/1and1/testlink-junit/compare/master...mvn321).
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.
Regards Mirko
--
http://illegalstateexception.blogspot.com/
https://github.com/mfriedenhagen/ (http://osrc.dfm.io/mfriedenhagen)
https://bitbucket.org/mfriedenhagen/
On Mon, Feb 24, 2014 at 9:23 PM, Karl Heinz Marbaise <kh...@gmx.de> wrote:
> Hi Dan,
>
> now you can write on your GAV definition a thing like:
>
> <groupId>...</groupId>
> <artifactId>...</artifactId>
> <version>1.0-${revision}-SNAPSHOT</version>
>
> and via command line you can now do the following:
>
> mvn -Drevision=3456 clean test
>
> If you done that via Maven 3.1.1 you get a warning with Maven 3.2.1 you
> don't.
>
> Kind regard
> Karl-Heinz Marbaise
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: about https://jira.codehaus.org/browse/MNG-5576 (Allow continuous
delivery friendly versions)
Posted by Mirko Friedenhagen <mf...@gmail.com>.
Hello,
I now removed "-SNAPSHOT" from the version strings, what I get now when running:
env revision=123456 mvn321 clean install
is:
Installing /Users/mirko/workspace/foss/testlink-junit/pom.xml to
/Software/nobackup/m2repo/net/oneandone/testlinkjunit/tljunit-parent/3.0.3-123456/tljunit-parent-3.0.3-123456.pom
and, which is really bad, when inspecting
tljunit-parent-3.0.3-123456.pom, the <version> is still
3.0.3-${revision}!
Regards Mirko
--
http://illegalstateexception.blogspot.com/
https://github.com/mfriedenhagen/ (http://osrc.dfm.io/mfriedenhagen)
https://bitbucket.org/mfriedenhagen/
On Mon, Feb 24, 2014 at 9:51 PM, Mirko Friedenhagen
<mf...@gmail.com> wrote:
> Hello,
>
> I now tried running `env revision=123456 mvn321 release:prepare`, but
> this does not work as release:prepare does not seem to use the
> information from the environment, I get:
> --- snip ---
> There are still some remaining snapshot dependencies.
> : Do you want to resolve them now? (yes/no) no: : no
> --- snap ---
> and release:prepare about:
> --- snip ---
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-release-plugin:2.4.2:prepare
> (default-cli) on project tljunit-parent: Can't release project due to
> non released dependencies :
> [ERROR] net.oneandone.testlinkjunit:tljunit-parent:pom:3.0.3-${revision}-SNAPSHOT
> [ERROR] in project 'tljunit surefire RunListeners'
> (net.oneandone.testlinkjunit:tljunit-surefire:jar:3.0.3-123456-SNAPSHOT)
> [ERROR] -> [Help 1]
> --- snap ---
> Regards Mirko
> --
> http://illegalstateexception.blogspot.com/
> https://github.com/mfriedenhagen/ (http://osrc.dfm.io/mfriedenhagen)
> https://bitbucket.org/mfriedenhagen/
>
>
> On Mon, Feb 24, 2014 at 9:31 PM, Dan Tran <da...@gmail.com> wrote:
>> Thanks, that helps
>>
>> -D
>>
>>
>> On Mon, Feb 24, 2014 at 12:23 PM, Karl Heinz Marbaise <kh...@gmx.de>wrote:
>>
>>> Hi Dan,
>>>
>>> now you can write on your GAV definition a thing like:
>>>
>>> <groupId>...</groupId>
>>> <artifactId>...</artifactId>
>>> <version>1.0-${revision}-SNAPSHOT</version>
>>>
>>> and via command line you can now do the following:
>>>
>>> mvn -Drevision=3456 clean test
>>>
>>> If you done that via Maven 3.1.1 you get a warning with Maven 3.2.1 you
>>> don't.
>>>
>>> Kind regard
>>> Karl-Heinz Marbaise
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: about https://jira.codehaus.org/browse/MNG-5576 (Allow continuous
delivery friendly versions)
Posted by Mirko Friedenhagen <mf...@gmail.com>.
Hello,
I now tried running `env revision=123456 mvn321 release:prepare`, but
this does not work as release:prepare does not seem to use the
information from the environment, I get:
--- snip ---
There are still some remaining snapshot dependencies.
: Do you want to resolve them now? (yes/no) no: : no
--- snap ---
and release:prepare about:
--- snip ---
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-release-plugin:2.4.2:prepare
(default-cli) on project tljunit-parent: Can't release project due to
non released dependencies :
[ERROR] net.oneandone.testlinkjunit:tljunit-parent:pom:3.0.3-${revision}-SNAPSHOT
[ERROR] in project 'tljunit surefire RunListeners'
(net.oneandone.testlinkjunit:tljunit-surefire:jar:3.0.3-123456-SNAPSHOT)
[ERROR] -> [Help 1]
--- snap ---
Regards Mirko
--
http://illegalstateexception.blogspot.com/
https://github.com/mfriedenhagen/ (http://osrc.dfm.io/mfriedenhagen)
https://bitbucket.org/mfriedenhagen/
On Mon, Feb 24, 2014 at 9:31 PM, Dan Tran <da...@gmail.com> wrote:
> Thanks, that helps
>
> -D
>
>
> On Mon, Feb 24, 2014 at 12:23 PM, Karl Heinz Marbaise <kh...@gmx.de>wrote:
>
>> Hi Dan,
>>
>> now you can write on your GAV definition a thing like:
>>
>> <groupId>...</groupId>
>> <artifactId>...</artifactId>
>> <version>1.0-${revision}-SNAPSHOT</version>
>>
>> and via command line you can now do the following:
>>
>> mvn -Drevision=3456 clean test
>>
>> If you done that via Maven 3.1.1 you get a warning with Maven 3.2.1 you
>> don't.
>>
>> Kind regard
>> Karl-Heinz Marbaise
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: about https://jira.codehaus.org/browse/MNG-5576 (Allow continuous
delivery friendly versions)
Posted by Dan Tran <da...@gmail.com>.
Thanks, that helps
-D
On Mon, Feb 24, 2014 at 12:23 PM, Karl Heinz Marbaise <kh...@gmx.de>wrote:
> Hi Dan,
>
> now you can write on your GAV definition a thing like:
>
> <groupId>...</groupId>
> <artifactId>...</artifactId>
> <version>1.0-${revision}-SNAPSHOT</version>
>
> and via command line you can now do the following:
>
> mvn -Drevision=3456 clean test
>
> If you done that via Maven 3.1.1 you get a warning with Maven 3.2.1 you
> don't.
>
> Kind regard
> Karl-Heinz Marbaise
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Re: about https://jira.codehaus.org/browse/MNG-5576 (Allow continuous
delivery friendly versions)
Posted by Karl Heinz Marbaise <kh...@gmx.de>.
Hi Dan,
now you can write on your GAV definition a thing like:
<groupId>...</groupId>
<artifactId>...</artifactId>
<version>1.0-${revision}-SNAPSHOT</version>
and via command line you can now do the following:
mvn -Drevision=3456 clean test
If you done that via Maven 3.1.1 you get a warning with Maven 3.2.1 you
don't.
Kind regard
Karl-Heinz Marbaise
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org