• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 176
  • Last Modified:

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

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
revoltingdigits
Asked:
revoltingdigits
  • 3
  • 2
1 Solution
 
CEHJCommented:
Why not use an Ant Delete task on the file?
0
 
revoltingdigitsAuthor Commented:
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
 
CEHJCommented:
>>Is it possible to configure maven ...

Not sure to tell you the truth. It should be possible to override the clean operation
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
revoltingdigitsAuthor Commented:
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
 
revoltingdigitsAuthor Commented:
I answered this question myself ( see above )
0
 
moduloCommented:
PAQed with points refunded (50)

modulo
Community Support Moderator
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now