commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tcu...@apache.org
Subject svn commit: r414614 - in /jakarta/commons/sandbox/jci/trunk/maven-jci-plugin/src: main/java/org/apache/maven/plugin/AbstractJCIMojo.java test/java/org/apache/maven/plugin/JCIMojoTestCase.java test/java/org/apache/maven/plugin/stubs/DebugEnabledLog.java
Date Thu, 15 Jun 2006 15:15:11 GMT
Author: tcurdt
Date: Thu Jun 15 08:15:11 2006
New Revision: 414614

URL: http://svn.apache.org/viewvc?rev=414614&view=rev
Log:
fixed the double apply, actually compile a source file in the testcase

Modified:
    jakarta/commons/sandbox/jci/trunk/maven-jci-plugin/src/main/java/org/apache/maven/plugin/AbstractJCIMojo.java
    jakarta/commons/sandbox/jci/trunk/maven-jci-plugin/src/test/java/org/apache/maven/plugin/JCIMojoTestCase.java
    jakarta/commons/sandbox/jci/trunk/maven-jci-plugin/src/test/java/org/apache/maven/plugin/stubs/DebugEnabledLog.java

Modified: jakarta/commons/sandbox/jci/trunk/maven-jci-plugin/src/main/java/org/apache/maven/plugin/AbstractJCIMojo.java
URL: http://svn.apache.org/viewvc/jakarta/commons/sandbox/jci/trunk/maven-jci-plugin/src/main/java/org/apache/maven/plugin/AbstractJCIMojo.java?rev=414614&r1=414613&r2=414614&view=diff
==============================================================================
--- jakarta/commons/sandbox/jci/trunk/maven-jci-plugin/src/main/java/org/apache/maven/plugin/AbstractJCIMojo.java
(original)
+++ jakarta/commons/sandbox/jci/trunk/maven-jci-plugin/src/main/java/org/apache/maven/plugin/AbstractJCIMojo.java
Thu Jun 15 08:15:11 2006
@@ -69,7 +69,7 @@
 				new File((String) getCompileSourceRoots().get(0)));
 		FileResourceStore fileResourceStore = new FileResourceStore(
 				getOutputDirectory());
-		compiler.compile(new String[] { "TestCompile0" },
+		compiler.compile(new String[] { "TestCompile0.java" },
 				fileResourceReader, fileResourceStore);
 	}
 }

Modified: jakarta/commons/sandbox/jci/trunk/maven-jci-plugin/src/test/java/org/apache/maven/plugin/JCIMojoTestCase.java
URL: http://svn.apache.org/viewvc/jakarta/commons/sandbox/jci/trunk/maven-jci-plugin/src/test/java/org/apache/maven/plugin/JCIMojoTestCase.java?rev=414614&r1=414613&r2=414614&view=diff
==============================================================================
--- jakarta/commons/sandbox/jci/trunk/maven-jci-plugin/src/test/java/org/apache/maven/plugin/JCIMojoTestCase.java
(original)
+++ jakarta/commons/sandbox/jci/trunk/maven-jci-plugin/src/test/java/org/apache/maven/plugin/JCIMojoTestCase.java
Thu Jun 15 08:15:11 2006
@@ -42,47 +42,3 @@
 		return mojo;
 	}
 }
-package org.apache.maven.plugin;
-
-import java.io.File;
-import java.util.Collections;
-import org.apache.maven.plugin.JCIMojo;
-import org.apache.maven.plugin.stubs.DebugEnabledLog;
-import org.apache.maven.plugin.testing.AbstractMojoTestCase;
-import org.apache.maven.plugin.testing.stubs.ArtifactStub;
-
-public class JCIMojoTestCase extends AbstractMojoTestCase
-{
-	protected void setUp() throws Exception
-	{
-		// required for mojo lookups to work
-		super.setUp();
-	}
-
-	/**
-	 * tests the ability of the plugin to compile a basic file
-	 * 
-	 * @throws Exception
-	 */
-	public void testCompilerBasic() throws Exception
-	{
-		JCIMojo jciMojo = getJCIMojo("target/test-classes/unit/compiler-basic-test/plugin-config.xml");
-		jciMojo.execute();
-		File testClass = new File(jciMojo.getOutputDirectory(),
-				"TestCompile0.class");
-		assertTrue(testClass.exists());
-	}
-
-	private JCIMojo getJCIMojo(String pomXml) throws Exception
-	{
-		File testPom = new File(getBasedir(), pomXml);
-		assertTrue(testPom.exists());
-		JCIMojo mojo = (JCIMojo) lookupMojo("compile", testPom);
-		setVariableValueToObject(mojo, "log", new DebugEnabledLog());
-		setVariableValueToObject(mojo, "projectArtifact", new ArtifactStub());
-		setVariableValueToObject(mojo, "classpathElements",
-				Collections.EMPTY_LIST);
-		assertNotNull(mojo);
-		return mojo;
-	}
-}

Modified: jakarta/commons/sandbox/jci/trunk/maven-jci-plugin/src/test/java/org/apache/maven/plugin/stubs/DebugEnabledLog.java
URL: http://svn.apache.org/viewvc/jakarta/commons/sandbox/jci/trunk/maven-jci-plugin/src/test/java/org/apache/maven/plugin/stubs/DebugEnabledLog.java?rev=414614&r1=414613&r2=414614&view=diff
==============================================================================
--- jakarta/commons/sandbox/jci/trunk/maven-jci-plugin/src/test/java/org/apache/maven/plugin/stubs/DebugEnabledLog.java
(original)
+++ jakarta/commons/sandbox/jci/trunk/maven-jci-plugin/src/test/java/org/apache/maven/plugin/stubs/DebugEnabledLog.java
Thu Jun 15 08:15:11 2006
@@ -34,39 +34,3 @@
         return true;
     }
 }
-package org.apache.maven.plugin.stubs;
-
-/*
- * Copyright 2001-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.
- */
-
-import org.apache.maven.plugin.logging.SystemStreamLog;
-
-/**
- * @author Edwin Punzalan
- */
-public class DebugEnabledLog
-    extends SystemStreamLog
-{
-    public DebugEnabledLog()
-    {
-        super();
-    }
-
-    public boolean isDebugEnabled()
-    {
-        return true;
-    }
-}



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message