You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jd...@apache.org on 2006/01/10 21:42:56 UTC
svn commit: r367788 - in /maven/components/trunk/maven-core-it: ./ it0089/
it0089/plugin/ it0089/plugin/src/ it0089/plugin/src/main/
it0089/plugin/src/main/java/ it0089/plugin/src/main/java/org/
it0089/plugin/src/main/java/org/apache/ it0089/plugin/src...
Author: jdcasey
Date: Tue Jan 10 12:42:42 2006
New Revision: 367788
URL: http://svn.apache.org/viewcvs?rev=367788&view=rev
Log:
Adding new IT to try to test MCHECKSTYLE-10.
Added:
maven/components/trunk/maven-core-it/it0089/
maven/components/trunk/maven-core-it/it0089/expected-results.txt (with props)
maven/components/trunk/maven-core-it/it0089/goals.txt (with props)
maven/components/trunk/maven-core-it/it0089/plugin/
maven/components/trunk/maven-core-it/it0089/plugin/pom.xml (with props)
maven/components/trunk/maven-core-it/it0089/plugin/src/
maven/components/trunk/maven-core-it/it0089/plugin/src/main/
maven/components/trunk/maven-core-it/it0089/plugin/src/main/java/
maven/components/trunk/maven-core-it/it0089/plugin/src/main/java/org/
maven/components/trunk/maven-core-it/it0089/plugin/src/main/java/org/apache/
maven/components/trunk/maven-core-it/it0089/plugin/src/main/java/org/apache/maven/
maven/components/trunk/maven-core-it/it0089/plugin/src/main/java/org/apache/maven/plugins/
maven/components/trunk/maven-core-it/it0089/plugin/src/main/java/org/apache/maven/plugins/it0089/
maven/components/trunk/maven-core-it/it0089/plugin/src/main/java/org/apache/maven/plugins/it0089/Mojo.java (with props)
maven/components/trunk/maven-core-it/it0089/pom.xml (with props)
maven/components/trunk/maven-core-it/it0089/prebuild-hook.txt (with props)
maven/components/trunk/maven-core-it/it0089/project/
maven/components/trunk/maven-core-it/it0089/project/pom.xml (with props)
Modified:
maven/components/trunk/maven-core-it/README.txt
maven/components/trunk/maven-core-it/integration-tests.txt
Modified: maven/components/trunk/maven-core-it/README.txt
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/README.txt?rev=367788&r1=367787&r2=367788&view=diff
==============================================================================
--- maven/components/trunk/maven-core-it/README.txt (original)
+++ maven/components/trunk/maven-core-it/README.txt Tue Jan 10 12:42:42 2006
@@ -234,12 +234,16 @@
dependency. Inherited scope should not apply in the case of
system-scoped dependencies, no matter where they are.
-it0086: Verify that a class in a plugin's dependencies can be loaded by both
- <plugin>.getClass().getClassLoader() and Thread.currentThread().getContextClassLoader().
+it0086: Verify that a plugin dependency class can be loaded from both the plugin classloader and the
+ context classloader available to the plugin.
-it0087: Verify that a class in the project-level dependencies for a plugin can be loaded by both
- <plugin>.getClass().getClassLoader() and Thread.currentThread().getContextClassLoader().
+it0087: Verify that a project-level plugin dependency class can be loaded from both the plugin classloader
+ and the context classloader available to the plugin.
+it0088: Test path translation
+
+it0089: Test that Checkstyle PackageNamesLoader.loadModuleFactory(..) method will complete as-is with
+ the context classloader available to the plugin.
-------------------------------------------------------------------------------
- generated sources
Modified: maven/components/trunk/maven-core-it/integration-tests.txt
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/integration-tests.txt?rev=367788&r1=367787&r2=367788&view=diff
==============================================================================
--- maven/components/trunk/maven-core-it/integration-tests.txt (original)
+++ maven/components/trunk/maven-core-it/integration-tests.txt Tue Jan 10 12:42:42 2006
@@ -1,4 +1,7 @@
+it0089
it0088
+it0087
+it0086
it0085
it0084
it0083
Added: maven/components/trunk/maven-core-it/it0089/expected-results.txt
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0089/expected-results.txt?rev=367788&view=auto
==============================================================================
--- maven/components/trunk/maven-core-it/it0089/expected-results.txt (added)
+++ maven/components/trunk/maven-core-it/it0089/expected-results.txt Tue Jan 10 12:42:42 2006
@@ -0,0 +1 @@
+project/target/output.txt
Propchange: maven/components/trunk/maven-core-it/it0089/expected-results.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/components/trunk/maven-core-it/it0089/expected-results.txt
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/components/trunk/maven-core-it/it0089/goals.txt
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0089/goals.txt?rev=367788&view=auto
==============================================================================
--- maven/components/trunk/maven-core-it/it0089/goals.txt (added)
+++ maven/components/trunk/maven-core-it/it0089/goals.txt Tue Jan 10 12:42:42 2006
@@ -0,0 +1 @@
+install
Propchange: maven/components/trunk/maven-core-it/it0089/goals.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/components/trunk/maven-core-it/it0089/goals.txt
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/components/trunk/maven-core-it/it0089/plugin/pom.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0089/plugin/pom.xml?rev=367788&view=auto
==============================================================================
--- maven/components/trunk/maven-core-it/it0089/plugin/pom.xml (added)
+++ maven/components/trunk/maven-core-it/it0089/plugin/pom.xml Tue Jan 10 12:42:42 2006
@@ -0,0 +1,26 @@
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.maven.it</groupId>
+ <version>1.0</version>
+ <artifactId>it0089-root</artifactId>
+ </parent>
+
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-it0089-plugin</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>maven-plugin</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>checkstyle</groupId>
+ <artifactId>checkstyle</artifactId>
+ <version>4.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>2.0</version>
+ </dependency>
+ </dependencies>
+</project>
Propchange: maven/components/trunk/maven-core-it/it0089/plugin/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/components/trunk/maven-core-it/it0089/plugin/pom.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/components/trunk/maven-core-it/it0089/plugin/src/main/java/org/apache/maven/plugins/it0089/Mojo.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0089/plugin/src/main/java/org/apache/maven/plugins/it0089/Mojo.java?rev=367788&view=auto
==============================================================================
--- maven/components/trunk/maven-core-it/it0089/plugin/src/main/java/org/apache/maven/plugins/it0089/Mojo.java (added)
+++ maven/components/trunk/maven-core-it/it0089/plugin/src/main/java/org/apache/maven/plugins/it0089/Mojo.java Tue Jan 10 12:42:42 2006
@@ -0,0 +1,71 @@
+package org.apache.maven.plugins.it0089;
+
+import com.puppycrawl.tools.checkstyle.PackageNamesLoader;
+import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Writer;
+
+
+/**
+ * @goal test
+ */
+public class Mojo
+ extends AbstractMojo
+{
+
+ /**
+ * @parameter default-value="${basedir}/target"
+ * @required
+ * @readonly
+ */
+ private File outDir;
+
+ public void execute() throws MojoExecutionException, MojoFailureException
+ {
+ try
+ {
+ PackageNamesLoader.loadModuleFactory(Thread.currentThread().getContextClassLoader());
+ getLog().info( "Loaded checkstyle module factory.");
+
+ outDir.mkdirs();
+
+ File output = new File( outDir, "output.txt" );
+ Writer writer = null;
+
+ try
+ {
+ writer = new FileWriter( output );
+ writer.write( "Success." );
+ }
+ catch ( IOException e )
+ {
+ throw new MojoExecutionException( "Failed to write output file.", e );
+ }
+ finally
+ {
+ if ( writer != null )
+ {
+ try
+ {
+ writer.close();
+ }
+ catch ( IOException e )
+ {
+ }
+ }
+ }
+ }
+ catch ( CheckstyleException e )
+ {
+ throw new MojoExecutionException( "Error loading checkstyle module factory.", e );
+ }
+ }
+
+}
Propchange: maven/components/trunk/maven-core-it/it0089/plugin/src/main/java/org/apache/maven/plugins/it0089/Mojo.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/components/trunk/maven-core-it/it0089/plugin/src/main/java/org/apache/maven/plugins/it0089/Mojo.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/components/trunk/maven-core-it/it0089/pom.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0089/pom.xml?rev=367788&view=auto
==============================================================================
--- maven/components/trunk/maven-core-it/it0089/pom.xml (added)
+++ maven/components/trunk/maven-core-it/it0089/pom.xml Tue Jan 10 12:42:42 2006
@@ -0,0 +1,13 @@
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.maven.it</groupId>
+ <artifactId>it0089-root</artifactId>
+ <version>1.0</version>
+
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>plugin</module>
+ <module>project</module>
+ </modules>
+</project>
Propchange: maven/components/trunk/maven-core-it/it0089/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/components/trunk/maven-core-it/it0089/pom.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/components/trunk/maven-core-it/it0089/prebuild-hook.txt
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0089/prebuild-hook.txt?rev=367788&view=auto
==============================================================================
--- maven/components/trunk/maven-core-it/it0089/prebuild-hook.txt (added)
+++ maven/components/trunk/maven-core-it/it0089/prebuild-hook.txt Tue Jan 10 12:42:42 2006
@@ -0,0 +1 @@
+rm ${artifact:org.apache.maven.plugins:maven-core-it-plugin:1.0-SNAPSHOT:maven-plugin}
Propchange: maven/components/trunk/maven-core-it/it0089/prebuild-hook.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/components/trunk/maven-core-it/it0089/prebuild-hook.txt
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/components/trunk/maven-core-it/it0089/project/pom.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0089/project/pom.xml?rev=367788&view=auto
==============================================================================
--- maven/components/trunk/maven-core-it/it0089/project/pom.xml (added)
+++ maven/components/trunk/maven-core-it/it0089/project/pom.xml Tue Jan 10 12:42:42 2006
@@ -0,0 +1,30 @@
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.maven.it</groupId>
+ <version>1.0</version>
+ <artifactId>it0089-root</artifactId>
+ </parent>
+
+ <artifactId>it0089</artifactId>
+
+ <name>Plugin Transitive Dependency Classloading Test</name>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-it0089-plugin</artifactId>
+
+ <executions>
+ <execution>
+ <phase>validate</phase>
+
+ <goals>
+ <goal>test</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: maven/components/trunk/maven-core-it/it0089/project/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/components/trunk/maven-core-it/it0089/project/pom.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"