You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Andrew Chikvaidze <em...@ua.fm> on 2007/07/04 17:08:47 UTC

user files deleting




Dear All,

I'd like to ask you what is the best approach to delete user files during running eclipse:clean 
or eclipse:eclipse goal and ask about maven lifecycle phases, which maven eclipse plugin bound to.

We have multimodule project, and need to delete some configuration file from all project 
modules subdirectories when mvn eclipse:clean is running.

Maven during the generation of eclipse project must create checkstyle settings.

We implemented it by folowing maven-eclipse-plugin settings:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;plugin&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;artifactId&gt;maven-eclipse-plugin&lt;/artifactId&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;configuration&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;workspace&gt;${basedir}&lt;/workspace&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;wtpversion&gt;1.0
&lt;/wtpversion&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;additionalProjectnatures&gt;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;projectnature&gt;com.atlassw.tools.eclipse.checkstyle.CheckstyleNature&lt;/projectnature&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/additionalProjectnatures&gt;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;additionalBuildcommands&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;buildcommand&gt;
com.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder&lt;/buildcommand&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/additionalBuildcommands&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;additionalConfig&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;file&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;name&gt;.checkstyle&lt;/name&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;content&gt;

&lt;![CDATA[
&lt;?xml version="1.0" encoding="UTF-8"?&gt;

&lt;fileset-config file-format-version="1.2.0" simple-config="true"&gt;
&nbsp;&nbsp;&nbsp; &lt;local-check-config name="softlab-checkstyle" location="/configs/checkstyle.xml" &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; type="project" description=""&gt;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;additional-data name="protect-config-file" value="false"/&gt;

&nbsp;&nbsp;&nbsp; &lt;/local-check-config&gt;
&nbsp;&nbsp;&nbsp; &lt;fileset name="all" enabled="true" check-config-name="my-checkstyle-rules" local="true"&gt;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;file-match-pattern match-pattern="." include-pattern="true"/&gt;
&nbsp;&nbsp;&nbsp; &lt;/fileset&gt;
&lt;/fileset-config&gt;]]&gt;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/content&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/file&gt;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/additionalConfig&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;downloadSources&gt;true&lt;/downloadSources&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/configuration&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/plugin&gt;

Proposed fragment of
eclipse:eclipse plugin has a drawback: during eclipse:clean it doesn't
clear check-style settings. This doesn't allow refresh project
configuration from CVS.


Actually configuration option for maven-eclipse-plugin that allows us to delete specified files by run eclipse:clean would be 

good for us. But sometimes it is convenient to run our own plugin
in maven lifecycle phase previous to what eclipse:eclipse runs.

Would you please tell is goals eclipse:clean, eclipse:eclipse are bound&nbsp; to&nbsp; some&nbsp; maven lifecycle phases?

Do you plan to add features of deleting user specified files in maven-eclipse-plugin-2.4?
 

Thanks a lot.

My environment:
maven-eclipse-plugin-2.3

Java(TM) 2 Runtime Environment, Standard Edition (build 
1.5.0_11-b03)
Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode, sharing)

Maven version: 2.0.6

Eclipse SDK Version: 3.1.2
Build id: M20060118-1600
com.atlassw.tools.eclipse.checkstyle_4.3.2 plugin



Best Regards,
Andrew Chikvaidze
Software 
Engineer
Information Systems Development
Dnipropetrovsk, Ukraine

ISD Architects team
&nbsp;

Best regards,

Andrew

-- реклама -----------------------------------------------------------
Новая Эра - лучшая браузерная RPG UA-IX 2006 года. Играй, отдыхай, думай. 
http://nura.biz/