Author: epunzalan Date: Tue Mar 28 22:33:09 2006 New Revision: 389692 URL: http://svn.apache.org/viewcvs?rev=389692&view=rev Log: Committing what I have before I evaluate a patch
Added: maven/plugins/trunk/maven-idea-plugin/src/test/plugin-configs/plugin-config-idea5.xml maven/plugins/trunk/maven-idea-plugin/src/test/plugin-configs/plugin-config-jdkName.xml Modified: maven/plugins/trunk/maven-idea-plugin/pom.xml maven/plugins/trunk/maven-idea-plugin/src/test/java/org/apache/maven/plugin/idea/IdeaProjectTest.java Modified: maven/plugins/trunk/maven-idea-plugin/pom.xml URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-idea-plugin/pom.xml?rev=389692&r1=389691&r2=389692&view=diff ============================================================================== --- maven/plugins/trunk/maven-idea-plugin/pom.xml (original) +++ maven/plugins/trunk/maven-idea-plugin/pom.xml Tue Mar 28 22:33:09 2006 @@ -60,4 +60,14 @@ <scope>test</scope> </dependency> </dependencies> + <build> + <plugins> + <plugin> + <artifactId>maven-surefire-plugin</artifactId> + <configuration> + <childDelegation>false</childDelegation> + </configuration> + </plugin> + </plugins> + </build> </project> 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=389692&r1=389691&r2=389692&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 Tue Mar 28 22:33:09 2006 @@ -44,10 +44,27 @@ "/plugin-test-" + testCounter + ".ipr" ).exists() ); } - public void testIdeaProjectTestEnvironment2() + public void testIdeaProjectVersion5() throws Exception { - File testPom = new File( getBasedir(), "src/test/plugin-configs/min-plugin-config.xml" ); + File testPom = new File( getBasedir(), "src/test/plugin-configs/plugin-config-idea5.xml" ); + + IdeaProjectMojo mojo = (IdeaProjectMojo) lookupMojo( "project", testPom ); + + assertNotNull( "Get project mojo instance using " + testPom.getAbsolutePath() , mojo ); + + mojo.execute(); + + int testCounter = SimpleMavenProjectStub.getUsageCounter(); + + assertTrue( "Project file was created", new File( "target/test-harness/" + testCounter + + "/plugin-test-" + testCounter + ".ipr" ).exists() ); + } + + public void testIdeaProjectJdkName() + throws Exception + { + File testPom = new File( getBasedir(), "src/test/plugin-configs/plugin-config-jdkName.xml" ); IdeaProjectMojo mojo = (IdeaProjectMojo) lookupMojo( "project", testPom ); Added: maven/plugins/trunk/maven-idea-plugin/src/test/plugin-configs/plugin-config-idea5.xml URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-idea-plugin/src/test/plugin-configs/plugin-config-idea5.xml?rev=389692&view=auto ============================================================================== --- maven/plugins/trunk/maven-idea-plugin/src/test/plugin-configs/plugin-config-idea5.xml (added) +++ maven/plugins/trunk/maven-idea-plugin/src/test/plugin-configs/plugin-config-idea5.xml Tue Mar 28 22:33:09 2006 @@ -0,0 +1,14 @@ +<project> + <build> + <plugins> + <plugin> + <artifactId>maven-idea-plugin</artifactId> + <configuration> + <project implementation="org.apache.maven.plugin.idea.stubs.SimpleMavenProjectStub"/> + <localRepo implementation="org.apache.maven.plugin.idea.stubs.LocalRepositoryStub"/> + <ideaVersion>5</ideaVersion> + </configuration> + </plugin> + </plugins> + </build> +</project> \ No newline at end of file Added: maven/plugins/trunk/maven-idea-plugin/src/test/plugin-configs/plugin-config-jdkName.xml URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-idea-plugin/src/test/plugin-configs/plugin-config-jdkName.xml?rev=389692&view=auto ============================================================================== --- maven/plugins/trunk/maven-idea-plugin/src/test/plugin-configs/plugin-config-jdkName.xml (added) +++ maven/plugins/trunk/maven-idea-plugin/src/test/plugin-configs/plugin-config-jdkName.xml Tue Mar 28 22:33:09 2006 @@ -0,0 +1,15 @@ +<project> + <build> + <plugins> + <plugin> + <artifactId>maven-idea-plugin</artifactId> + <configuration> + <project implementation="org.apache.maven.plugin.idea.stubs.SimpleMavenProjectStub"/> + <localRepo implementation="org.apache.maven.plugin.idea.stubs.LocalRepositoryStub"/> + <ideaVersion>4</ideaVersion> + <jdkName>1.4</jdkName> + </configuration> + </plugin> + </plugins> + </build> +</project> \ No newline at end of file