You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ben Podgursky <bp...@gmail.com> on 2015/12/17 19:36:07 UTC
Hijack mvn clean:clean to do file cleanup?
We have a problem where our build servers fill up with jar artifacts
post-build (we have a lot of java builds).
I was hoping to attach an execution of clean:clean with a custom <filesets>
after the deploy phase. However, I don't want to sweep the whole target/
directory, just the filesets I define, since we want to hold onto test
results
Is there any way to disable the automatic detection of
project.build.directory, etc, and only delete custom filesets? Or is there
another plugin/goal which would let me do this?
I can write a mojo if I need to, but was hoping something was already out
there.
Thanks,
Ben
Re: Hijack mvn clean:clean to do file cleanup?
Posted by Ben Podgursky <bp...@gmail.com>.
So actually I'm just terrible at reading documentation
there's a excludeDefaultDirectories parameter which does exactly what I
want.
So, disregard all.
On Thu, Dec 17, 2015 at 10:41 AM, Karl Heinz Marbaise <kh...@gmx.de>
wrote:
> Hi Ben,
>
> you can define an execution with the id `default-cli` where you can
> configure the special filesSet for your purpose ...which you can execute
> from command line only via clean:clean...
>
> If you are in Maven 3.3.X+ you define several of them like this:
>
>
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-clean-plugin</artifactId>
> <executions>
> <execution>
> <id>default-cli</id>
> <configuration>
> ...
> </configuration>
> </execution>
> <execution>
> <id>second-cli</id>
> <configuration>
> ...
> </configuration>
> </execution>
> </executions>
> </plugin>
> </plugins>
> </build>
> </project>
>
> now you can use:
>
> mvn clean:clean@default-cli
> mvn clean:clean@second-cli
>
> Kind regards
> Karl Heinz Marbaise
>
>
>
> On 12/17/15 7:36 PM, Ben Podgursky wrote:
>
>> We have a problem where our build servers fill up with jar artifacts
>> post-build (we have a lot of java builds).
>>
>> I was hoping to attach an execution of clean:clean with a custom
>> <filesets>
>> after the deploy phase. However, I don't want to sweep the whole target/
>> directory, just the filesets I define, since we want to hold onto test
>> results
>>
>> Is there any way to disable the automatic detection of
>> project.build.directory, etc, and only delete custom filesets? Or is
>> there
>> another plugin/goal which would let me do this?
>>
>> I can write a mojo if I need to, but was hoping something was already out
>> there.
>>
>>
>> Thanks,
>>
>> Ben
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Re: Hijack mvn clean:clean to do file cleanup?
Posted by Karl Heinz Marbaise <kh...@gmx.de>.
Hi Ben,
you can define an execution with the id `default-cli` where you can
configure the special filesSet for your purpose ...which you can execute
from command line only via clean:clean...
If you are in Maven 3.3.X+ you define several of them like this:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<executions>
<execution>
<id>default-cli</id>
<configuration>
...
</configuration>
</execution>
<execution>
<id>second-cli</id>
<configuration>
...
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
now you can use:
mvn clean:clean@default-cli
mvn clean:clean@second-cli
Kind regards
Karl Heinz Marbaise
On 12/17/15 7:36 PM, Ben Podgursky wrote:
> We have a problem where our build servers fill up with jar artifacts
> post-build (we have a lot of java builds).
>
> I was hoping to attach an execution of clean:clean with a custom <filesets>
> after the deploy phase. However, I don't want to sweep the whole target/
> directory, just the filesets I define, since we want to hold onto test
> results
>
> Is there any way to disable the automatic detection of
> project.build.directory, etc, and only delete custom filesets? Or is there
> another plugin/goal which would let me do this?
>
> I can write a mojo if I need to, but was hoping something was already out
> there.
>
>
> Thanks,
>
> Ben
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org