You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by br...@apache.org on 2005/10/06 09:11:12 UTC
svn commit: r306547 - in /maven/components/trunk: maven-core-it-plugin/
maven-core-it/ maven-core-it/it0042/ maven-core-it/it0082/
maven-core-it/it0082/test-component-c/
maven-core-it/it0082/test-component-c/src/
maven-core-it/it0082/test-component-c/s...
Author: brett
Date: Thu Oct 6 00:10:49 2005
New Revision: 306547
URL: http://svn.apache.org/viewcvs?rev=306547&view=rev
Log:
PR: MNG-1088
if plugin is not built yet, go to the repository
Added:
maven/components/trunk/maven-core-it/it0082/ (with props)
maven/components/trunk/maven-core-it/it0082/expected-results.txt (with props)
maven/components/trunk/maven-core-it/it0082/goals.txt (with props)
maven/components/trunk/maven-core-it/it0082/pom.xml (with props)
maven/components/trunk/maven-core-it/it0082/test-component-c/
maven/components/trunk/maven-core-it/it0082/test-component-c/pom.xml (with props)
maven/components/trunk/maven-core-it/it0082/test-component-c/src/
maven/components/trunk/maven-core-it/it0082/test-component-c/src/main/
maven/components/trunk/maven-core-it/it0082/test-component-c/src/main/java/
maven/components/trunk/maven-core-it/it0082/test-component-c/src/main/java/C.java (with props)
maven/components/trunk/maven-core-it/it0082/test-component-c/src/main/webapp/
maven/components/trunk/maven-core-it/it0082/test-component-c/src/main/webapp/WEB-INF/
maven/components/trunk/maven-core-it/it0082/test-component-c/src/main/webapp/WEB-INF/web.xml (with props)
maven/components/trunk/maven-core-it/it0082/test-plugin/
maven/components/trunk/maven-core-it/it0082/test-plugin/pom.xml (with props)
maven/components/trunk/maven-core-it/it0082/test-plugin/src/
maven/components/trunk/maven-core-it/it0082/test-plugin/src/main/
maven/components/trunk/maven-core-it/it0082/test-plugin/src/main/java/
maven/components/trunk/maven-core-it/it0082/test-plugin/src/main/java/org/
maven/components/trunk/maven-core-it/it0082/test-plugin/src/main/java/org/apache/
maven/components/trunk/maven-core-it/it0082/test-plugin/src/main/java/org/apache/maven/
maven/components/trunk/maven-core-it/it0082/test-plugin/src/main/java/org/apache/maven/plugin/
maven/components/trunk/maven-core-it/it0082/test-plugin/src/main/java/org/apache/maven/plugin/coreit/
maven/components/trunk/maven-core-it/it0082/test-plugin/src/main/java/org/apache/maven/plugin/coreit/CoreItMojo.java (with props)
Modified:
maven/components/trunk/maven-core-it-plugin/pom.xml
maven/components/trunk/maven-core-it/README.txt
maven/components/trunk/maven-core-it/integration-tests.txt
maven/components/trunk/maven-core-it/it0042/goals.txt
maven/components/trunk/maven-core/pom.xml
maven/components/trunk/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java
maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/artifact/ActiveProjectArtifact.java
Modified: maven/components/trunk/maven-core-it-plugin/pom.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it-plugin/pom.xml?rev=306547&r1=306546&r2=306547&view=diff
==============================================================================
--- maven/components/trunk/maven-core-it-plugin/pom.xml (original)
+++ maven/components/trunk/maven-core-it-plugin/pom.xml Thu Oct 6 00:10:49 2005
@@ -3,7 +3,7 @@
<parent>
<artifactId>maven-plugin-parent</artifactId>
<groupId>org.apache.maven.plugins</groupId>
- <version>2.0-beta-3-SNAPSHOT</version>
+ <version>2.0-beta-3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>maven-core-it-plugin</artifactId>
Modified: maven/components/trunk/maven-core-it/README.txt
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/README.txt?rev=306547&r1=306546&r2=306547&view=diff
==============================================================================
--- maven/components/trunk/maven-core-it/README.txt (original)
+++ maven/components/trunk/maven-core-it/README.txt Thu Oct 6 00:10:49 2005
@@ -117,7 +117,6 @@
it0041: Test the use of a new type from a plugin
it0042: Test that the reactor can establish the artifact location of known projects for dependencies
- First test generate sources to see that it works even when they aren't compiled
it0043: Test for repository inheritence - ensure using the same id overrides the defaults
@@ -222,6 +221,9 @@
transitively.
it0081: Test per-plugin dependencies.
+
+it0082: Test that the reactor can establish the artifact location of known projects for dependencies
+ using process-sources to see that it works even when they aren't compiled
-------------------------------------------------------------------------------
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=306547&r1=306546&r2=306547&view=diff
==============================================================================
--- maven/components/trunk/maven-core-it/integration-tests.txt (original)
+++ maven/components/trunk/maven-core-it/integration-tests.txt Thu Oct 6 00:10:49 2005
@@ -1,3 +1,4 @@
+it0082
it0081
it0080
it0079
Modified: maven/components/trunk/maven-core-it/it0042/goals.txt
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0042/goals.txt?rev=306547&r1=306546&r2=306547&view=diff
==============================================================================
--- maven/components/trunk/maven-core-it/it0042/goals.txt (original)
+++ maven/components/trunk/maven-core-it/it0042/goals.txt Thu Oct 6 00:10:49 2005
@@ -1 +1 @@
-generate-sources
+package
Propchange: maven/components/trunk/maven-core-it/it0082/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Oct 6 00:10:49 2005
@@ -0,0 +1 @@
+log.txt
Added: maven/components/trunk/maven-core-it/it0082/expected-results.txt
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0082/expected-results.txt?rev=306547&view=auto
==============================================================================
--- maven/components/trunk/maven-core-it/it0082/expected-results.txt (added)
+++ maven/components/trunk/maven-core-it/it0082/expected-results.txt Thu Oct 6 00:10:49 2005
@@ -0,0 +1 @@
+test-component-c/target/my-test
Propchange: maven/components/trunk/maven-core-it/it0082/expected-results.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/components/trunk/maven-core-it/it0082/expected-results.txt
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/components/trunk/maven-core-it/it0082/goals.txt
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0082/goals.txt?rev=306547&view=auto
==============================================================================
--- maven/components/trunk/maven-core-it/it0082/goals.txt (added)
+++ maven/components/trunk/maven-core-it/it0082/goals.txt Thu Oct 6 00:10:49 2005
@@ -0,0 +1 @@
+process-sources
Propchange: maven/components/trunk/maven-core-it/it0082/goals.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/components/trunk/maven-core-it/it0082/goals.txt
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/components/trunk/maven-core-it/it0082/pom.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0082/pom.xml?rev=306547&view=auto
==============================================================================
--- maven/components/trunk/maven-core-it/it0082/pom.xml (added)
+++ maven/components/trunk/maven-core-it/it0082/pom.xml Thu Oct 6 00:10:49 2005
@@ -0,0 +1,13 @@
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>test</groupId>
+ <artifactId>test-components</artifactId>
+ <version>0.1</version>
+ <name>Test Components</name>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>test-component-c</module>
+ <module>test-plugin</module>
+ </modules>
+</project>
Propchange: maven/components/trunk/maven-core-it/it0082/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/components/trunk/maven-core-it/it0082/pom.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/components/trunk/maven-core-it/it0082/test-component-c/pom.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0082/test-component-c/pom.xml?rev=306547&view=auto
==============================================================================
--- maven/components/trunk/maven-core-it/it0082/test-component-c/pom.xml (added)
+++ maven/components/trunk/maven-core-it/it0082/test-component-c/pom.xml Thu Oct 6 00:10:49 2005
@@ -0,0 +1,41 @@
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>test-components</artifactId>
+ <groupId>test</groupId>
+ <version>0.1</version>
+ </parent>
+
+ <groupId>test</groupId>
+ <artifactId>test-component-c</artifactId>
+ <version>0.1</version>
+ <name>Test Component C</name>
+ <packaging>war</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-core-it-plugin</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <configuration>
+ <goalItem>my-test</goalItem>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>touch</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>snapshots</id>
+ <name>Maven Central Plugins Development Repository</name>
+ <url>http://snapshots.maven.codehaus.org/maven2</url>
+ </pluginRepository>
+ </pluginRepositories>
+</project>
Propchange: maven/components/trunk/maven-core-it/it0082/test-component-c/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/components/trunk/maven-core-it/it0082/test-component-c/pom.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/components/trunk/maven-core-it/it0082/test-component-c/src/main/java/C.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0082/test-component-c/src/main/java/C.java?rev=306547&view=auto
==============================================================================
--- maven/components/trunk/maven-core-it/it0082/test-component-c/src/main/java/C.java (added)
+++ maven/components/trunk/maven-core-it/it0082/test-component-c/src/main/java/C.java Thu Oct 6 00:10:49 2005
@@ -0,0 +1,5 @@
+public class C
+ extends A
+{
+}
+
Propchange: maven/components/trunk/maven-core-it/it0082/test-component-c/src/main/java/C.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/components/trunk/maven-core-it/it0082/test-component-c/src/main/java/C.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/components/trunk/maven-core-it/it0082/test-component-c/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0082/test-component-c/src/main/webapp/WEB-INF/web.xml?rev=306547&view=auto
==============================================================================
--- maven/components/trunk/maven-core-it/it0082/test-component-c/src/main/webapp/WEB-INF/web.xml (added)
+++ maven/components/trunk/maven-core-it/it0082/test-component-c/src/main/webapp/WEB-INF/web.xml Thu Oct 6 00:10:49 2005
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app >
+</web-app>
Propchange: maven/components/trunk/maven-core-it/it0082/test-component-c/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/components/trunk/maven-core-it/it0082/test-component-c/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/components/trunk/maven-core-it/it0082/test-plugin/pom.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0082/test-plugin/pom.xml?rev=306547&view=auto
==============================================================================
--- maven/components/trunk/maven-core-it/it0082/test-plugin/pom.xml (added)
+++ maven/components/trunk/maven-core-it/it0082/test-plugin/pom.xml Thu Oct 6 00:10:49 2005
@@ -0,0 +1,21 @@
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>test-components</artifactId>
+ <groupId>test</groupId>
+ <version>0.1</version>
+ </parent>
+
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-core-it-plugin</artifactId>
+ <packaging>maven-plugin</packaging>
+ <version>1.0-SNAPSHOT</version>
+ <name>Test Plugin</name>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>2.0-beta-1</version>
+ </dependency>
+ </dependencies>
+</project>
Propchange: maven/components/trunk/maven-core-it/it0082/test-plugin/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/components/trunk/maven-core-it/it0082/test-plugin/pom.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/components/trunk/maven-core-it/it0082/test-plugin/src/main/java/org/apache/maven/plugin/coreit/CoreItMojo.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0082/test-plugin/src/main/java/org/apache/maven/plugin/coreit/CoreItMojo.java?rev=306547&view=auto
==============================================================================
--- maven/components/trunk/maven-core-it/it0082/test-plugin/src/main/java/org/apache/maven/plugin/coreit/CoreItMojo.java (added)
+++ maven/components/trunk/maven-core-it/it0082/test-plugin/src/main/java/org/apache/maven/plugin/coreit/CoreItMojo.java Thu Oct 6 00:10:49 2005
@@ -0,0 +1,77 @@
+package org.apache.maven.plugin.coreit;
+
+/*
+ * Copyright 2001-2004 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.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+
+/**
+ * @goal test
+ *
+ * @phase process-sources
+ *
+ * @description Goal which cleans the build
+ */
+public class CoreItMojo
+ extends AbstractMojo
+{
+ /**
+ * @parameter expression="${project.build.directory}"
+ * @required
+ */
+ private String outputDirectory;
+
+ /**
+ * @parameter
+ * @required
+ */
+ private String value;
+
+ public void execute()
+ throws MojoExecutionException
+ {
+ touch( new File( outputDirectory ), value );
+ }
+
+ private static void touch( File dir, String file )
+ throws MojoExecutionException
+ {
+ try
+ {
+ if ( !dir.exists() )
+ {
+ dir.mkdirs();
+ }
+
+ File touch = new File( dir, file );
+
+ FileWriter w = new FileWriter( touch );
+
+ w.write( file );
+
+ w.close();
+ }
+ catch ( IOException e )
+ {
+ throw new MojoExecutionException( "Error touching file", e );
+ }
+ }
+}
Propchange: maven/components/trunk/maven-core-it/it0082/test-plugin/src/main/java/org/apache/maven/plugin/coreit/CoreItMojo.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/components/trunk/maven-core-it/it0082/test-plugin/src/main/java/org/apache/maven/plugin/coreit/CoreItMojo.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Modified: maven/components/trunk/maven-core/pom.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core/pom.xml?rev=306547&r1=306546&r2=306547&view=diff
==============================================================================
--- maven/components/trunk/maven-core/pom.xml (original)
+++ maven/components/trunk/maven-core/pom.xml Thu Oct 6 00:10:49 2005
@@ -13,7 +13,6 @@
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
- <version>2.0-beta-1</version>
<configuration>
<descriptor>src/assemble/bin.xml</descriptor>
<finalName>maven-${version}</finalName>
Modified: maven/components/trunk/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java?rev=306547&r1=306546&r2=306547&view=diff
==============================================================================
--- maven/components/trunk/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java (original)
+++ maven/components/trunk/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java Thu Oct 6 00:10:49 2005
@@ -268,7 +268,16 @@
// TODO: if not matching, we should get the correct artifact from that project (attached)
if ( ref.getArtifact().getDependencyConflictId().equals( pluginArtifact.getDependencyConflictId() ) )
{
- pluginArtifact = new ActiveProjectArtifact( ref, pluginArtifact );
+ // if the project artifact doesn't exist, don't use it. We haven't built that far.
+ if ( project.getArtifact().getFile() != null && project.getArtifact().getFile().exists() )
+ {
+ pluginArtifact = new ActiveProjectArtifact( ref, pluginArtifact );
+ }
+ else
+ {
+ getLogger().warn( "Plugin found in the reactor has not been built when it's use was attempted" +
+ " - resolving from the repository instead" );
+ }
}
}
}
Modified: maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/artifact/ActiveProjectArtifact.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/artifact/ActiveProjectArtifact.java?rev=306547&r1=306546&r2=306547&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/artifact/ActiveProjectArtifact.java (original)
+++ maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/artifact/ActiveProjectArtifact.java Thu Oct 6 00:10:49 2005
@@ -259,7 +259,7 @@
public void setRelease( boolean release )
{
- artifact.setResolved( release );
+ artifact.setRelease( release );
}
public List getAvailableVersions()