Clean mojo assumes that POM projects never have .project files - this is 
incorrect
----------------------------------------------------------------------------------

                 Key: MECLIPSE-231
                 URL: http://jira.codehaus.org/browse/MECLIPSE-231
             Project: Maven 2.x Eclipse Plugin
          Issue Type: Bug
    Affects Versions: 2.3
            Reporter: John Allen
         Attachments: EclipseCleanMojo.diff

Quite simply there are quite a few ways to make eclipse:eclipse generate POM 
based projects and thus the assumption in eclipse:clean that there are never 
any to clean up is invalid.

We use a flat hierarchy like this:

 Directory of D:\APT\projects\apt\examples\calculator

14/02/2007  12:40    <DIR>          .
14/02/2007  12:40    <DIR>          ..
14/02/2007  16:32    <DIR>          calculator-ear
14/02/2007  16:32    <DIR>          calculator-ejb
14/02/2007  16:32    <DIR>          calculator-engine
14/02/2007  16:25    <DIR>          calculator-root
14/02/2007  16:32    <DIR>          calculator-servlets
14/02/2007  16:32    <DIR>          calculator-webapp

calculator-root is the PARENT project of type POM which which logically 
contains all the others. 

As we are flat we can import all of these into Eclipse without any complaints 
from Eclipse. To get eclipse:eclipse to generate a .project file for 
calculator-root we tell the eclipse plugin that the Eclipse workspace is == to 
the project.builddir. So inside calculator-root/pom.xml we have:-

        <build> 
                <plugins>               
                        <plugin> 
                                <!-- force the eclipse plugin to generate an 
Eclipse project for 
                                this POM project, by default it only does so 
for Java style projects -->
                                
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-eclipse-plugin</artifactId>
                                <configuration>
                                        
<eclipseProjectDir>${project.basedir}</eclipseProjectDir>
                                </configuration>
                        </plugin>
                </plugins>              
        </build>

This works a treat, we get all the Eclipse project files generated. However 
eclipse:clean dont do the do. May i suggest you just delete any files in clean 
rather than trying to be clever? Works for us. Patch attached.



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to