You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by fg...@apache.org on 2006/07/17 22:13:48 UTC
svn commit: r422829 - in /maven/plugins/trunk/maven-eclipse-plugin/src/main:
java/org/apache/maven/plugin/eclipse/EclipseCleanMojo.java
resources/org/apache/maven/plugin/eclipse/messages.properties
Author: fgiust
Date: Mon Jul 17 13:13:47 2006
New Revision: 422829
URL: http://svn.apache.org/viewvc?rev=422829&view=rev
Log:
from MECLIPSE-92 : remove generated pde lib dir when running eclipse:clean
Modified:
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseCleanMojo.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/resources/org/apache/maven/plugin/eclipse/messages.properties
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseCleanMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseCleanMojo.java?rev=422829&r1=422828&r2=422829&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseCleanMojo.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseCleanMojo.java Mon Jul 17 13:13:47 2006
@@ -16,13 +16,13 @@
* limitations under the License.
*/
+import java.io.File;
+import java.io.IOException;
+
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.codehaus.plexus.util.FileUtils;
-import java.io.File;
-import java.io.IOException;
-
/**
* Deletes the .project, .classpath, .wtpmodules files and .settings folder used by Eclipse.
*
@@ -83,6 +83,20 @@
private File basedir;
/**
+ * Is it an PDE project?
+ *
+ * @parameter expression="${eclipse.pde}" default-value="false"
+ */
+ private boolean pde;
+
+ /**
+ * The directory of local libraries
+ *
+ * @parameter expression="${eclipse.pdeLibDir}" default-value="${basedir}/lib"
+ */
+ private File pdeLibDir;
+
+ /**
* @see org.apache.maven.plugin.AbstractMojo#execute()
*/
public void execute()
@@ -109,6 +123,11 @@
{
delete( settingsDir );
}
+
+ if ( pde )
+ {
+ delete( pdeLibDir );
+ }
}
/**
@@ -120,7 +139,14 @@
private void delete( File f )
throws MojoExecutionException
{
- getLog().info( Messages.getString( "EclipseCleanMojo.deleting", f.getName() ) ); //$NON-NLS-1$
+ if ( f.isDirectory() )
+ {
+ getLog().info( Messages.getString( "EclipseCleanMojo.deletingDirectory", f.getName() ) ); //$NON-NLS-1$
+ }
+ else
+ {
+ getLog().info( Messages.getString( "EclipseCleanMojo.deletingFile", f.getName() ) ); //$NON-NLS-1$
+ }
if ( f.exists() )
{
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/resources/org/apache/maven/plugin/eclipse/messages.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/resources/org/apache/maven/plugin/eclipse/messages.properties?rev=422829&r1=422828&r2=422829&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/resources/org/apache/maven/plugin/eclipse/messages.properties (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/resources/org/apache/maven/plugin/eclipse/messages.properties Mon Jul 17 13:13:47 2006
@@ -18,6 +18,7 @@
EclipsePlugin.wtpversion=Adding support for WTP version {0}.
EclipsePlugin.missingjrecontainer=You did specify a list of classpath containers without the base org.eclipse.jdt.launching.JRE_CONTAINER.\n If you specify custom classpath containers you should also add org.eclipse.jdt.launching.JRE_CONTAINER to the list
EclipsePlugin.deprecatedpar=Plugin parameter "{0}" is deprecated, please use "{1}"
+EclipsePlugin.cantcopyartifact=Can''t copy artifact "{0}".
EclipseSettingsWriter.wrotesettings=Wrote settings to {0}
EclipseSettingsWriter.cannotcreatesettings=Cannot create settings file