You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Carlos Alonso <ca...@unkasoft.com> on 2008/09/12 13:09:35 UTC
auto clean before release?
Hi all.
In most of my projects, after a build, some files are spreaded out of
the target directory. This behavior is right, because is required, but
when I want to release, I have to manually run mvn clean because
otherwise, the build fails on uncommited local changes. The clean plugin
is already configured to delete these extra files.
Is there any way to automate the execution of the clean target when mvn
release:prepare is invoked?
I've tried this, but doesn't work:
<build>
.
.
.
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<executions>
<execution>
<id>clean targets</id>
<phase>release:prepare</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
.
.
</plugins>
Thanks for your input.
Carlos.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: auto clean before release?
Posted by Dan Tran <da...@gmail.com>.
This will not work, "preprarationGoals" are executed very late in the
prepare process, it happens just before the release pom is committed.
Another way is to get a fresh checkout, this is common practice before
release prepare.
-D
On Sun, Sep 14, 2008 at 4:12 PM, Craig <su...@gmail.com> wrote:
> the command line:
>
> mvn release:prepare -DpreparationGoals="clean"
>
> should do what you want, or you could probably add it to your pom like so:
>
> .
> <plugins>
> <plugin>
> <artifactId>maven-release-plugin</artifactId>
> <configuration>
> <preparationGoals>clean</prepartionGoals>
> </configuration>
> </plugin>
> .
> .
> </plugins>
>
>
> On Fri, Sep 12, 2008 at 9:18 PM, nicolas de loof <ni...@apache.org> wrote:
>
>> You can simply declare those files in .cvsignore or svn:ignore, so that the
>> release plugin will not consider them when checking for local
>> modifications.
>> Nicolas
>>
>> 2008/9/12 Carlos Alonso <ca...@unkasoft.com>
>>
>> > Hi all.
>> >
>> > In most of my projects, after a build, some files are spreaded out of
>> > the target directory. This behavior is right, because is required, but
>> > when I want to release, I have to manually run mvn clean because
>> > otherwise, the build fails on uncommited local changes. The clean plugin
>> > is already configured to delete these extra files.
>> >
>> > Is there any way to automate the execution of the clean target when mvn
>> > release:prepare is invoked?
>> > I've tried this, but doesn't work:
>> > <build>
>> > .
>> > .
>> > .
>> > <plugins>
>> > <plugin>
>> > <artifactId>maven-clean-plugin</artifactId>
>> > <executions>
>> > <execution>
>> > <id>clean targets</id>
>> > <phase>release:prepare</phase>
>> > <goals>
>> > <goal>clean</goal>
>> > </goals>
>> > </execution>
>> > </executions>
>> > </plugin>
>> > .
>> > .
>> > </plugins>
>> >
>> > Thanks for your input.
>> > Carlos.
>> >
>> > ---------------------------------------------------------------------
>> > 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: auto clean before release?
Posted by Craig <su...@gmail.com>.
the command line:
mvn release:prepare -DpreparationGoals="clean"
should do what you want, or you could probably add it to your pom like so:
.
<plugins>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<preparationGoals>clean</prepartionGoals>
</configuration>
</plugin>
.
.
</plugins>
On Fri, Sep 12, 2008 at 9:18 PM, nicolas de loof <ni...@apache.org> wrote:
> You can simply declare those files in .cvsignore or svn:ignore, so that the
> release plugin will not consider them when checking for local
> modifications.
> Nicolas
>
> 2008/9/12 Carlos Alonso <ca...@unkasoft.com>
>
> > Hi all.
> >
> > In most of my projects, after a build, some files are spreaded out of
> > the target directory. This behavior is right, because is required, but
> > when I want to release, I have to manually run mvn clean because
> > otherwise, the build fails on uncommited local changes. The clean plugin
> > is already configured to delete these extra files.
> >
> > Is there any way to automate the execution of the clean target when mvn
> > release:prepare is invoked?
> > I've tried this, but doesn't work:
> > <build>
> > .
> > .
> > .
> > <plugins>
> > <plugin>
> > <artifactId>maven-clean-plugin</artifactId>
> > <executions>
> > <execution>
> > <id>clean targets</id>
> > <phase>release:prepare</phase>
> > <goals>
> > <goal>clean</goal>
> > </goals>
> > </execution>
> > </executions>
> > </plugin>
> > .
> > .
> > </plugins>
> >
> > Thanks for your input.
> > Carlos.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
Re: auto clean before release?
Posted by nicolas de loof <ni...@apache.org>.
You can simply declare those files in .cvsignore or svn:ignore, so that the
release plugin will not consider them when checking for local modifications.
Nicolas
2008/9/12 Carlos Alonso <ca...@unkasoft.com>
> Hi all.
>
> In most of my projects, after a build, some files are spreaded out of
> the target directory. This behavior is right, because is required, but
> when I want to release, I have to manually run mvn clean because
> otherwise, the build fails on uncommited local changes. The clean plugin
> is already configured to delete these extra files.
>
> Is there any way to automate the execution of the clean target when mvn
> release:prepare is invoked?
> I've tried this, but doesn't work:
> <build>
> .
> .
> .
> <plugins>
> <plugin>
> <artifactId>maven-clean-plugin</artifactId>
> <executions>
> <execution>
> <id>clean targets</id>
> <phase>release:prepare</phase>
> <goals>
> <goal>clean</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> .
> .
> </plugins>
>
> Thanks for your input.
> Carlos.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>