Author: epunzalan Date: Mon Apr 3 19:31:17 2006 New Revision: 391212 URL: http://svn.apache.org/viewcvs?rev=391212&view=rev Log: PR: MIDEA-43
Added test for idea:module with the minimum plugin configuration Added: maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/IdeaModuleTest.java maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/stubs/ModuleMavenProjectStub.java - copied, changed from r390957, maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/stubs/MavenProjectModuleStub.java maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/stubs/ReactorMavenProjectStub.java maven/plugins/trunk/maven-idea-plugin/src/test/module-plugin-configs/ maven/plugins/trunk/maven-idea-plugin/src/test/module-plugin-configs/min-plugin-config.xml maven/plugins/trunk/maven-idea-plugin/src/test/project-plugin-configs/ - copied from r390955, maven/plugins/trunk/maven-idea-plugin/src/test/plugin-configs/ maven/plugins/trunk/maven-idea-plugin/src/test/project-plugin-configs/min-plugin-config.xml - copied, changed from r391210, maven/plugins/trunk/maven-idea-plugin/src/test/plugin-configs/min-plugin-config.xml maven/plugins/trunk/maven-idea-plugin/src/test/project-plugin-configs/plugin-config-idea4.xml - copied, changed from r391210, maven/plugins/trunk/maven-idea-plugin/src/test/plugin-configs/plugin-config-idea4.xml maven/plugins/trunk/maven-idea-plugin/src/test/project-plugin-configs/plugin-config-jdk11.xml - copied, changed from r391210, maven/plugins/trunk/maven-idea-plugin/src/test/plugin-configs/plugin-config-jdk11.xml maven/plugins/trunk/maven-idea-plugin/src/test/project-plugin-configs/plugin-config-jdk15.xml - copied, changed from r391210, maven/plugins/trunk/maven-idea-plugin/src/test/plugin-configs/plugin-config-jdk15.xml maven/plugins/trunk/maven-idea-plugin/src/test/project-plugin-configs/plugin-config-modules.xml - copied, changed from r391210, maven/plugins/trunk/maven-idea-plugin/src/test/plugin-configs/plugin-config-modules.xml Removed: maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/stubs/MavenProjectModuleStub.java maven/plugins/trunk/maven-idea-plugin/src/test/plugin-configs/ Modified: maven/plugins/trunk/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/AbstractIdeaMojo.java maven/plugins/trunk/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/IdeaCleanMojo.java maven/plugins/trunk/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/IdeaModuleMojo.java maven/plugins/trunk/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/IdeaMojo.java maven/plugins/trunk/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/IdeaProjectMojo.java maven/plugins/trunk/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/IdeaWorkspaceMojo.java maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/AbstractIdeaTestCase.java maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/IdeaProjectTest.java maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/stubs/MavenProjectWithModulesStub.java maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/stubs/SimpleMavenProjectStub.java Modified: maven/plugins/trunk/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/AbstractIdeaMojo.java URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/AbstractIdeaMojo.java?rev=391212&r1=391211&r2=391212&view=diff ============================================================================== --- maven/plugins/trunk/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/AbstractIdeaMojo.java (original) +++ maven/plugins/trunk/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/AbstractIdeaMojo.java Mon Apr 3 19:31:17 2006 @@ -65,11 +65,11 @@ /** * The Maven Project. * - * @parameter expression="${project}" + * @parameter expression="${executedProject}" * @required * @readonly */ - protected MavenProject project; + protected MavenProject executedProject; /* holder for the log object only */ protected Log log; @@ -109,7 +109,7 @@ ArtifactResolver artifactResolver, ArtifactMetadataSource artifactMetadataSource, Log log, boolean overwrite ) { - this.project = project; + this.executedProject = project; this.log = log; @@ -134,7 +134,7 @@ } else { - File altFile = new File( project.getBasedir(), "src/main/idea/" + altFilename ); + File altFile = new File( executedProject.getBasedir(), "src/main/idea/" + altFilename ); if ( altFile.exists() ) { return reader.read( altFile ); @@ -297,7 +297,7 @@ { Set artifacts = new HashSet(); - for ( Iterator dependencies = project.getDependencies().iterator(); dependencies.hasNext(); ) + for ( Iterator dependencies = executedProject.getDependencies().iterator(); dependencies.hasNext(); ) { Dependency dep = (Dependency) dependencies.next(); Modified: maven/plugins/trunk/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/IdeaCleanMojo.java URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/IdeaCleanMojo.java?rev=391212&r1=391211&r2=391212&view=diff ============================================================================== --- maven/plugins/trunk/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/IdeaCleanMojo.java (original) +++ maven/plugins/trunk/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/IdeaCleanMojo.java Mon Apr 3 19:31:17 2006 @@ -34,7 +34,7 @@ extends AbstractMojo { /** - * @parameter expression="${project}" + * @parameter expression="${executedProject}" * @required */ private MavenProject project; Modified: maven/plugins/trunk/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/IdeaModuleMojo.java URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/IdeaModuleMojo.java?rev=391212&r1=391211&r2=391212&view=diff ============================================================================== --- maven/plugins/trunk/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/IdeaModuleMojo.java (original) +++ maven/plugins/trunk/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/IdeaModuleMojo.java Mon Apr 3 19:31:17 2006 @@ -54,13 +54,6 @@ extends AbstractIdeaMojo { /** - * The Maven Project. - * - * @parameter expression="${executedProject}" - */ - private MavenProject executedProject; - - /** * The reactor projects in a multi-module build. * * @parameter expression="${reactorProjects}" @@ -182,8 +175,6 @@ super.initParam( project, artifactFactory, localRepo, artifactResolver, artifactMetadataSource, log, overwrite ); - this.executedProject = executedProject; - this.reactorProjects = reactorProjects; this.wagonManager = wagonManager; @@ -220,7 +211,7 @@ { try { - doDependencyResolution( project, localRepo ); + doDependencyResolution( executedProject, localRepo ); } catch ( Exception e ) { @@ -233,7 +224,7 @@ public void rewriteModule() throws MojoExecutionException { - File moduleFile = new File( project.getBasedir(), project.getArtifactId() + ".iml" ); + File moduleFile = new File( executedProject.getBasedir(), executedProject.getArtifactId() + ".iml" ); try { Document document = readXmlDocument( moduleFile, "module.xml" ); @@ -242,25 +233,25 @@ // TODO: how can we let the WAR/EJBs plugin hook in and provide this? // TODO: merge in ejb-module, etc. - if ( "war".equals( project.getPackaging() ) ) + if ( "war".equals( executedProject.getPackaging() ) ) { addWebModule( module ); } - else if ( "ejb".equals( project.getPackaging() ) ) + else if ( "ejb".equals( executedProject.getPackaging() ) ) { addEjbModule( module ); } - else if ( "ear".equals( project.getPackaging() ) ) + else if ( "ear".equals( executedProject.getPackaging() ) ) { addEarModule( module ); } Element component = findComponent( module, "NewModuleRootManager" ); Element output = findElement( component, "output" ); - output.addAttribute( "url", getModuleFileUrl( project.getBuild().getOutputDirectory() ) ); + output.addAttribute( "url", getModuleFileUrl( executedProject.getBuild().getOutputDirectory() ) ); Element outputTest = findElement( component, "output-test" ); - outputTest.addAttribute( "url", getModuleFileUrl( project.getBuild().getTestOutputDirectory() ) ); + outputTest.addAttribute( "url", getModuleFileUrl( executedProject.getBuild().getTestOutputDirectory() ) ); Element content = findElement( component, "content" ); @@ -277,7 +268,7 @@ addSourceFolder( content, directory, true ); } - for ( Iterator i = project.getBuild().getResources().iterator(); i.hasNext(); ) + for ( Iterator i = executedProject.getBuild().getResources().iterator(); i.hasNext(); ) { Resource resource = (Resource) i.next(); String directory = resource.getDirectory(); @@ -293,7 +284,7 @@ } } - for ( Iterator i = project.getBuild().getTestResources().iterator(); i.hasNext(); ) + for ( Iterator i = executedProject.getBuild().getTestResources().iterator(); i.hasNext(); ) { Resource resource = (Resource) i.next(); String directory = resource.getDirectory(); @@ -312,9 +303,9 @@ removeOldElements( content, "excludeFolder" ); //For excludeFolder - File target = new File( project.getBuild().getDirectory() ); - File classes = new File( project.getBuild().getOutputDirectory() ); - File testClasses = new File( project.getBuild().getTestOutputDirectory() ); + File target = new File( executedProject.getBuild().getDirectory() ); + File classes = new File( executedProject.getBuild().getOutputDirectory() ); + File testClasses = new File( executedProject.getBuild().getTestOutputDirectory() ); List sourceFolders = content.elements( "sourceFolder" ); @@ -328,7 +319,7 @@ String[] dirs = exclude.split( "[,\\s]+" ); for ( int i = 0; i < dirs.length; i++ ) { - File excludedDir = new File( project.getBasedir(), dirs[i] ); + File excludedDir = new File( executedProject.getBasedir(), dirs[i] ); filteredExcludes.addAll( getExcludedDirectories( excludedDir, filteredExcludes, sourceFolders ) ); } } @@ -363,7 +354,7 @@ removeOldDependencies( component ); - List testClasspathElements = project.getTestArtifacts(); + List testClasspathElements = executedProject.getTestArtifacts(); for ( Iterator i = testClasspathElements.iterator(); i.hasNext(); ) { Artifact a = (Artifact) i.next(); @@ -520,14 +511,14 @@ module.addAttribute( "type", "J2EE_APPLICATION_MODULE" ); Element component = findComponent( module, "ApplicationModuleProperties" ); addDeploymentDescriptor( component, "application.xml", "1.3", - project.getBuild().getDirectory() + "/application.xml" ); + executedProject.getBuild().getDirectory() + "/application.xml" ); } private void addEjbModule( Element module ) { module.addAttribute( "type", "J2EE_EJB_MODULE" ); - String explodedDir = project.getBuild().getDirectory() + "/" + project.getArtifactId(); + String explodedDir = executedProject.getBuild().getDirectory() + "/" + executedProject.getArtifactId(); Element component = findComponent( module, "EjbModuleBuildComponent" ); @@ -538,7 +529,7 @@ addDeploymentDescriptor( component, "ejb-jar.xml", "2.x", "src/main/resources/META-INF/ejb-jar.xml" ); removeOldElements( component, "containerElement" ); - List artifacts = project.getTestArtifacts(); + List artifacts = executedProject.getTestArtifacts(); for ( Iterator i = artifacts.iterator(); i.hasNext(); ) { Artifact artifact = (Artifact) i.next(); @@ -681,26 +672,7 @@ // --> this is where the OGNL out of a plugin would be helpful as we could run package first and // grab stuff from the mojo -/* -Can't run this anyway as Xpp3Dom is in both classloaders... - Xpp3Dom configuration = project.getGoalConfiguration( "maven-war-plugin", "war" ); - String warWebapp = configuration.getChild( "webappDirectory" ).getValue(); - if ( warWebapp == null ) - { - warWebapp = project.getBuild().getDirectory() + "/" + project.getArtifactId(); - } - String warSrc = configuration.getChild( "warSrc" ).getValue(); - if ( warSrc == null ) - { - warSrc = "src/main/webapp"; - } - String webXml = configuration.getChild( "webXml" ).getValue(); - if ( webXml == null ) - { - webXml = warSrc + "/WEB-INF/web.xml"; - } -*/ - String warWebapp = project.getBuild().getDirectory() + "/" + project.getArtifactId(); + String warWebapp = executedProject.getBuild().getDirectory() + "/" + executedProject.getArtifactId(); String warSrc = "src/main/webapp"; String webXml = warSrc + "/WEB-INF/web.xml"; @@ -713,7 +685,7 @@ component = findComponent( module, "WebModuleProperties" ); removeOldElements( component, "containerElement" ); - List artifacts = project.getTestArtifacts(); + List artifacts = executedProject.getTestArtifacts(); for ( Iterator i = artifacts.iterator(); i.hasNext(); ) { Artifact artifact = (Artifact) i.next(); @@ -776,7 +748,7 @@ private String getModuleFileUrl( String file ) { - return getModuleFileUrl( project.getBasedir(), file ); + return getModuleFileUrl( executedProject.getBasedir(), file ); } /** @@ -869,7 +841,7 @@ return null; } - List remoteRepos = project.getRemoteArtifactRepositories(); + List remoteRepos = executedProject.getRemoteArtifactRepositories(); try { Artifact classifiedArtifact = artifactFactory.createArtifactWithClassifier( artifact.getGroupId(), Modified: maven/plugins/trunk/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/IdeaMojo.java URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/IdeaMojo.java?rev=391212&r1=391211&r2=391212&view=diff ============================================================================== --- maven/plugins/trunk/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/IdeaMojo.java (original) +++ maven/plugins/trunk/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/IdeaMojo.java Mon Apr 3 19:31:17 2006 @@ -181,7 +181,7 @@ { try { - doDependencyResolution( project, localRepo ); + doDependencyResolution( executedProject, localRepo ); } catch ( Exception e ) { @@ -191,7 +191,7 @@ Set macros = new HashSet(); rewriteModule( macros ); - if ( project.isExecutionRoot() ) + if ( executedProject.isExecutionRoot() ) { rewriteProject( macros ); @@ -204,7 +204,7 @@ { IdeaModuleMojo mojo = new IdeaModuleMojo(); - mojo.initParam( project, artifactFactory, localRepo, artifactResolver, artifactMetadataSource, getLog(), + mojo.initParam( executedProject, artifactFactory, localRepo, artifactResolver, artifactMetadataSource, getLog(), overwrite, executedProject, reactorProjects, wagonManager, linkModules, useFullNames, downloadSources, sourceClassifier, downloadJavadocs, javadocClassifier, libraries, macros, exclude, dependenciesAsLibraries ); @@ -217,7 +217,7 @@ { IdeaProjectMojo mojo = new IdeaProjectMojo(); - mojo.initParam( project, artifactFactory, localRepo, artifactResolver, artifactMetadataSource, getLog(), + mojo.initParam( executedProject, artifactFactory, localRepo, artifactResolver, artifactMetadataSource, getLog(), overwrite, jdkName, jdkLevel, wildcardResourcePatterns, ideaVersion, macros ); mojo.rewriteProject(); @@ -228,7 +228,7 @@ { IdeaWorkspaceMojo mojo = new IdeaWorkspaceMojo(); - mojo.initParam( project, artifactFactory, localRepo, artifactResolver, artifactMetadataSource, getLog(), + mojo.initParam( executedProject, artifactFactory, localRepo, artifactResolver, artifactMetadataSource, getLog(), overwrite ); mojo.rewriteWorkspace(); @@ -236,6 +236,6 @@ public void setProject( MavenProject project ) { - this.project = project; + this.executedProject = project; } } Modified: maven/plugins/trunk/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/IdeaProjectMojo.java URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/IdeaProjectMojo.java?rev=391212&r1=391211&r2=391212&view=diff ============================================================================== --- maven/plugins/trunk/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/IdeaProjectMojo.java (original) +++ maven/plugins/trunk/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/IdeaProjectMojo.java Mon Apr 3 19:31:17 2006 @@ -113,7 +113,7 @@ { try { - doDependencyResolution( project, localRepo ); + doDependencyResolution( executedProject, localRepo ); } catch ( Exception e ) { @@ -126,7 +126,7 @@ public void rewriteProject() throws MojoExecutionException { - File projectFile = new File( project.getBasedir(), project.getArtifactId() + ".ipr" ); + File projectFile = new File( executedProject.getBasedir(), executedProject.getArtifactId() + ".ipr" ); try { @@ -163,28 +163,28 @@ removeOldElements( modules, "module" ); - if ( project.getCollectedProjects().size() > 0 ) + if ( executedProject.getCollectedProjects().size() > 0 ) { Element m = createElement( modules, "module" ); String projectPath = - new File( project.getBasedir(), project.getArtifactId() + ".iml" ).getAbsolutePath(); - m.addAttribute( "filepath", "$PROJECT_DIR$/" + toRelative( project.getBasedir(), projectPath ) ); + new File( executedProject.getBasedir(), executedProject.getArtifactId() + ".iml" ).getAbsolutePath(); + m.addAttribute( "filepath", "$PROJECT_DIR$/" + toRelative( executedProject.getBasedir(), projectPath ) ); - for ( Iterator i = project.getCollectedProjects().iterator(); i.hasNext(); ) + for ( Iterator i = executedProject.getCollectedProjects().iterator(); i.hasNext(); ) { MavenProject p = (MavenProject) i.next(); m = createElement( modules, "module" ); String modulePath = new File( p.getBasedir(), p.getArtifactId() + ".iml" ).getAbsolutePath(); - m.addAttribute( "filepath", "$PROJECT_DIR$/" + toRelative( project.getBasedir(), modulePath ) ); + m.addAttribute( "filepath", "$PROJECT_DIR$/" + toRelative( executedProject.getBasedir(), modulePath ) ); } } else { Element m = createElement( modules, "module" ); String modulePath = - new File( project.getBasedir(), project.getArtifactId() + ".iml" ).getAbsolutePath(); - m.addAttribute( "filepath", "$PROJECT_DIR$/" + toRelative( project.getBasedir(), modulePath ) ); + new File( executedProject.getBasedir(), executedProject.getArtifactId() + ".iml" ).getAbsolutePath(); + m.addAttribute( "filepath", "$PROJECT_DIR$/" + toRelative( executedProject.getBasedir(), modulePath ) ); } // add any PathMacros we've come across Modified: maven/plugins/trunk/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/IdeaWorkspaceMojo.java URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/IdeaWorkspaceMojo.java?rev=391212&r1=391211&r2=391212&view=diff ============================================================================== --- maven/plugins/trunk/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/IdeaWorkspaceMojo.java (original) +++ maven/plugins/trunk/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/IdeaWorkspaceMojo.java Mon Apr 3 19:31:17 2006 @@ -43,7 +43,7 @@ { try { - doDependencyResolution( project, localRepo ); + doDependencyResolution( executedProject, localRepo ); } catch ( Exception e ) { @@ -56,7 +56,7 @@ public void rewriteWorkspace() throws MojoExecutionException { - File workspaceFile = new File( project.getBasedir(), project.getArtifactId() + ".iws" ); + File workspaceFile = new File( executedProject.getBasedir(), executedProject.getArtifactId() + ".iws" ); try { @@ -105,17 +105,17 @@ { String scmType; - if ( project.getScm() == null ) + if ( executedProject.getScm() == null ) { return null; } - scmType = getScmType( project.getScm().getConnection() ); + scmType = getScmType( executedProject.getScm().getConnection() ); if ( scmType != null ) { return scmType; } - scmType = getScmType( project.getScm().getDeveloperConnection() ); + scmType = getScmType( executedProject.getScm().getDeveloperConnection() ); return scmType; } Modified: maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/AbstractIdeaTestCase.java URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/AbstractIdeaTestCase.java?rev=391212&r1=391211&r2=391212&view=diff ============================================================================== --- maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/AbstractIdeaTestCase.java (original) +++ maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/AbstractIdeaTestCase.java Mon Apr 3 19:31:17 2006 @@ -22,6 +22,7 @@ import org.dom4j.io.SAXReader; import org.apache.maven.plugin.idea.stubs.TestCounter; import org.apache.maven.plugin.testing.AbstractMojoTestCase; +import org.apache.maven.plugin.Mojo; import java.io.File; import java.util.Iterator; @@ -33,26 +34,27 @@ public abstract class AbstractIdeaTestCase extends AbstractMojoTestCase { - protected IdeaProjectMojo mojo; + protected Mojo mojo; - protected Document executeMojo( String pluginXml ) + protected Document executeMojo( String goal, String pluginXml, String targetExtension ) throws Exception { File pluginXmlFile = new File( getBasedir(), pluginXml ); - mojo = (IdeaProjectMojo) lookupMojo( "project", pluginXmlFile ); + mojo = lookupMojo( goal, pluginXmlFile ); - assertNotNull( "Get project mojo instance using " + pluginXmlFile.getAbsolutePath() , mojo ); + assertNotNull( "Get mojo instance using " + pluginXmlFile.getAbsolutePath() , mojo ); mojo.execute(); int testCounter = TestCounter.currentCount(); - File iprFile = new File( "target/test-harness/" + testCounter + "/plugin-test-" + testCounter + ".ipr" ); + File outputFile = new File( "target/test-harness/" + testCounter + + "/plugin-test-" + testCounter + "." + targetExtension ); - assertTrue( "Project file was created", iprFile.exists() ); + assertTrue( "Target file was created", outputFile.exists() ); - return readXmlDocument( iprFile ); + return readXmlDocument( outputFile ); } protected Document readXmlDocument( File xmlFile ) Added: maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/IdeaModuleTest.java URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/IdeaModuleTest.java?rev=391212&view=auto ============================================================================== --- maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/IdeaModuleTest.java (added) +++ maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/IdeaModuleTest.java Mon Apr 3 19:31:17 2006 @@ -0,0 +1,40 @@ +package org.apache.maven.plugin.idea; + +import org.dom4j.Document; + +/* + * Copyright 2005-2006 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @author Edwin Punzalan + */ +public class IdeaModuleTest + extends AbstractIdeaTestCase +{ + public void testMinConfig() + throws Exception + { + Document imlDocument = executeMojo( "src/test/module-plugin-configs/min-plugin-config.xml" ); + + + } + + protected Document executeMojo( String pluginXml ) + throws Exception + { + return super.executeMojo( "module", pluginXml, "iml" ); + } +} Modified: maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/IdeaProjectTest.java URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/IdeaProjectTest.java?rev=391212&r1=391211&r2=391212&view=diff ============================================================================== --- maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/IdeaProjectTest.java (original) +++ maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/IdeaProjectTest.java Mon Apr 3 19:31:17 2006 @@ -31,7 +31,7 @@ public void testIdeaProjectTestEnvironment() throws Exception { - Document iprDocument = executeMojo( "src/test/plugin-configs/min-plugin-config.xml" ); + Document iprDocument = executeMojo( "src/test/project-plugin-configs/min-plugin-config.xml" ); testJdkName( iprDocument, null, null ); } @@ -39,7 +39,7 @@ public void testIdeaProjectVersion4() throws Exception { - Document iprDocument = executeMojo( "src/test/plugin-configs/plugin-config-idea4.xml" ); + Document iprDocument = executeMojo( "src/test/project-plugin-configs/plugin-config-idea4.xml" ); Element root = iprDocument.getRootElement(); @@ -62,7 +62,7 @@ public void testIdeaProjectJdk11() throws Exception { - Document iprDocument = executeMojo( "src/test/plugin-configs/plugin-config-jdk11.xml" ); + Document iprDocument = executeMojo( "src/test/project-plugin-configs/plugin-config-jdk11.xml" ); testJdkName( iprDocument, "1.1", "java version 1.1" ); } @@ -70,7 +70,7 @@ public void testIdeaProjectJdk15() throws Exception { - Document iprDocument = executeMojo( "src/test/plugin-configs/plugin-config-jdk15.xml" ); + Document iprDocument = executeMojo( "src/test/project-plugin-configs/plugin-config-jdk15.xml" ); testJdkName( iprDocument, "1.5", "java version 1.5" ); } @@ -78,7 +78,7 @@ public void testIdeaProjectWithModules() throws Exception { - Document iprDocument = executeMojo( "src/test/plugin-configs/plugin-config-modules.xml" ); + Document iprDocument = executeMojo( "src/test/project-plugin-configs/plugin-config-modules.xml" ); Element component = findComponent( iprDocument.getRootElement(), "ProjectModuleManager" ); @@ -149,5 +149,11 @@ { assertEquals( "Expected jdkName test", jdkName, expected ); } + } + + protected Document executeMojo( String pluginXml ) + throws Exception + { + return super.executeMojo( "project", pluginXml, "ipr" ); } } Modified: maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/stubs/MavenProjectWithModulesStub.java URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/stubs/MavenProjectWithModulesStub.java?rev=391212&r1=391211&r2=391212&view=diff ============================================================================== --- maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/stubs/MavenProjectWithModulesStub.java (original) +++ maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/stubs/MavenProjectWithModulesStub.java Mon Apr 3 19:31:17 2006 @@ -41,6 +41,6 @@ private MavenProject createModule( String artifactId ) { - return new MavenProjectModuleStub( artifactId, new File( getBasedir(), artifactId ) ); + return new ModuleMavenProjectStub( artifactId, new File( getBasedir(), artifactId ) ); } } Copied: maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/stubs/ModuleMavenProjectStub.java (from r390957, maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/stubs/MavenProjectModuleStub.java) URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/stubs/ModuleMavenProjectStub.java?p2=maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/stubs/ModuleMavenProjectStub.java&p1=maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/stubs/MavenProjectModuleStub.java&r1=390957&r2=391212&rev=391212&view=diff ============================================================================== --- maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/stubs/MavenProjectModuleStub.java (original) +++ maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/stubs/ModuleMavenProjectStub.java Mon Apr 3 19:31:17 2006 @@ -23,14 +23,14 @@ /** * @author Edwin Punzalan */ -public class MavenProjectModuleStub +public class ModuleMavenProjectStub extends MavenProjectStub { private File basedir; private String artifactId; - public MavenProjectModuleStub( String artifactId, File basedir ) + public ModuleMavenProjectStub( String artifactId, File basedir ) { super(); Added: maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/stubs/ReactorMavenProjectStub.java URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/stubs/ReactorMavenProjectStub.java?rev=391212&view=auto ============================================================================== --- maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/stubs/ReactorMavenProjectStub.java (added) +++ maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/stubs/ReactorMavenProjectStub.java Mon Apr 3 19:31:17 2006 @@ -0,0 +1,45 @@ +package org.apache.maven.plugin.idea.stubs; + +/* + * Copyright 2005-2006 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @author Edwin Punzalan + */ +public class ReactorMavenProjectStub + extends SimpleMavenProjectStub +{ + private static int reactorProjectCounter = 0; + + private String artifactId; + + public ReactorMavenProjectStub() + { + reactorProjectCounter++; + + setArtifactId( "plugin-reactor-project-" + reactorProjectCounter ); + } + + public void setArtifactId( String artifactId ) + { + this.artifactId = artifactId; + } + + public String getArtifactId() + { + return artifactId; + } +} Modified: maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/stubs/SimpleMavenProjectStub.java URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/stubs/SimpleMavenProjectStub.java?rev=391212&r1=391211&r2=391212&view=diff ============================================================================== --- maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/stubs/SimpleMavenProjectStub.java (original) +++ maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/stubs/SimpleMavenProjectStub.java Mon Apr 3 19:31:17 2006 @@ -18,6 +18,7 @@ import org.apache.maven.artifact.Artifact; import org.apache.maven.model.Dependency; +import org.apache.maven.model.Build; import org.apache.maven.plugin.testing.stubs.MavenProjectStub; import java.io.File; @@ -33,9 +34,18 @@ { private List collectedProjects; + private Build build; + + private List testArtifacts; + public SimpleMavenProjectStub() { TestCounter.nextCount(); + + build = new Build(); + build.setDirectory( getBasedir().getAbsolutePath() + "/target" ); + build.setOutputDirectory( getBasedir().getAbsolutePath() + "/target/classes" ); + build.setTestOutputDirectory( getBasedir().getAbsolutePath() + "/target/test-classes" ); } public String getGroupId() @@ -106,8 +116,51 @@ return artifact; } + public Build getBuild() + { + return build; + } + public List getRemoteArtifactRepositories() { return Collections.EMPTY_LIST; + } + + public List getCompileSourceRoots() + { + return Collections.singletonList( getBasedir().getAbsolutePath() + "/src/main/java" ); + } + + public List getTestArtifacts() + { + if ( testArtifacts == null ) + { + testArtifacts = new ArrayList(); + + testArtifacts.add( createArtifact( "junit", "junit", "1.0.4" ) ); + } + + return testArtifacts; + } + + public void setTestArtifacts( List artifacts ) + { + testArtifacts = artifacts; + } + + public List getTestCompileSourceRoots() + { + return Collections.singletonList( getBasedir().getAbsolutePath() + "/src/test/java" ); + } + + private Artifact createArtifact( String groupId, String artifactId, String version ) + { + Artifact artifact = new IdeaArtifactStub(); + + artifact.setGroupId( groupId ); + artifact.setArtifactId( artifactId ); + artifact.setVersion( version ); + + return artifact; } } Added: maven/plugins/trunk/maven-idea-plugin/src/test/module-plugin-configs/min-plugin-config.xml URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-idea-plugin/src/test/module-plugin-configs/min-plugin-config.xml?rev=391212&view=auto ============================================================================== --- maven/plugins/trunk/maven-idea-plugin/src/test/module-plugin-configs/min-plugin-config.xml (added) +++ maven/plugins/trunk/maven-idea-plugin/src/test/module-plugin-configs/min-plugin-config.xml Mon Apr 3 19:31:17 2006 @@ -0,0 +1,42 @@ +<!-- + ~ Copyright 2005-2006 The Apache Software Foundation. + ~ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + --> + +<project> + <build> + <plugins> + <plugin> + <artifactId>maven-idea-plugin</artifactId> + <configuration> + <executedProject implementation="org.apache.maven.plugin.idea.stubs.SimpleMavenProjectStub"/> + <localRepo>${localRepository}</localRepo> + <overwrite>false</overwrite> + <reactorProjects> + <reactorProject implementation="org.apache.maven.plugin.idea.stubs.ReactorMavenProjectStub"/> + <reactorProject implementation="org.apache.maven.plugin.idea.stubs.ReactorMavenProjectStub"/> + <reactorProject implementation="org.apache.maven.plugin.idea.stubs.ReactorMavenProjectStub"/> + </reactorProjects> + <linkModules>true</linkModules> + <useFullNames>false</useFullNames> + <downloadSources>false</downloadSources> + <sourceClassifier>sources</sourceClassifier> + <downloadJavadocs>false</downloadJavadocs> + <javadocClassifier>javadoc</javadocClassifier> + <dependenciesAsLibraries>true</dependenciesAsLibraries> + </configuration> + </plugin> + </plugins> + </build> +</project> \ No newline at end of file Copied: maven/plugins/trunk/maven-idea-plugin/src/test/project-plugin-configs/min-plugin-config.xml (from r391210, maven/plugins/trunk/maven-idea-plugin/src/test/plugin-configs/min-plugin-config.xml) URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-idea-plugin/src/test/project-plugin-configs/min-plugin-config.xml?p2=maven/plugins/trunk/maven-idea-plugin/src/test/project-plugin-configs/min-plugin-config.xml&p1=maven/plugins/trunk/maven-idea-plugin/src/test/plugin-configs/min-plugin-config.xml&r1=391210&r2=391212&rev=391212&view=diff ============================================================================== --- maven/plugins/trunk/maven-idea-plugin/src/test/plugin-configs/min-plugin-config.xml (original) +++ maven/plugins/trunk/maven-idea-plugin/src/test/project-plugin-configs/min-plugin-config.xml Mon Apr 3 19:31:17 2006 @@ -1,20 +1,18 @@ <!-- -/* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - --> + ~ Copyright 2005-2006 The Apache Software Foundation. + ~ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + --> <project> <build> @@ -22,9 +20,10 @@ <plugin> <artifactId>maven-idea-plugin</artifactId> <configuration> - <project implementation="org.apache.maven.plugin.idea.stubs.SimpleMavenProjectStub"/> + <executedProject implementation="org.apache.maven.plugin.idea.stubs.SimpleMavenProjectStub"/> <localRepo>${localRepository}</localRepo> <ideaVersion>4</ideaVersion> + <overwrite>false</overwrite> </configuration> </plugin> </plugins> Copied: maven/plugins/trunk/maven-idea-plugin/src/test/project-plugin-configs/plugin-config-idea4.xml (from r391210, maven/plugins/trunk/maven-idea-plugin/src/test/plugin-configs/plugin-config-idea4.xml) URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-idea-plugin/src/test/project-plugin-configs/plugin-config-idea4.xml?p2=maven/plugins/trunk/maven-idea-plugin/src/test/project-plugin-configs/plugin-config-idea4.xml&p1=maven/plugins/trunk/maven-idea-plugin/src/test/plugin-configs/plugin-config-idea4.xml&r1=391210&r2=391212&rev=391212&view=diff ============================================================================== --- maven/plugins/trunk/maven-idea-plugin/src/test/plugin-configs/plugin-config-idea4.xml (original) +++ maven/plugins/trunk/maven-idea-plugin/src/test/project-plugin-configs/plugin-config-idea4.xml Mon Apr 3 19:31:17 2006 @@ -1,20 +1,18 @@ <!-- -/* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - --> + ~ Copyright 2005-2006 The Apache Software Foundation. + ~ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + --> <project> <build> @@ -22,9 +20,10 @@ <plugin> <artifactId>maven-idea-plugin</artifactId> <configuration> - <project implementation="org.apache.maven.plugin.idea.stubs.SimpleMavenProjectStub"/> + <executedProject implementation="org.apache.maven.plugin.idea.stubs.SimpleMavenProjectStub"/> <localRepo>${localRepository}</localRepo> <ideaVersion>4</ideaVersion> + <overwrite>false</overwrite> <wildcardResourcePatterns>!?*.java</wildcardResourcePatterns> </configuration> </plugin> Copied: maven/plugins/trunk/maven-idea-plugin/src/test/project-plugin-configs/plugin-config-jdk11.xml (from r391210, maven/plugins/trunk/maven-idea-plugin/src/test/plugin-configs/plugin-config-jdk11.xml) URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-idea-plugin/src/test/project-plugin-configs/plugin-config-jdk11.xml?p2=maven/plugins/trunk/maven-idea-plugin/src/test/project-plugin-configs/plugin-config-jdk11.xml&p1=maven/plugins/trunk/maven-idea-plugin/src/test/plugin-configs/plugin-config-jdk11.xml&r1=391210&r2=391212&rev=391212&view=diff ============================================================================== --- maven/plugins/trunk/maven-idea-plugin/src/test/plugin-configs/plugin-config-jdk11.xml (original) +++ maven/plugins/trunk/maven-idea-plugin/src/test/project-plugin-configs/plugin-config-jdk11.xml Mon Apr 3 19:31:17 2006 @@ -1,20 +1,18 @@ <!-- -/* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - --> + ~ Copyright 2005-2006 The Apache Software Foundation. + ~ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + --> <project> <build> @@ -22,9 +20,10 @@ <plugin> <artifactId>maven-idea-plugin</artifactId> <configuration> - <project implementation="org.apache.maven.plugin.idea.stubs.SimpleMavenProjectStub"/> + <executedProject implementation="org.apache.maven.plugin.idea.stubs.SimpleMavenProjectStub"/> <localRepo>${localRepository}</localRepo> <ideaVersion>4</ideaVersion> + <overwrite>false</overwrite> <jdkName>java version 1.1</jdkName> <jdkLevel>1.1</jdkLevel> </configuration> Copied: maven/plugins/trunk/maven-idea-plugin/src/test/project-plugin-configs/plugin-config-jdk15.xml (from r391210, maven/plugins/trunk/maven-idea-plugin/src/test/plugin-configs/plugin-config-jdk15.xml) URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-idea-plugin/src/test/project-plugin-configs/plugin-config-jdk15.xml?p2=maven/plugins/trunk/maven-idea-plugin/src/test/project-plugin-configs/plugin-config-jdk15.xml&p1=maven/plugins/trunk/maven-idea-plugin/src/test/plugin-configs/plugin-config-jdk15.xml&r1=391210&r2=391212&rev=391212&view=diff ============================================================================== --- maven/plugins/trunk/maven-idea-plugin/src/test/plugin-configs/plugin-config-jdk15.xml (original) +++ maven/plugins/trunk/maven-idea-plugin/src/test/project-plugin-configs/plugin-config-jdk15.xml Mon Apr 3 19:31:17 2006 @@ -1,20 +1,18 @@ <!-- -/* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - --> + ~ Copyright 2005-2006 The Apache Software Foundation. + ~ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + --> <project> <build> @@ -22,9 +20,10 @@ <plugin> <artifactId>maven-idea-plugin</artifactId> <configuration> - <project implementation="org.apache.maven.plugin.idea.stubs.SimpleMavenProjectStub"/> + <executedProject implementation="org.apache.maven.plugin.idea.stubs.SimpleMavenProjectStub"/> <localRepo>${localRepository}</localRepo> <ideaVersion>4</ideaVersion> + <overwrite>false</overwrite> <jdkName>java version 1.5</jdkName> <jdkLevel>1.5</jdkLevel> </configuration> Copied: maven/plugins/trunk/maven-idea-plugin/src/test/project-plugin-configs/plugin-config-modules.xml (from r391210, maven/plugins/trunk/maven-idea-plugin/src/test/plugin-configs/plugin-config-modules.xml) URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-idea-plugin/src/test/project-plugin-configs/plugin-config-modules.xml?p2=maven/plugins/trunk/maven-idea-plugin/src/test/project-plugin-configs/plugin-config-modules.xml&p1=maven/plugins/trunk/maven-idea-plugin/src/test/plugin-configs/plugin-config-modules.xml&r1=391210&r2=391212&rev=391212&view=diff ============================================================================== --- maven/plugins/trunk/maven-idea-plugin/src/test/plugin-configs/plugin-config-modules.xml (original) +++ maven/plugins/trunk/maven-idea-plugin/src/test/project-plugin-configs/plugin-config-modules.xml Mon Apr 3 19:31:17 2006 @@ -1,20 +1,18 @@ <!-- -/* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - --> + ~ Copyright 2005-2006 The Apache Software Foundation. + ~ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + --> <project> <build> @@ -22,8 +20,9 @@ <plugin> <artifactId>maven-idea-plugin</artifactId> <configuration> - <project implementation="org.apache.maven.plugin.idea.stubs.MavenProjectWithModulesStub"/> + <executedProject implementation="org.apache.maven.plugin.idea.stubs.MavenProjectWithModulesStub"/> <localRepo>${localRepository}</localRepo> + <overwrite>false</overwrite> <ideaVersion>4</ideaVersion> </configuration> </plugin>