You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2008/08/10 00:56:57 UTC

svn commit: r684375 - in /maven/plugins/trunk/maven-invoker-plugin/src/it/local-repo-isolated: ./ pom.xml src/ src/it/ src/it/project/ src/it/project/pom.xml src/it/settings.xml verify.bsh

Author: bentmann
Date: Sat Aug  9 15:56:56 2008
New Revision: 684375

URL: http://svn.apache.org/viewvc?rev=684375&view=rev
Log:
o Added another IT

Added:
    maven/plugins/trunk/maven-invoker-plugin/src/it/local-repo-isolated/
    maven/plugins/trunk/maven-invoker-plugin/src/it/local-repo-isolated/pom.xml   (with props)
    maven/plugins/trunk/maven-invoker-plugin/src/it/local-repo-isolated/src/
    maven/plugins/trunk/maven-invoker-plugin/src/it/local-repo-isolated/src/it/
    maven/plugins/trunk/maven-invoker-plugin/src/it/local-repo-isolated/src/it/project/
    maven/plugins/trunk/maven-invoker-plugin/src/it/local-repo-isolated/src/it/project/pom.xml   (with props)
    maven/plugins/trunk/maven-invoker-plugin/src/it/local-repo-isolated/src/it/settings.xml   (with props)
    maven/plugins/trunk/maven-invoker-plugin/src/it/local-repo-isolated/verify.bsh   (with props)

Added: maven/plugins/trunk/maven-invoker-plugin/src/it/local-repo-isolated/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/it/local-repo-isolated/pom.xml?rev=684375&view=auto
==============================================================================
--- maven/plugins/trunk/maven-invoker-plugin/src/it/local-repo-isolated/pom.xml (added)
+++ maven/plugins/trunk/maven-invoker-plugin/src/it/local-repo-isolated/pom.xml Sat Aug  9 15:56:56 2008
@@ -0,0 +1,64 @@
+<?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 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.plugins.invoker</groupId>
+  <artifactId>local-repo-isolated</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
+
+  <description>
+    Test to check for usage of an isolated local repository.
+  </description>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-invoker-plugin</artifactId>
+        <version>@pom.version@</version>
+        <configuration>
+          <projectsDirectory>src/it</projectsDirectory>
+          <localRepositoryPath>${project.build.directory}/it-repo</localRepositoryPath>
+          <pomIncludes>
+            <pomInclude>*/pom.xml</pomInclude>
+          </pomIncludes>
+          <settingsFile>src/it/settings.xml</settingsFile>
+          <goals>
+            <goal>install</goal>
+          </goals>
+        </configuration>
+        <executions>
+          <execution>
+            <id>integration-test</id>
+            <goals>
+              <goal>run</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>

Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/local-repo-isolated/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/local-repo-isolated/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-invoker-plugin/src/it/local-repo-isolated/src/it/project/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/it/local-repo-isolated/src/it/project/pom.xml?rev=684375&view=auto
==============================================================================
--- maven/plugins/trunk/maven-invoker-plugin/src/it/local-repo-isolated/src/it/project/pom.xml (added)
+++ maven/plugins/trunk/maven-invoker-plugin/src/it/local-repo-isolated/src/it/project/pom.xml Sat Aug  9 15:56:56 2008
@@ -0,0 +1,26 @@
+<?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 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.test</groupId>
+  <artifactId>unit</artifactId>
+  <packaging>pom</packaging>
+  <version>0.1-SNAPSHOT</version>
+</project>
\ No newline at end of file

Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/local-repo-isolated/src/it/project/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/local-repo-isolated/src/it/project/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-invoker-plugin/src/it/local-repo-isolated/src/it/settings.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/it/local-repo-isolated/src/it/settings.xml?rev=684375&view=auto
==============================================================================
--- maven/plugins/trunk/maven-invoker-plugin/src/it/local-repo-isolated/src/it/settings.xml (added)
+++ maven/plugins/trunk/maven-invoker-plugin/src/it/local-repo-isolated/src/it/settings.xml Sat Aug  9 15:56:56 2008
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<settings>
+  <!-- This path must be ignored, the path from the plugin configuration is always dominant -->
+  <localRepository>@project.build.directory@/bad-repo</localRepository>
+  <profiles>
+    <profile>
+      <id>it-repo</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+      <repositories>
+        <repository>
+          <id>local.central</id>
+          <url>file://@localRepository@</url>
+          <releases>
+            <enabled>true</enabled>
+          </releases>
+          <snapshots>
+            <enabled>true</enabled>
+          </snapshots>
+        </repository>
+      </repositories>
+      <pluginRepositories>
+        <pluginRepository>
+          <id>local.central</id>
+          <url>file://@localRepository@</url>
+          <releases>
+            <enabled>true</enabled>
+          </releases>
+          <snapshots>
+            <enabled>true</enabled>
+          </snapshots>
+        </pluginRepository>
+      </pluginRepositories>
+    </profile>
+  </profiles>
+</settings>

Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/local-repo-isolated/src/it/settings.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/local-repo-isolated/src/it/settings.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-invoker-plugin/src/it/local-repo-isolated/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/it/local-repo-isolated/verify.bsh?rev=684375&view=auto
==============================================================================
--- maven/plugins/trunk/maven-invoker-plugin/src/it/local-repo-isolated/verify.bsh (added)
+++ maven/plugins/trunk/maven-invoker-plugin/src/it/local-repo-isolated/verify.bsh Sat Aug  9 15:56:56 2008
@@ -0,0 +1,34 @@
+import java.io.*;
+import java.util.*;
+import java.util.regex.*;
+
+try
+{
+    File badRepoDir = new File( basedir, "target/bad-repo" );
+    if ( badRepoDir.exists() )
+    {
+        System.out.println( "IT used wrong local repository: " + badRepoDir );
+        return false;
+    }
+
+    File itRepoDir = new File( basedir, "target/it-repo" );
+    if ( !itRepoDir.isDirectory() )
+    {
+        System.out.println( "IT local repository missing: " + itRepoDir );
+        return false;
+    }
+
+    File installedFile = new File( itRepoDir, "org/apache/maven/test/unit/0.1-SNAPSHOT/unit-0.1-SNAPSHOT.pom" );
+    if ( !installedFile.isFile() )
+    {
+        System.out.println( "Installed file missing in local repo: " + installedFile );
+        return false;
+    }
+}
+catch( Throwable t )
+{
+    t.printStackTrace();
+    return false;
+}
+
+return true;

Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/local-repo-isolated/verify.bsh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-invoker-plugin/src/it/local-repo-isolated/verify.bsh
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision