Author: nicolas Date: Fri Feb 1 01:11:49 2008 New Revision: 617382 URL: http://svn.apache.org/viewvc?rev=617382&view=rev Log: [MECLIPSE-79] Koert Zeilstra patch with some minor changes (groupId - artifactId separator changed to ":")
Added: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-43/ maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-43/expected/ maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-43/expected/.classpath maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-43/expected/.project maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-43/pom.xml (with props) 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/ide/AbstractIdeSupportMojo.java maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java?rev=617382&r1=617381&r2=617382&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 Fri Feb 1 01:11:49 2008 @@ -66,7 +66,7 @@ * </ul> * If this goal is run on a multiproject root, dependencies between modules will be configured as direct project * dependencies in Eclipse (unless <code>useProjectReferences</code> is set to <code>false</code>). - * + * * @author <a href="mailto:[EMAIL PROTECTED]">Trygve Laugstøl</a> * @author <a href="mailto:[EMAIL PROTECTED]">Fabrizio Giustina</a> * @version $Id$ @@ -123,40 +123,48 @@ /** * List of eclipse project natures. By default the <code>org.eclipse.jdt.core.javanature</code> nature plus the * needed WTP natures are added. Natures added using this property <strong>replace</strong> the default list. - * + * * <pre> * <projectnatures> * <projectnature>org.eclipse.jdt.core.javanature</projectnature> * <projectnature>org.eclipse.wst.common.modulecore.ModuleCoreNature</projectnature> * </projectnatures> * </pre> - * + * * @parameter */ private List projectnatures; /** + * List of artifact to exclude from eclipse classpath, beeing provided by some + * eclipse classPathContainer [MECLIPSE-79] + * + * @parameter + */ + private List excludes; + + /** * List of eclipse project natures to be added to the default ones. - * + * * <pre> * <additionalProjectnatures> * <projectnature>org.springframework.ide.eclipse.core.springnature</projectnature> * </additionalProjectnatures> * </pre> - * + * * @parameter */ private List additionalProjectnatures; /** * List of eclipse project facets to be added to the default ones. - * + * * <pre> * <additionalProjectFacets> * <jst.jsf>1.1<jst.jsf/> * </additionalProjectFacets> * </pre> - * + * * @parameter */ private Map additionalProjectFacets; @@ -166,7 +174,7 @@ * needed WTP builders are added. If you specify any configuration for this parameter, only those buildcommands * specified will be used; the defaults won't be added. Use the <code>additionalBuildCommands</code> parameter for * that. Configuration example: Old style: - * + * * <pre> * <buildcommands> * <buildcommand>org.eclipse.wst.common.modulecore.ComponentStructuralBuilder</buildcommand> @@ -174,24 +182,24 @@ * <buildcommand>org.eclipse.wst.common.modulecore.ComponentStructuralBuilderDependencyResolver</buildcommand> * </buildcommands> * </pre> - * + * * For new style, see <code>additionalBuildCommands</code>. - * + * * @parameter */ private List buildcommands; /** * List of eclipse build commands to be added to the default ones. Old style: - * + * * <pre> * <additionalBuildcommands> * <buildcommand>org.springframework.ide.eclipse.core.springbuilder</buildcommand> * </additionalBuildcommands> * </pre> - * + * * New style: - * + * * <pre> * <additionalBuildcommands> * <buildCommand> @@ -203,10 +211,10 @@ * </buildCommand> * </additionalBuildcommands> * </pre> - * + * * Note the difference between <code>build<strong>c</strong>ommand</code> and * <code>build<strong>C</strong>ommand</code>. You can mix and match old and new-style configuration entries. - * + * * @parameter */ private List additionalBuildcommands; @@ -214,7 +222,7 @@ /** * List of container classpath entries. By default the <code>org.eclipse.jdt.launching.JRE_CONTAINER</code> * classpath container is added. Configuration example: - * + * * <pre> * <classpathContainers> * <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer> @@ -222,14 +230,14 @@ * <classpathContainer>org.eclipse.jst.j2ee.internal.web.container/artifact</classpathContainer> * </classpathContainers> * </pre> - * + * * @parameter */ private List classpathContainers; /** * Enables/disables the downloading of source attachments. Defaults to false. DEPRECATED - use downloadSources - * + * * @parameter expression="${eclipse.downloadSources}" * @deprecated use downloadSources */ @@ -237,7 +245,7 @@ /** * Eclipse workspace directory. - * + * * @parameter expression="${eclipse.projectDir}" alias="outputDir" */ private File eclipseProjectDir; @@ -245,7 +253,7 @@ /** * 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 */ @@ -253,7 +261,7 @@ /** * The default output directory - * + * * @parameter expression="${outputDirectory}" alias="outputDirectory" * default-value="${project.build.outputDirectory}" * @required @@ -263,14 +271,14 @@ /** * The version of WTP for which configuration files will be generated. The default value is "none" (don't generate * WTP configuration), supported versions are "R7", "1.0", and "1.5" - * + * * @parameter expression="${wtpversion}" default-value="none" */ private String wtpversion; /** * JEE context name of the WTP module. ( ex. WEB context name ). - * + * * @parameter expression="${wtpContextName}" */ private String wtpContextName; @@ -280,14 +288,14 @@ * Additionally it copies all libraries to a project local directory and references them instead of referencing the * files in the local Maven repository. It also ensured that the "Bundle-Classpath" in META-INF/MANIFEST.MF is * synchronized. - * + * * @parameter expression="${eclipse.pde}" default-value="false" */ private boolean pde; /** * The relative path of the manifest file - * + * * @parameter expression="${eclipse.manifest}" default-value="${basedir}/META-INF/MANIFEST.MF" */ private File manifest; @@ -295,7 +303,7 @@ /** * Allow to configure additional generic configuration files for eclipse that will be written out to disk when * running eclipse:eclipse. FOr each file you can specify the name and the text content. - * + * * <pre> * <additionalConfig> * <file> @@ -311,7 +319,7 @@ * </file> * </additionalConfig> * </pre> - * + * * @parameter */ private EclipseConfigFile[] additionalConfig; @@ -319,7 +327,7 @@ /** * If set to <code>true</code>, the version number of the artifact is appended to the name of the generated * Eclipse project. See projectNameTemplate for other options. - * + * * @parameter expression="${eclipse.addVersionToProjectName}" default-value="false" */ private boolean addVersionToProjectName; @@ -327,7 +335,7 @@ /** * If set to <code>true</code>, the groupId of the artifact is appended to the name of the generated Eclipse * project. See projectNameTemplate for other options. - * + * * @parameter expression="${eclipse.addGroupIdToProjectName}" default-value="false" */ private boolean addGroupIdToProjectName; @@ -336,7 +344,7 @@ * Allows configuring the name of the eclipse projects. This property if set wins over addVersionToProjectName and * addGroupIdToProjectName You can use <code>[groupId]</code>, <code>[artifactId]</code> and * <code>[version]</code> variables. eg. <code>[groupId].[artifactId]-[version]</code> - * + * * @parameter expression="${eclipse.projectNameTemplate}" */ private String projectNameTemplate; @@ -353,21 +361,21 @@ /** * Must the manifest files be written for java projects so that that the jee classpath for wtp is correct. - * + * * @parameter expression="${eclipse.wtpmanifest}" default-value="false" */ private boolean wtpmanifest; /** * Must the application files be written for ear projects in a separate directory. - * + * * @parameter expression="${eclipse.wtpapplicationxml}" default-value="false" */ private boolean wtpapplicationxml; /** * What WTP defined server to use for deployment informations. - * + * * @parameter expression="${eclipse.wtpdefaultserver}" */ private String wtpdefaultserver; @@ -386,7 +394,7 @@ /** * Getter for <code>buildcommands</code>. - * + * * @return Returns the buildcommands. */ public List getBuildcommands() @@ -396,7 +404,7 @@ /** * Setter for <code>buildcommands</code>. - * + * * @param buildcommands The buildcommands to set. */ public void setBuildcommands( List buildcommands ) @@ -406,7 +414,7 @@ /** * Getter for <code>buildOutputDirectory</code>. - * + * * @return Returns the buildOutputDirectory. */ public File getBuildOutputDirectory() @@ -416,7 +424,7 @@ /** * Setter for <code>buildOutputDirectory</code>. - * + * * @param buildOutputDirectory The buildOutputDirectory to set. */ public void setBuildOutputDirectory( File buildOutputDirectory ) @@ -426,7 +434,7 @@ /** * Getter for <code>classpathContainers</code>. - * + * * @return Returns the classpathContainers. */ public List getClasspathContainers() @@ -436,7 +444,7 @@ /** * Setter for <code>classpathContainers</code>. - * + * * @param classpathContainers The classpathContainers to set. */ public void setClasspathContainers( List classpathContainers ) @@ -446,7 +454,7 @@ /** * Getter for <code>eclipseProjectDir</code>. - * + * * @return Returns the eclipseProjectDir. */ public File getEclipseProjectDir() @@ -456,7 +464,7 @@ /** * Setter for <code>eclipseProjectDir</code>. - * + * * @param eclipseProjectDir The eclipseProjectDir to set. */ public void setEclipseProjectDir( File eclipseProjectDir ) @@ -466,7 +474,7 @@ /** * Getter for <code>projectnatures</code>. - * + * * @return Returns the projectnatures. */ public List getProjectnatures() @@ -476,7 +484,7 @@ /** * Setter for <code>projectnatures</code>. - * + * * @param projectnatures The projectnatures to set. */ public void setProjectnatures( List projectnatures ) @@ -486,7 +494,7 @@ /** * Getter for <code>useProjectReferences</code>. - * + * * @return Returns the useProjectReferences. */ public boolean getUseProjectReferences() @@ -496,7 +504,7 @@ /** * Setter for <code>useProjectReferences</code>. - * + * * @param useProjectReferences The useProjectReferences to set. */ public void setUseProjectReferences( boolean useProjectReferences ) @@ -506,7 +514,7 @@ /** * Getter for <code>wtpversion</code>. - * + * * @return Returns the wtpversion. */ public String getWtpversion() @@ -516,7 +524,7 @@ /** * Setter for <code>wtpversion</code>. - * + * * @param wtpversion The wtpversion to set. */ public void setWtpversion( String wtpversion ) @@ -526,7 +534,7 @@ /** * Getter for <code>additionalBuildcommands</code>. - * + * * @return Returns the additionalBuildcommands. */ public List getAdditionalBuildcommands() @@ -536,7 +544,7 @@ /** * Setter for <code>additionalBuildcommands</code>. - * + * * @param additionalBuildcommands The additionalBuildcommands to set. */ public void setAdditionalBuildcommands( List additionalBuildcommands ) @@ -546,7 +554,7 @@ /** * Getter for <code>additionalProjectnatures</code>. - * + * * @return Returns the additionalProjectnatures. */ public List getAdditionalProjectnatures() @@ -556,7 +564,7 @@ /** * Setter for <code>additionalProjectnatures</code>. - * + * * @param additionalProjectnatures The additionalProjectnatures to set. */ public void setAdditionalProjectnatures( List additionalProjectnatures ) @@ -973,7 +981,7 @@ /** * If this is a war module peek into the reactor an search for an ear module that defines the context root of this * module. - * + * * @param config config to save the context root. */ private void collectWarContextRootsFromReactorEarConfiguration( EclipseWriterConfig config ) @@ -1035,7 +1043,7 @@ /** * Write any extra configuration information for the Eclipse project. This is an extension point, called before the * main configurations are written. <br/> <b> NOTE: This could change the config! </b> - * + * * @param config * @throws MojoExecutionException */ @@ -1271,7 +1279,7 @@ /** * Calculate the project name template from the fields [EMAIL PROTECTED] #projectNameTemplate}, * [EMAIL PROTECTED] #addVersionToProjectName} and [EMAIL PROTECTED] #addGroupIdToProjectName} - * + * * @return the project name template that should be used after considering the plugin configuration */ private String calculateProjectNameTemplate() @@ -1344,5 +1352,10 @@ this.wtpdefaultserver ); } return workspaceConfiguration; + } + + public List getExcludes() + { + return excludes; } } Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/AbstractIdeSupportMojo.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/AbstractIdeSupportMojo.java?rev=617382&r1=617381&r2=617382&view=diff ============================================================================== --- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/AbstractIdeSupportMojo.java (original) +++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/AbstractIdeSupportMojo.java Fri Feb 1 01:11:49 2008 @@ -70,7 +70,7 @@ * Abstract base plugin which takes care of the common stuff usually needed by maven IDE plugins. A plugin extending * AbstractIdeSupportMojo should implement the <code>setup()</code> and <code>writeConfiguration()</code> methods, * plus the getters needed to get the various configuration flags and required components. The lifecycle: - * + * * <pre> * *** calls setup() where you can configure your specific stuff and stop the mojo from execute if appropriate *** * - manually resolve project dependencies, NOT failing if a dependency is missing @@ -79,7 +79,7 @@ * *** calls writeConfiguration(), passing the list of resolved referenced dependencies *** * - report the list of missing sources or just tell how to turn this feature on if the flag was disabled * </pre> - * + * * @author Fabrizio Giustina * @version $Id$ */ @@ -90,7 +90,7 @@ /** * The project whose project files to create. - * + * * @parameter expression="${project}" * @required * @readonly @@ -99,7 +99,7 @@ /** * The currently executed project (can be a reactor project). - * + * * @parameter expression="${executedProject}" * @readonly */ @@ -107,14 +107,14 @@ /** * The project packaging. - * + * * @parameter expression="${project.packaging}" */ protected String packaging; /** * Artifact factory, needed to download source jars for inclusion in classpath. - * + * * @component role="org.apache.maven.artifact.factory.ArtifactFactory" * @required * @readonly @@ -123,7 +123,7 @@ /** * Artifact resolver, needed to download source jars for inclusion in classpath. - * + * * @component role="org.apache.maven.artifact.resolver.ArtifactResolver" * @required * @readonly @@ -132,7 +132,7 @@ /** * Artifact collector, needed to resolve dependencies. - * + * * @component role="org.apache.maven.artifact.resolver.ArtifactCollector" * @required * @readonly @@ -146,7 +146,7 @@ /** * Remote repositories which will be searched for source attachments. - * + * * @parameter expression="${project.remoteArtifactRepositories}" * @required * @readonly @@ -155,7 +155,7 @@ /** * Local maven repository. - * + * * @parameter expression="${localRepository}" * @required * @readonly @@ -164,7 +164,7 @@ /** * If the executed project is a reactor project, this will contains the full list of projects in the reactor. - * + * * @parameter expression="${reactorProjects}" * @required * @readonly @@ -173,7 +173,7 @@ /** * Skip the operation when true. - * + * * @parameter expression="${eclipse.skip}" default-value="false" */ private boolean skip; @@ -183,7 +183,7 @@ * remote repositories are checked for sources: in order to avoid repeated check for unavailable source archives, a * status cache is mantained into the target dir of the root project. Run <code>mvn:clean</code> or delete the * file <code>mvn-eclipse-cache.properties</code> in order to reset this cache. - * + * * @parameter expression="${downloadSources}" */ protected boolean downloadSources; @@ -193,7 +193,7 @@ * remote repositories are checked for javadocs: in order to avoid repeated check for unavailable javadoc archives, * a status cache is mantained into the target dir of the root project. Run <code>mvn:clean</code> or delete the * file <code>mvn-eclipse-cache.properties</code> in order to reset this cache. - * + * * @parameter expression="${downloadJavadocs}" */ protected boolean downloadJavadocs; @@ -208,7 +208,7 @@ * not be linked to the jars in the local repository. Requirement is that it was created with the similar wtp * settings as the reactor projects, but the project name template my differ. The pom's in the workspace projects * may not contain variables in the artefactId, groupId and version tags. - * + * * @since 2.5 * @parameter expression="${eclipse.workspace}" */ @@ -217,14 +217,14 @@ /** * Limit the use of project references to the current workspace. No project references will be created to projects * in the reactor when they are not available in the workspace. - * + * * @parameter expression="${eclipse.limitProjectReferencesToWorkspace}" default-value="false" */ protected boolean limitProjectReferencesToWorkspace; /** * Getter for <code>artifactMetadataSource</code>. - * + * * @return Returns the artifactMetadataSource. */ public ArtifactMetadataSource getArtifactMetadataSource() @@ -234,7 +234,7 @@ /** * Setter for <code>artifactMetadataSource</code>. - * + * * @param artifactMetadataSource The artifactMetadataSource to set. */ public void setArtifactMetadataSource( ArtifactMetadataSource artifactMetadataSource ) @@ -244,7 +244,7 @@ /** * Getter for <code>project</code>. - * + * * @return Returns the project. */ public MavenProject getProject() @@ -254,7 +254,7 @@ /** * Setter for <code>project</code>. - * + * * @param project The project to set. */ public void setProject( MavenProject project ) @@ -264,7 +264,7 @@ /** * Getter for <code>reactorProjects</code>. - * + * * @return Returns the reactorProjects. */ public List getReactorProjects() @@ -274,7 +274,7 @@ /** * Setter for <code>reactorProjects</code>. - * + * * @param reactorProjects The reactorProjects to set. */ public void setReactorProjects( List reactorProjects ) @@ -284,7 +284,7 @@ /** * Getter for <code>remoteArtifactRepositories</code>. - * + * * @return Returns the remoteArtifactRepositories. */ public List getRemoteArtifactRepositories() @@ -294,7 +294,7 @@ /** * Setter for <code>remoteArtifactRepositories</code>. - * + * * @param remoteArtifactRepositories The remoteArtifactRepositories to set. */ public void setRemoteArtifactRepositories( List remoteArtifactRepositories ) @@ -304,7 +304,7 @@ /** * Getter for <code>artifactFactory</code>. - * + * * @return Returns the artifactFactory. */ public ArtifactFactory getArtifactFactory() @@ -314,7 +314,7 @@ /** * Setter for <code>artifactFactory</code>. - * + * * @param artifactFactory The artifactFactory to set. */ public void setArtifactFactory( ArtifactFactory artifactFactory ) @@ -324,7 +324,7 @@ /** * Getter for <code>artifactResolver</code>. - * + * * @return Returns the artifactResolver. */ public ArtifactResolver getArtifactResolver() @@ -334,7 +334,7 @@ /** * Setter for <code>artifactResolver</code>. - * + * * @param artifactResolver The artifactResolver to set. */ public void setArtifactResolver( ArtifactResolver artifactResolver ) @@ -344,7 +344,7 @@ /** * Getter for <code>executedProject</code>. - * + * * @return Returns the executedProject. */ public MavenProject getExecutedProject() @@ -354,7 +354,7 @@ /** * Setter for <code>executedProject</code>. - * + * * @param executedProject The executedProject to set. */ public void setExecutedProject( MavenProject executedProject ) @@ -364,7 +364,7 @@ /** * Getter for <code>localRepository</code>. - * + * * @return Returns the localRepository. */ public ArtifactRepository getLocalRepository() @@ -374,7 +374,7 @@ /** * Setter for <code>localRepository</code>. - * + * * @param localRepository The localRepository to set. */ public void setLocalRepository( ArtifactRepository localRepository ) @@ -384,7 +384,7 @@ /** * Getter for <code>downloadJavadocs</code>. - * + * * @return Returns the downloadJavadocs. */ public boolean getDownloadJavadocs() @@ -394,7 +394,7 @@ /** * Setter for <code>downloadJavadocs</code>. - * + * * @param downloadJavadocs The downloadJavadocs to set. */ public void setDownloadJavadocs( boolean downloadJavadoc ) @@ -404,7 +404,7 @@ /** * Getter for <code>downloadSources</code>. - * + * * @return Returns the downloadSources. */ public boolean getDownloadSources() @@ -414,7 +414,7 @@ /** * Setter for <code>downloadSources</code>. - * + * * @param downloadSources The downloadSources to set. */ public void setDownloadSources( boolean downloadSources ) @@ -435,14 +435,14 @@ /** * return <code>false</code> if projects available in a reactor build should be considered normal dependencies, * <code>true</code> if referenced project will be linked and not need artifact resolution. - * + * * @return <code>true</code> if referenced project will be linked and not need artifact resolution */ protected abstract boolean getUseProjectReferences(); /** * Hook for preparation steps before the actual plugin execution. - * + * * @return <code>true</code> if execution should continue or <code>false</code> if not. * @throws MojoExecutionException generic mojo exception */ @@ -451,7 +451,7 @@ /** * Main plugin method where dependencies should be processed in order to generate IDE configuration files. - * + * * @param deps list of <code>IdeDependency</code> objects, with artifacts, sources and javadocs already resolved * @throws MojoExecutionException generic mojo exception */ @@ -520,7 +520,7 @@ * Resolve project dependencies. Manual resolution is needed in order to avoid resolution of multiproject artifacts * (if projects will be linked each other an installed jar is not needed) and to avoid a failure when a jar is * missing. - * + * * @throws MojoExecutionException if dependencies can't be resolved * @return resolved IDE dependencies, with attached jars for non-reactor dependencies */ @@ -615,8 +615,20 @@ } } - if ( !isReactorProject || - emittedReactorProjectId.add( art.getGroupId() + '-' + art.getArtifactId() ) ) + boolean includeArtifact = true; + if ( getExcludes() != null) + { + String artifactFullId = art.getGroupId() + ":" + art.getArtifactId(); + if (getExcludes().contains(artifactFullId)) + { + getLog().info("excluded: " + artifactFullId); + includeArtifact = false; + } + } + + if ( includeArtifact && ( + !isReactorProject || + emittedReactorProjectId.add( art.getGroupId() + '-' + art.getArtifactId() ) ) ) { // the following doesn't work: art.getArtifactHandler().getPackaging() always returns "jar" @@ -712,7 +724,7 @@ /** * Find the name of the project as used in eclipse. - * + * * @param artifact The artifact to find the eclipse name for. * @return The name os the eclipse project. */ @@ -721,7 +733,7 @@ /** * Returns the list of project artifacts. Also artifacts generated from referenced projects will be added, but with * the <code>resolved</code> property set to true. - * + * * @return list of projects artifacts * @throws MojoExecutionException if unable to parse dependency versions */ @@ -794,7 +806,7 @@ /** * Utility method that locates a project producing the given artifact. - * + * * @param artifact the artifact a project should produce. * @return <code>true</code> if the artifact is produced by a reactor projectart. */ @@ -837,7 +849,7 @@ /** * Utility method that locates a project in the workspace for the given artifact. - * + * * @param artifact the artifact a project should produce. * @return <code>true</code> if the artifact is produced by a reactor projectart. */ @@ -909,7 +921,7 @@ /** * Find the reactor target dir. executedProject doesn't have the multiproject root dir set, and the only way to * extract it is iterating on parent projects. - * + * * @param prj current project * @return the parent target dir. */ @@ -930,7 +942,7 @@ * javadocs artifacts will be attached to the <code>IdeDependency</code> Resolve source and javadoc artifacts. The * resolved artifacts will be downloaded based on the <code>downloadSources</code> and * <code>downloadJavadocs</code> attributes. Source and - * + * * @param deps resolved dependencies */ private void resolveSourceAndJavadocArtifacts( IdeDependency[] deps ) @@ -995,7 +1007,7 @@ /** * Resolve the required artifacts for each of the dependency. <code>sources</code> or <code>javadoc</code> * artifacts (depending on the <code>classifier</code>) are attached to the dependency. - * + * * @param deps resolved dependencies * @param classifier the classifier we are looking for (either <code>sources</code> or <code>javadoc</code>) * @param includeRemoteRepositories flag whether we should search remote repositories for the artifacts or not @@ -1115,4 +1127,9 @@ } getLog().info( msg ); } + + /** + * @return List of dependencies to exclude from eclipse classpath. + */ + public abstract List getExcludes(); } Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java?rev=617382&r1=617381&r2=617382&view=diff ============================================================================== --- maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java (original) +++ maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java Fri Feb 1 01:11:49 2008 @@ -99,7 +99,7 @@ /** * Tests with <code>outputDirectory</code> and <code>outputDir</code> - * + * * @throws Exception */ public void testProject09() @@ -122,7 +122,7 @@ /** * Ear packaging - * + * * @throws Exception any exception thrown during test */ public void testProject12() @@ -133,7 +133,7 @@ /** * Dependency range - MECLIPSE-96 - * + * * @throws Exception any exception thrown during test */ public void testProject13() @@ -144,7 +144,7 @@ /** * Additional natures and builders - MECLIPSE-64 - * + * * @throws Exception any exception thrown during test */ public void testProject14() @@ -155,7 +155,7 @@ /** * <code>outputDirectory</code> parameter - MECLIPSE-11 - * + * * @throws Exception any exception thrown during test */ public void testProject15() @@ -168,7 +168,7 @@ /** * UTF8 encoding - MECLIPSE-56 - * + * * @throws Exception any exception thrown during test */ public void testProject16() @@ -180,7 +180,7 @@ /** * ISO-8859-15 encoding - MECLIPSE-56 - * + * * @throws Exception any exception thrown during test */ public void testProject17() @@ -192,7 +192,7 @@ /** * relative location of system dependencies - MECLIPSE-89 - * + * * @throws Exception any exception thrown during test */ public void testProject18() @@ -203,7 +203,7 @@ /** * Resource targetPath is relative to the project's output directory - MECLIPSE-77 - * + * * @throws Exception any exception thrown during test */ public void testProject19() @@ -214,7 +214,7 @@ /** * WTP 1.5 changes in wtpmodules. - * + * * @throws Exception any exception thrown during test */ public void testProject20() @@ -225,7 +225,7 @@ /** * PDE support. - * + * * @throws Exception any exception thrown during test */ public void testProject21() @@ -236,7 +236,7 @@ /** * PDE support using eclipse-plugin packaging. - * + * * @throws Exception any exception thrown during test */ public void testProject22() @@ -247,7 +247,7 @@ /** * Additional config files using "additionalConfig" property. - * + * * @throws Exception any exception thrown during test */ public void testProject23() @@ -258,7 +258,7 @@ /** * Test rewriting of OSGI manifest files. - * + * * @throws Exception any exception thrown during test */ public void testProject24() @@ -269,7 +269,7 @@ /** * Test source exclude/include. - * + * * @throws Exception any exception thrown during test */ public void testProject25() @@ -280,7 +280,7 @@ /** * Test different compiler settings for test sources. - * + * * @throws Exception any exception thrown during test */ public void testProject26() @@ -291,7 +291,7 @@ /** * Test additional project facets specified. - * + * * @throws Exception any exception thrown during test */ public void testProject27() @@ -302,7 +302,7 @@ /** * MECLIPSE-241 : Compiler settings from parent project aren't used in wtp facet. - * + * * @throws Exception any exception thrown during test */ public void testProject28() @@ -313,7 +313,7 @@ /** * MECLIPSE-198 : EJB version is not resloved - * + * * @throws Exception any exception thrown during test */ public void testProject29() @@ -324,7 +324,7 @@ /** * MECLIPSE-108 : .wtpmodules with version 2.4 for javax.servlet:servlet-api:2.3 - * + * * @throws Exception any exception thrown during test */ public void testProject30() @@ -335,7 +335,7 @@ /** * MECLIPSE-185 : plugin doesn't fail when dependencies are missing - * + * * @throws Exception any exception thrown during test */ public void testProject31() @@ -356,7 +356,7 @@ /** * MECLIPSE-109 : .component wb-resource source path incorrect for ear packaging - * + * * @throws Exception any exception thrown during test */ public void testProject32() @@ -368,7 +368,7 @@ /** * MECLIPSE-287 : dependencies with and without classifiers. MECLIPSE-151 : test jar source attachments. * MECLIPSE-367 : Dependency to artifact with classifier tests not distinguished from the regular artifact - * + * * @throws Exception any exception thrown during test */ public void testProject33() @@ -496,6 +496,16 @@ properties.setProperty( "eclipse.workspace", rad7.workspaceLocation.getCanonicalPath() ); testProject( "project-42", properties, "clean", "eclipse" ); + } + + /** + * [MECLIPSE-79] + * @throws Exception + */ + public void testProject43() + throws Exception + { + testProject( "project-43" ); } public void testJeeSimple() Added: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-43/expected/.classpath URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-43/expected/.classpath?rev=617382&view=auto ============================================================================== --- maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-43/expected/.classpath (added) +++ maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-43/expected/.classpath Fri Feb 1 01:11:49 2008 @@ -0,0 +1,4 @@ +<classpath> + <classpathentry kind="output" path="target/classes"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> +</classpath> \ No newline at end of file Added: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-43/expected/.project URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-43/expected/.project?rev=617382&view=auto ============================================================================== --- maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-43/expected/.project (added) +++ maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-43/expected/.project Fri Feb 1 01:11:49 2008 @@ -0,0 +1,13 @@ +<projectDescription> + <name>maven-eclipse-plugin-test-project-43</name> + <comment/> + <projects/> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> \ No newline at end of file Added: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-43/pom.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-43/pom.xml?rev=617382&view=auto ============================================================================== --- maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-43/pom.xml (added) +++ maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-43/pom.xml Fri Feb 1 01:11:49 2008 @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>eclipse</groupId> + <artifactId>maven-eclipse-plugin-test-project-43</artifactId> + <version>88.0</version> + <name>Maven</name> + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>2.0</version> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <target>1.4</target> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-eclipse-plugin</artifactId> + <configuration> + <excludes> + <exclude>junit:junit</exclude> + </excludes> + <wtpversion>R7</wtpversion> + <projectnatures> + <projectnature>org.eclipse.jdt.core.javanature</projectnature> + </projectnatures> + <buildcommands> + <buildcommand>org.eclipse.jdt.core.javabuilder</buildcommand> + </buildcommands> + </configuration> + </plugin> + </plugins> + </build> +</project> \ No newline at end of file Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-43/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-43/pom.xml ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision HeadURL Propchange: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-43/pom.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml