You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Thiago Moreira (timba)" <tm...@gmail.com> on 2009/01/26 07:33:06 UTC

Problems with release:prepare on the resolution of a dependency with "test" classifier

  Hi there,

  I have a multi module project and one of the sub modules produce two
artifacts: temp-1.2.3.jar and temp-1.2.3-*test*.jar the last one is built
using this configuration:

              <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

  This second artifact is referenced in another sub module as a compile
dependency. It works fine for all my development BUT it doesn't work when
I'm trying to release it. Because the release:prepare goal only executes the
"clean verify" goals not the install one.

  I configured the maven-release-plugin on the parent project as:

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <inherited>true</inherited>
                <configuration>
                    <preparationGoals>clean verify</preparationGoals>
                </configuration>
            </plugin>

  and on the sub module as:

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <preparationGoals>install</preparationGoals>
                </configuration>
            </plugin>

  But still not working. Am I missing something?

 Cheers

Re: Problems with release:prepare on the resolution of a dependency with "test" classifier

Posted by Martin Höller <ma...@xss.co.at>.
Sound's like a known issue:
http://jira.codehaus.org/browse/SCM-406

hth,
- martin

On Wednesday 28 January 2009 Thiago Moreira (timba) wrote:
>   Thank you Barrie! Now it is working fine BUT I'm getting a new error...
>
> [INFO] [release:prepare]
> [INFO] Resuming release from phase 'scm-tag'
> [INFO] Tagging release with the label floggy-1.2.0...
> [INFO] Executing: svn --non-interactive copy --file
> /tmp/maven-scm-200887962.commit .
> https://floggy.svn.sourceforge.net/svnroot/floggy/tags/floggy-1.2.0
> [INFO] Working directory:
> /home/tmoreira2020/projects/floggy/trunk-fr2536956 [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Unable to tag SCM
> Provider message:
> The svn tag command failed.
> Command output:
> svn: Commit failed (details follow):
> svn: File
> '/svnroot/floggy/tags/floggy-1.2.0/eclipse-floggy-feature/pom.xml'
> already exists
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 22 seconds
> [INFO] Finished at: Wed Jan 28 00:24:11 PST 2009
> [INFO] Final Memory: 9M/82M
> [INFO]
> ------------------------------------------------------------------------
>
>   That file don't exist! You can check the project structure here
> http://floggy.svn.sourceforge.net/viewvc/floggy/
>
>   Has anyone else experienced something like this??
>
>   Cheers
>
> On Tue, Jan 27, 2009 at 6:36 PM, Barrie Treloar <ba...@gmail.com> 
wrote:
> > On Wed, Jan 28, 2009 at 4:34 AM, Thiago Moreira (timba)
> >
> > <tm...@gmail.com> wrote:
> > >  Ok, I took a look on the source code of the maven-release-plugin and
> >
> > there
> >
> > > is no way to set the preparationGoals from the command line!!!
> > >
> > >  The method mergeCommandLineConfig<
> >
> > http://maven.apache.org/plugins/maven-release-plugin/xref/org/apache/ma
> >ven/plugins/release/PrepareReleaseMojo.html#181
> >
> > >of
> > > the PrepareReleaseMojo class only merge the releaseVersions and
> > > developmentVersions properties.
> >
> > We have the same scenario that you have and we are using release fine.
> >
> > You may want to use
> >      <dependency>
> >        <groupId>MYGROUP</groupId>
> >        <artifactId>MYARTIFACT</artifactId>
> >        <version>MYVERSION</version>
> >        <type>test-jar</type>
> >        <scope>test</scope>
> >      </dependency>
> >
> > type = test-jar
> > instead of classifier = test.
> >
> > There are some wierd inconsistencies with this.
> >
> > Straight from our release page in our wiki:
> >  mvn release:prepare
> > -Dmaven.scm.provider.cvs.implementation=cvs_native
> > -DpreparationGoals=clean,install -Dusername=<CVS_userid>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org



RE: Problems with release:prepare on the resolution of a dependency with "test" classifier

Posted by Todd Thiessen <th...@nortel.com>.
I have. Try doing an update.

If that doesn't work, try simply deleting your check out (after of
course ensuring that everything is committed) and making a brand new
checkout.

---
Todd Thiessen
 

> -----Original Message-----
> From: Thiago Moreira (timba) [mailto:tmoreira2020@gmail.com] 
> Sent: Wednesday, January 28, 2009 12:47 PM
> To: Maven Users List
> Subject: Re: Problems with release:prepare on the resolution 
> of a dependency with "test" classifier
> 
>   Thank you Barrie! Now it is working fine BUT I'm getting a 
> new error...
> 
> [INFO] [release:prepare]
> [INFO] Resuming release from phase 'scm-tag'
> [INFO] Tagging release with the label floggy-1.2.0...
> [INFO] Executing: svn --non-interactive copy --file 
> /tmp/maven-scm-200887962.commit .
> https://floggy.svn.sourceforge.net/svnroot/floggy/tags/floggy-1.2.0
> [INFO] Working directory: 
> /home/tmoreira2020/projects/floggy/trunk-fr2536956
> [INFO]
> --------------------------------------------------------------
> ----------
> [ERROR] BUILD FAILURE
> [INFO]
> --------------------------------------------------------------
> ----------
> [INFO] Unable to tag SCM
> Provider message:
> The svn tag command failed.
> Command output:
> svn: Commit failed (details follow):
> svn: File 
> '/svnroot/floggy/tags/floggy-1.2.0/eclipse-floggy-feature/pom.xml'
> already exists
> 
> [INFO]
> --------------------------------------------------------------
> ----------
> [INFO] For more information, run Maven with the -e switch [INFO]
> --------------------------------------------------------------
> ----------
> [INFO] Total time: 22 seconds
> [INFO] Finished at: Wed Jan 28 00:24:11 PST 2009 [INFO] Final 
> Memory: 9M/82M [INFO]
> --------------------------------------------------------------
> ----------
> 
>   That file don't exist! You can check the project structure 
> here http://floggy.svn.sourceforge.net/viewvc/floggy/
> 
>   Has anyone else experienced something like this??
> 
>   Cheers
> 
> 
> On Tue, Jan 27, 2009 at 6:36 PM, Barrie Treloar 
> <ba...@gmail.com> wrote:
> 
> > On Wed, Jan 28, 2009 at 4:34 AM, Thiago Moreira (timba) 
> > <tm...@gmail.com> wrote:
> > >  Ok, I took a look on the source code of the maven-release-plugin 
> > > and
> > there
> > > is no way to set the preparationGoals from the command line!!!
> > >
> > >  The method mergeCommandLineConfig<
> > 
> http://maven.apache.org/plugins/maven-release-plugin/xref/org/apache/m
> > aven/plugins/release/PrepareReleaseMojo.html#181
> > >of
> > > the PrepareReleaseMojo class only merge the releaseVersions and  
> > >developmentVersions properties.
> >
> > We have the same scenario that you have and we are using 
> release fine.
> >
> > You may want to use
> >      <dependency>
> >        <groupId>MYGROUP</groupId>
> >        <artifactId>MYARTIFACT</artifactId>
> >        <version>MYVERSION</version>
> >        <type>test-jar</type>
> >        <scope>test</scope>
> >      </dependency>
> >
> > type = test-jar
> > instead of classifier = test.
> >
> > There are some wierd inconsistencies with this.
> >
> > Straight from our release page in our wiki:
> >  mvn release:prepare
> > -Dmaven.scm.provider.cvs.implementation=cvs_native
> > -DpreparationGoals=clean,install -Dusername=<CVS_userid>
> >
> > 
> ---------------------------------------------------------------------
> > 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: Problems with release:prepare on the resolution of a dependency with "test" classifier

Posted by "Thiago Moreira (timba)" <tm...@gmail.com>.
  Thank you Barrie! Now it is working fine BUT I'm getting a new error...

[INFO] [release:prepare]
[INFO] Resuming release from phase 'scm-tag'
[INFO] Tagging release with the label floggy-1.2.0...
[INFO] Executing: svn --non-interactive copy --file
/tmp/maven-scm-200887962.commit .
https://floggy.svn.sourceforge.net/svnroot/floggy/tags/floggy-1.2.0
[INFO] Working directory: /home/tmoreira2020/projects/floggy/trunk-fr2536956
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Unable to tag SCM
Provider message:
The svn tag command failed.
Command output:
svn: Commit failed (details follow):
svn: File '/svnroot/floggy/tags/floggy-1.2.0/eclipse-floggy-feature/pom.xml'
already exists

[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 22 seconds
[INFO] Finished at: Wed Jan 28 00:24:11 PST 2009
[INFO] Final Memory: 9M/82M
[INFO]
------------------------------------------------------------------------

  That file don't exist! You can check the project structure here
http://floggy.svn.sourceforge.net/viewvc/floggy/

  Has anyone else experienced something like this??

  Cheers


On Tue, Jan 27, 2009 at 6:36 PM, Barrie Treloar <ba...@gmail.com> wrote:

> On Wed, Jan 28, 2009 at 4:34 AM, Thiago Moreira (timba)
> <tm...@gmail.com> wrote:
> >  Ok, I took a look on the source code of the maven-release-plugin and
> there
> > is no way to set the preparationGoals from the command line!!!
> >
> >  The method mergeCommandLineConfig<
> http://maven.apache.org/plugins/maven-release-plugin/xref/org/apache/maven/plugins/release/PrepareReleaseMojo.html#181
> >of
> > the PrepareReleaseMojo class only merge the releaseVersions and
> > developmentVersions properties.
>
> We have the same scenario that you have and we are using release fine.
>
> You may want to use
>      <dependency>
>        <groupId>MYGROUP</groupId>
>        <artifactId>MYARTIFACT</artifactId>
>        <version>MYVERSION</version>
>        <type>test-jar</type>
>        <scope>test</scope>
>      </dependency>
>
> type = test-jar
> instead of classifier = test.
>
> There are some wierd inconsistencies with this.
>
> Straight from our release page in our wiki:
>  mvn release:prepare
> -Dmaven.scm.provider.cvs.implementation=cvs_native
> -DpreparationGoals=clean,install -Dusername=<CVS_userid>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Problems with release:prepare on the resolution of a dependency with "test" classifier

Posted by Barrie Treloar <ba...@gmail.com>.
On Wed, Jan 28, 2009 at 4:34 AM, Thiago Moreira (timba)
<tm...@gmail.com> wrote:
>  Ok, I took a look on the source code of the maven-release-plugin and there
> is no way to set the preparationGoals from the command line!!!
>
>  The method mergeCommandLineConfig<http://maven.apache.org/plugins/maven-release-plugin/xref/org/apache/maven/plugins/release/PrepareReleaseMojo.html#181>of
> the PrepareReleaseMojo class only merge the releaseVersions and
> developmentVersions properties.

We have the same scenario that you have and we are using release fine.

You may want to use
      <dependency>
        <groupId>MYGROUP</groupId>
        <artifactId>MYARTIFACT</artifactId>
        <version>MYVERSION</version>
        <type>test-jar</type>
        <scope>test</scope>
      </dependency>

type = test-jar
instead of classifier = test.

There are some wierd inconsistencies with this.

Straight from our release page in our wiki:
  mvn release:prepare
-Dmaven.scm.provider.cvs.implementation=cvs_native
-DpreparationGoals=clean,install -Dusername=<CVS_userid>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Problems with release:prepare on the resolution of a dependency with "test" classifier

Posted by "Thiago Moreira (timba)" <tm...@gmail.com>.
  Ok, I took a look on the source code of the maven-release-plugin and there
is no way to set the preparationGoals from the command line!!!

  The method mergeCommandLineConfig<http://maven.apache.org/plugins/maven-release-plugin/xref/org/apache/maven/plugins/release/PrepareReleaseMojo.html#181>of
the PrepareReleaseMojo class only merge the releaseVersions and
developmentVersions properties.



On Tue, Jan 27, 2009 at 9:31 AM, Thiago Moreira (timba) <
tmoreira2020@gmail.com> wrote:

>
>   The workaround is not working for me! I tried mvn release:prepare
> -DpreparationGoals="clean install" without success. Any other thoughts??
>
>
> On Sun, Jan 25, 2009 at 11:44 PM, Barrie Treloar <ba...@gmail.com>wrote:
>
>> On Mon, Jan 26, 2009 at 5:03 PM, Thiago Moreira (timba)
>> <tm...@gmail.com> wrote:
>> >  Hi there,
>> >
>> >  I have a multi module project and one of the sub modules produce two
>> > artifacts: temp-1.2.3.jar and temp-1.2.3-*test*.jar the last one is
>> built
>> > using this configuration:
>> >
>> >              <plugin>
>> >                <artifactId>maven-jar-plugin</artifactId>
>> >                <executions>
>> >                    <execution>
>> >                        <goals>
>> >                            <goal>test-jar</goal>
>> >                        </goals>
>> >                    </execution>
>> >                </executions>
>> >            </plugin>
>> >
>> >  This second artifact is referenced in another sub module as a compile
>> > dependency. It works fine for all my development BUT it doesn't work
>> when
>> > I'm trying to release it. Because the release:prepare goal only executes
>> the
>> > "clean verify" goals not the install one.
>>
>> This is a known problem
>> http://jira.codehaus.org/browse/MRELEASE-264
>>
>> The workaround is to add to your command line
>> -DpreparationGoals=clean install
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>

Re: Problems with release:prepare on the resolution of a dependency with "test" classifier

Posted by "Thiago Moreira (timba)" <tm...@gmail.com>.
  The workaround is not working for me! I tried mvn release:prepare
-DpreparationGoals="clean install" without success. Any other thoughts??

On Sun, Jan 25, 2009 at 11:44 PM, Barrie Treloar <ba...@gmail.com> wrote:

> On Mon, Jan 26, 2009 at 5:03 PM, Thiago Moreira (timba)
> <tm...@gmail.com> wrote:
> >  Hi there,
> >
> >  I have a multi module project and one of the sub modules produce two
> > artifacts: temp-1.2.3.jar and temp-1.2.3-*test*.jar the last one is built
> > using this configuration:
> >
> >              <plugin>
> >                <artifactId>maven-jar-plugin</artifactId>
> >                <executions>
> >                    <execution>
> >                        <goals>
> >                            <goal>test-jar</goal>
> >                        </goals>
> >                    </execution>
> >                </executions>
> >            </plugin>
> >
> >  This second artifact is referenced in another sub module as a compile
> > dependency. It works fine for all my development BUT it doesn't work when
> > I'm trying to release it. Because the release:prepare goal only executes
> the
> > "clean verify" goals not the install one.
>
> This is a known problem
> http://jira.codehaus.org/browse/MRELEASE-264
>
> The workaround is to add to your command line
> -DpreparationGoals=clean install
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Problems with release:prepare on the resolution of a dependency with "test" classifier

Posted by Barrie Treloar <ba...@gmail.com>.
On Mon, Jan 26, 2009 at 5:03 PM, Thiago Moreira (timba)
<tm...@gmail.com> wrote:
>  Hi there,
>
>  I have a multi module project and one of the sub modules produce two
> artifacts: temp-1.2.3.jar and temp-1.2.3-*test*.jar the last one is built
> using this configuration:
>
>              <plugin>
>                <artifactId>maven-jar-plugin</artifactId>
>                <executions>
>                    <execution>
>                        <goals>
>                            <goal>test-jar</goal>
>                        </goals>
>                    </execution>
>                </executions>
>            </plugin>
>
>  This second artifact is referenced in another sub module as a compile
> dependency. It works fine for all my development BUT it doesn't work when
> I'm trying to release it. Because the release:prepare goal only executes the
> "clean verify" goals not the install one.

This is a known problem
http://jira.codehaus.org/browse/MRELEASE-264

The workaround is to add to your command line
-DpreparationGoals=clean install

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org