maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Podgursky <bpodgur...@gmail.com>
Subject Re: Hijack mvn clean:clean to do file cleanup?
Date Thu, 17 Dec 2015 19:09:24 GMT
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 <khmarbaise@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
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message