Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] m2e and maven-clean-plugin ?

Hi Igor,
I tried to map clean:clean using lifecycle-mapping plugin like the snippet below.
<build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.eclipse.m2e</groupId>
                            <artifactId>lifecycle-mapping</artifactId>
                            <version>1.0.0</version>
                            <configuration>
                                <lifecycleMappingMetadata>
                                    <pluginExecutions>
                                        <pluginExecution>
                                            <pluginExecutionFilter>
                                                <groupId>org.apache.maven.plugins</groupId>
                                                <artifactId>maven-clean-plugin</artifactId>
                                                <versionRange>[2.0,)</versionRange>
                                                <goals>
                                                    <goal>clean</goal>
                                                </goals>
                                            </pluginExecutionFilter>
                                            <action>
                                                <execute>
                                                    <runOnIncremental>false</runOnIncremental>
                                                    <runOnConfiguration>true</runOnConfiguration>
                                                </execute>
                                            </action>
                                        </pluginExecution>


Attached is the requested project. Note there is a hh.jar simulating a generated jar that I also need to remove.

regards,

Cristiano

On 14-08-2014 12:51, Igor Fedorenko wrote:
How did you map clean:clean in m2e? Can you attach small example that
demonstrates your setup?

--
Regards,
Igor

On 2014-08-12, 18:23, Cristiano Gavião wrote:
        Hello,

        I added the maven-clean-plugin setup below in my project in
        order to delete some generated resource folders at each build.

        I would like that this could happen when I use m2e's "Update
        Project...", but this remotion is not happen inside eclipse:

        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
                                     <configuration>
                                         <filesets>
                                             <fileset>
          <directory>${basedir}</directory>
                                                 <includes>
          <include>*.jar</include>
          <include>CONFIG/</include>
                                                 </includes>
          <followSymlinks>false</followSymlinks>
                                             </fileset>
                                         </filesets>
                                     </configuration>
                                 </plugin>

        I could note that lifecycle clean:clean is ignored by m2e by
        default. So, I enabled its execution using a lifecycle-mapping.
        I can see in lifecycle properties view now that it is not
        ignored anymore, but  I can't see any resource being deleted.

        what is the reason of clean:clean is being ignored by default?

        and is there any way to use maven-clean-plugin with m2e ?

        many thanks,

        Cristiano



_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users

_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users

Attachment: org.test.clean.tar.gz
Description: application/gzip


Back to the top