You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jd...@apache.org on 2005/11/16 19:19:13 UTC
svn commit: r345086 - in
/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse:
EclipsePlugin.java EclipseProjectWriter.java
Author: jdcasey
Date: Wed Nov 16 10:19:08 2005
New Revision: 345086
URL: http://svn.apache.org/viewcvs?rev=345086&view=rev
Log:
PR: MNG-955
Submitted By: Edwin Punzalan
Reviewed By: John Casey
Applied patch. Thanks, Edwin!
Modified:
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseProjectWriter.java
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java?rev=345086&r1=345085&r2=345086&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java Wed Nov 16 10:19:08 2005
@@ -26,6 +26,7 @@
import java.io.File;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
/**
@@ -159,6 +160,15 @@
* @parameter expression="${eclipse.workspace}"
*/
private File outputDir;
+
+ /**
+ * When set to false, the plugin will not create sub-projects and instead reference those sub-projects
+ * using the installed package in the local repository
+ *
+ * @parameter expression="${eclipse.useProjectReferences}" default-value="true"
+ * @required
+ */
+ private boolean useProjectReferences;
/**
* The default output directory
@@ -335,7 +345,11 @@
File projectBaseDir = executedProject.getFile().getParentFile();
// build the list of referenced ARTIFACTS produced by reactor projects
- List reactorArtifacts = EclipseUtils.resolveReactorArtifacts( project, reactorProjects );
+ List reactorArtifacts;
+ if ( useProjectReferences )
+ reactorArtifacts = EclipseUtils.resolveReactorArtifacts( project, reactorProjects );
+ else
+ reactorArtifacts = Collections.EMPTY_LIST;
// build a list of UNIQUE source dirs (both src and resources) to be used in classpath and wtpmodules
EclipseSourceDir[] sourceDirs =
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseProjectWriter.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseProjectWriter.java?rev=345086&r1=345085&r2=345086&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseProjectWriter.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseProjectWriter.java Wed Nov 16 10:19:08 2005
@@ -157,16 +157,19 @@
writer.endElement();
- writer.startElement( "projects" ); //$NON-NLS-1$
-
- for ( Iterator it = reactorArtifacts.iterator(); it.hasNext(); )
+ if ( reactorArtifacts != null && !reactorArtifacts.isEmpty() )
{
- writer.startElement( "project" ); //$NON-NLS-1$
- writer.writeText( ( (Artifact) it.next() ).getArtifactId() );
- writer.endElement();
- }
+ writer.startElement( "projects" ); //$NON-NLS-1$
- writer.endElement(); // projects
+ for ( Iterator it = reactorArtifacts.iterator(); it.hasNext(); )
+ {
+ writer.startElement( "project" ); //$NON-NLS-1$
+ writer.writeText( ( (Artifact) it.next() ).getArtifactId() );
+ writer.endElement();
+ }
+
+ writer.endElement(); // projects
+ }
writer.startElement( "buildSpec" ); //$NON-NLS-1$
Re: svn commit: r345086 - in /maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse:
EclipsePlugin.java EclipseProjectWriter.java
Posted by Brett Porter <br...@apache.org>.
Please describe what it does for those of us reading commit mails.
- Brett
jdcasey@apache.org wrote:
> Author: jdcasey
> Date: Wed Nov 16 10:19:08 2005
> New Revision: 345086
>
> URL: http://svn.apache.org/viewcvs?rev=345086&view=rev
> Log:
> PR: MNG-955
> Submitted By: Edwin Punzalan
> Reviewed By: John Casey
>
> Applied patch. Thanks, Edwin!
>
> Modified:
> maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java
> maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseProjectWriter.java
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org