?
Solved

making Apache Maven perform extra cleanup as part of the "clean" task

Posted on 2005-05-09
7
Medium Priority
?
173 Views
Last Modified: 2013-11-18
Hi there,
I'm using a Maven plugin called jcoverage to generate reports showing the level of test coverage within my project.

However the plugin is far from perfect and leaves a jcoverage.ser file in the project root directory.

I would like to add a task or goal ( sorry not very familiar with Maven terminology ) so that when you call maven clean it will
by default remove this file as well.

Can this be done ?

Thanks

Bryan
0
Comment
Question by:revoltingdigits
  • 3
  • 2
6 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 13958268
Why not use an Ant Delete task on the file?
0
 

Author Comment

by:revoltingdigits
ID: 13958329
Well what I want is for it to be encapsulated.

If another developer is working with the project and calls "maven clean" that it will perform this deletion.

I know you can integrate ANT tasks easily with maven but I don't want to create something new that the developer will need to know the name of.

Is it possible to configure maven via the project.xml or maven.xml file so that it runs this deletion before it runs the standard maven:clean task
( ie removes the "target" directory ) .

thanks in advance

bryan
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 13958856
>>Is it possible to configure maven ...

Not sure to tell you the truth. It should be possible to override the clean operation
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:revoltingdigits
ID: 14094323
I managed to do this using the following in maven.xml by pulling in the ant tasks and then defining a
post processing step for the "clean" goal
<project ... etc etc
<postGoal name="clean">
<ant:delete file="blah.txt"/>
</postGoal>
</project>
0
 

Author Comment

by:revoltingdigits
ID: 14107737
I answered this question myself ( see above )
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 14617267
PAQed with points refunded (50)

modulo
Community Support Moderator
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
In this post we will learn different types of Android Layout and some basics of an Android App.
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses
Course of the Month14 days, 17 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question