maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bentm...@apache.org
Subject svn commit: r810880 - in /maven/plugins/trunk/maven-remote-resources-plugin: ./ src/it/resources/bootstrap/resource-bundle-with-template/src/main/resources/ src/it/resources/get-dependency-projects/ src/it/resources/get-dependency-projects/project/ src...
Date Thu, 03 Sep 2009 10:42:49 GMT
Author: bentmann
Date: Thu Sep  3 10:42:47 2009
New Revision: 810880

URL: http://svn.apache.org/viewvc?rev=810880&view=rev
Log:
o Added IT to check retrieval of projects for dependencies

Added:
    maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/
    maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/pom.xml
  (with props)
    maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/project/
    maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/project/pom.xml
  (with props)
    maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/release/
    maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/release/pom.xml
  (with props)
    maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/release/src/
    maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/release/src/main/
    maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/release/src/main/resources/
    maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/release/src/main/resources/some.properties
  (with props)
    maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/snapshot/
    maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/snapshot/pom.xml
  (with props)
    maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/snapshot/src/
    maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/snapshot/src/main/
    maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/snapshot/src/main/resources/
    maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/snapshot/src/main/resources/some.properties
  (with props)
    maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/it/IT_GetDependenyProjects.java
  (with props)
Modified:
    maven/plugins/trunk/maven-remote-resources-plugin/pom.xml
    maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/bootstrap/resource-bundle-with-template/src/main/resources/DEPENDENCIES.vm

Modified: maven/plugins/trunk/maven-remote-resources-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-remote-resources-plugin/pom.xml?rev=810880&r1=810879&r2=810880&view=diff
==============================================================================
--- maven/plugins/trunk/maven-remote-resources-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-remote-resources-plugin/pom.xml Thu Sep  3 10:42:47 2009
@@ -261,6 +261,9 @@
   <profiles>
     <profile>
       <id>run-its</id>
+      <properties>
+        <remoteRepository>${project.build.directory}/remote-repo</remoteRepository>
+      </properties>
       <build>
         <testResources>
           <testResource>

Modified: maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/bootstrap/resource-bundle-with-template/src/main/resources/DEPENDENCIES.vm
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/bootstrap/resource-bundle-with-template/src/main/resources/DEPENDENCIES.vm?rev=810880&r1=810879&r2=810880&view=diff
==============================================================================
--- maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/bootstrap/resource-bundle-with-template/src/main/resources/DEPENDENCIES.vm
(original)
+++ maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/bootstrap/resource-bundle-with-template/src/main/resources/DEPENDENCIES.vm
Thu Sep  3 10:42:47 2009
@@ -1 +1,5 @@
 Built-In: #if ($projectName)$projectName#else${project.name}#end
+
+#foreach( $p in $projects )
+Dependency Id: $p.groupId:$p.artifactId:$p.version
+#end

Added: maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/pom.xml?rev=810880&view=auto
==============================================================================
--- maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/pom.xml
(added)
+++ maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/pom.xml
Thu Sep  3 10:42:47 2009
@@ -0,0 +1,21 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.plugin.rresource.it</groupId>
+  <artifactId>aggregator</artifactId>
+  <version>1.0</version>
+  <packaging>pom</packaging>
+
+  <modules>
+    <module>release</module>
+    <module>snapshot</module>
+  </modules>  
+
+  <distributionManagement>
+    <repository>
+      <id>it-remote</id>
+      <url>file:${remoteRepository}</url>
+    </repository>
+  </distributionManagement>
+</project>

Propchange: maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/project/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/project/pom.xml?rev=810880&view=auto
==============================================================================
--- maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/project/pom.xml
(added)
+++ maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/project/pom.xml
Thu Sep  3 10:42:47 2009
@@ -0,0 +1,67 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  
+  <groupId>org.apache.maven.plugin.rresource.it</groupId>
+  <artifactId>get-dependency-projects</artifactId>
+  <version>${project.version}</version>
+  
+  <repositories>
+    <repository>
+      <id>it-remote</id>
+      <url>file:${remoteRepository}</url>
+      <releases>
+        <enabled>true</enabled>
+      </releases>
+      <snapshots>
+        <enabled>true</enabled>
+      </snapshots>
+    </repository>
+    <repository>
+      <id>main-local</id>
+      <url>file:${localRepository}</url>
+      <releases>
+        <enabled>true</enabled>
+      </releases>
+      <snapshots>
+        <enabled>true</enabled>
+      </snapshots>
+    </repository>
+  </repositories>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven.plugin.rresource.it.gdp</groupId>
+      <artifactId>release</artifactId>
+      <version>1.0</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.plugin.rresource.it.gdp</groupId>
+      <artifactId>snapshot</artifactId>
+      <version>1.0-SNAPSHOT</version>
+    </dependency>
+  </dependencies>  
+
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-remote-resources-plugin</artifactId>
+        <version>${project.version}</version>
+        <executions>
+          <execution>
+            <id>remote-resources</id>
+            <goals>
+              <goal>process</goal>
+            </goals>
+            <configuration>
+              <resourceBundles>
+                <resourceBundle>org.apache.maven.plugin.rresource.it:resource-bundle-with-template:${project.version}</resourceBundle>
+              </resourceBundles>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+  
+</project>

Propchange: maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/project/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/project/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/release/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/release/pom.xml?rev=810880&view=auto
==============================================================================
--- maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/release/pom.xml
(added)
+++ maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/release/pom.xml
Thu Sep  3 10:42:47 2009
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.plugin.rresource.it.gdp</groupId>
+  <artifactId>release</artifactId>
+  <!-- NOTE: This has to be a non-snapshot version -->
+  <version>1.0</version>
+
+  <packaging>jar</packaging>
+
+  <name>Released Dependency</name>
+
+  <repositories>
+    <repository>
+      <id>main-local</id>
+      <url>file:${localRepository}</url>
+    </repository>
+  </repositories>
+
+  <distributionManagement>
+    <repository>
+      <id>it-remote</id>
+      <url>file:${remoteRepository}</url>
+    </repository>
+  </distributionManagement>
+
+</project>

Propchange: maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/release/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/release/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/release/src/main/resources/some.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/release/src/main/resources/some.properties?rev=810880&view=auto
==============================================================================
--- maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/release/src/main/resources/some.properties
(added)
+++ maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/release/src/main/resources/some.properties
Thu Sep  3 10:42:47 2009
@@ -0,0 +1 @@
+# just to make the project's JAR isn't empty

Propchange: maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/release/src/main/resources/some.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/release/src/main/resources/some.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/snapshot/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/snapshot/pom.xml?rev=810880&view=auto
==============================================================================
--- maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/snapshot/pom.xml
(added)
+++ maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/snapshot/pom.xml
Thu Sep  3 10:42:47 2009
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.plugin.rresource.it.gdp</groupId>
+  <artifactId>snapshot</artifactId>
+  <!-- NOTE: This has to be a snapshot version -->
+  <version>1.0-SNAPSHOT</version>
+
+  <packaging>jar</packaging>
+
+  <name>Snapshot Dependency</name>
+
+  <repositories>
+    <repository>
+      <id>main-local</id>
+      <url>file:${localRepository}</url>
+    </repository>
+  </repositories>
+
+  <distributionManagement>
+    <repository>
+      <id>it-remote</id>
+      <url>file:${remoteRepository}</url>
+    </repository>
+  </distributionManagement>
+
+</project>

Propchange: maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/snapshot/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/snapshot/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/snapshot/src/main/resources/some.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/snapshot/src/main/resources/some.properties?rev=810880&view=auto
==============================================================================
--- maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/snapshot/src/main/resources/some.properties
(added)
+++ maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/snapshot/src/main/resources/some.properties
Thu Sep  3 10:42:47 2009
@@ -0,0 +1 @@
+# just to make the project's JAR isn't empty

Propchange: maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/snapshot/src/main/resources/some.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-remote-resources-plugin/src/it/resources/get-dependency-projects/snapshot/src/main/resources/some.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/it/IT_GetDependenyProjects.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/it/IT_GetDependenyProjects.java?rev=810880&view=auto
==============================================================================
--- maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/it/IT_GetDependenyProjects.java
(added)
+++ maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/it/IT_GetDependenyProjects.java
Thu Sep  3 10:42:47 2009
@@ -0,0 +1,65 @@
+package org.apache.maven.plugin.resources.remote.it;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.it.VerificationException;
+import org.apache.maven.it.Verifier;
+import org.apache.maven.plugin.resources.remote.it.support.TestUtils;
+import org.codehaus.plexus.util.FileUtils;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+
+/**
+ * @author Benjamin Bentmann
+ */
+public class IT_GetDependenyProjects
+    extends AbstractIT
+{
+
+    public void test()
+        throws IOException, URISyntaxException, VerificationException
+    {
+        File dir = TestUtils.getTestDir( "get-dependency-projects" );
+
+        Verifier verifier;
+
+        verifier = new Verifier( dir.getAbsolutePath() );
+        verifier.executeGoal( "deploy" );
+        verifier.verifyErrorFreeLog();
+        verifier.resetStreams();
+
+        verifier = new Verifier( new File( dir, "project" ).getAbsolutePath() );
+
+        verifier.deleteArtifacts( "org.apache.maven.plugin.rresource.it.gdp" );
+
+        verifier.executeGoal( "generate-resources" );
+        verifier.verifyErrorFreeLog();
+        verifier.resetStreams();
+
+        File output = new File( dir, "project/target/maven-shared-archive-resources/DEPENDENCIES"
);
+        String content = FileUtils.fileRead( output );
+
+        assertTrue( content.indexOf( "Dependency Id: org.apache.maven.plugin.rresource.it.gdp:release:1.0"
) >= 0 );
+        assertTrue( content.indexOf( "Dependency Id: org.apache.maven.plugin.rresource.it.gdp:snapshot:1.0-SNAPSHOT"
) >= 0 );
+    }
+
+}

Propchange: maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/it/IT_GetDependenyProjects.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/it/IT_GetDependenyProjects.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision



Mime
View raw message