This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch maven-install-plugin-4.x
in repository https://gitbox.apache.org/repos/asf/maven-install-plugin.git


The following commit(s) were added to refs/heads/maven-install-plugin-4.x by 
this push:
     new db30b45  Convert remaining file-existence ITs to unit tests (4.x)
db30b45 is described below

commit db30b45ef95e52c7ed6629653340cf29ebd51494
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Sat Nov 21 16:06:25 2026 +0100

    Convert remaining file-existence ITs to unit tests (4.x)
    
    Part of #501
---
 src/it/attach-release-jar/pom.xml                  |  80 -------------
 src/it/attach-release-jar/setup.groovy             |  29 -----
 src/it/attach-release-jar/verify.groovy            |  41 -------
 .../install-file-generated-pom/invoker.properties  |  18 ---
 src/it/install-file-generated-pom/pom.xml          |  41 -------
 src/it/install-file-generated-pom/setup.groovy     |  27 -----
 src/it/install-file-generated-pom/test-0.1.jar     | Bin 345 -> 0 bytes
 src/it/install-file-generated-pom/test-0.1.pom     |  35 ------
 src/it/install-file-generated-pom/test.properties  |  19 ---
 src/it/install-file-generated-pom/verify.groovy    |  46 --------
 src/it/jar-sources-javadoc/invoker.properties      |  18 ---
 src/it/jar-sources-javadoc/javadoc.jar             | Bin 345 -> 0 bytes
 src/it/jar-sources-javadoc/pom.xml                 |  40 -------
 src/it/jar-sources-javadoc/setup.groovy            |  29 -----
 src/it/jar-sources-javadoc/sources.jar             | Bin 345 -> 0 bytes
 src/it/jar-sources-javadoc/test.jar                | Bin 345 -> 0 bytes
 src/it/jar-sources-javadoc/test.properties         |  24 ----
 src/it/jar-sources-javadoc/verify.groovy           |  65 ----------
 src/it/release-jar/pom.xml                         |  64 ----------
 src/it/release-jar/setup.groovy                    |  29 -----
 src/it/release-jar/verify.groovy                   |  40 -------
 src/it/release-pom/pom.xml                         |  59 ----------
 src/it/release-pom/setup.groovy                    |  29 -----
 src/it/release-pom/verify.groovy                   |  39 ------
 src/it/snapshot-jar/pom.xml                        |  64 ----------
 src/it/snapshot-jar/setup.groovy                   |  29 -----
 src/it/snapshot-jar/verify.groovy                  |  41 -------
 src/it/snapshot-pom/pom.xml                        |  59 ----------
 src/it/snapshot-pom/setup.groovy                   |  29 -----
 src/it/snapshot-pom/verify.groovy                  |  40 -------
 .../maven/plugins/install/InstallFileMojoTest.java | 131 +++++++++++++++++++++
 .../install/InstallMojoPomPackagingTest.java       |  66 +++++++++++
 .../maven/plugins/install/InstallMojoTest.java     | 109 +++++++++++++++++
 .../maven/plugins/install/InstallTestHelper.java   |  42 +++++++
 34 files changed, 348 insertions(+), 1034 deletions(-)

diff --git a/src/it/attach-release-jar/pom.xml 
b/src/it/attach-release-jar/pom.xml
deleted file mode 100644
index 57f05d6..0000000
--- a/src/it/attach-release-jar/pom.xml
+++ /dev/null
@@ -1,80 +0,0 @@
-<?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/xsd/maven-4.0.0.xsd";>
-  <modelVersion>4.0.0</modelVersion>
-
-  <groupId>org.apache.maven.its.install.arj</groupId>
-  <artifactId>test</artifactId>
-  <version>1.0</version>
-  <packaging>jar</packaging>
-
-  <description>Tests the installation of a simple release JAR with an attached 
artifact.</description>
-
-  <properties>
-    <maven.test.skip>true</maven.test.skip>
-  </properties>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <version>@version.maven-compiler-plugin@</version>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-install-plugin</artifactId>
-        <version>@project.version@</version>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-        <version>@version.maven-jar-plugin@</version>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-resources-plugin</artifactId>
-        <version>@version.maven-resources-plugin@</version>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-source-plugin</artifactId>
-        <version>@version.maven-source-plugin@</version>
-        <configuration>
-          <forceCreation>true</forceCreation>
-        </configuration>
-        <executions>
-          <execution>
-            <id>attach-sources</id>
-            <goals>
-              <goal>jar</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <version>@version.maven-surefire@</version>
-      </plugin>
-    </plugins>
-  </build>
-
-</project>
diff --git a/src/it/attach-release-jar/setup.groovy 
b/src/it/attach-release-jar/setup.groovy
deleted file mode 100644
index f402522..0000000
--- a/src/it/attach-release-jar/setup.groovy
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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 java.io.*;
-import java.util.*;
-
-import org.codehaus.plexus.util.*;
-
-File file = new File( localRepositoryPath, "org/apache/maven/its/install/arj" 
);
-System.out.println( "Deleting " + file );
-FileUtils.deleteDirectory( file );
-
-return true;
diff --git a/src/it/attach-release-jar/verify.groovy 
b/src/it/attach-release-jar/verify.groovy
deleted file mode 100644
index 3652c5e..0000000
--- a/src/it/attach-release-jar/verify.groovy
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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 java.io.*;
-import java.util.*;
-
-String[] paths =
-[
-    "org/apache/maven/its/install/arj/test/maven-metadata-local.xml",
-    "org/apache/maven/its/install/arj/test/1.0/test-1.0.pom",
-    "org/apache/maven/its/install/arj/test/1.0/test-1.0.jar",
-    "org/apache/maven/its/install/arj/test/1.0/test-1.0-sources.jar",
-];
-
-for ( String path : paths )
-{
-    File file = new File( localRepositoryPath, path );
-    System.out.println( "Checking for existence of " + file );
-    if ( !file.isFile() )
-    {
-        throw new FileNotFoundException( "Missing: " + file.getAbsolutePath() 
);
-    }
-}
-
-return true;
diff --git a/src/it/install-file-generated-pom/invoker.properties 
b/src/it/install-file-generated-pom/invoker.properties
deleted file mode 100644
index 0413238..0000000
--- a/src/it/install-file-generated-pom/invoker.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-# 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.
-
-invoker.goals = 
org.apache.maven.plugins:maven-install-plugin:${project.version}:install-file
diff --git a/src/it/install-file-generated-pom/pom.xml 
b/src/it/install-file-generated-pom/pom.xml
deleted file mode 100644
index b04f83f..0000000
--- a/src/it/install-file-generated-pom/pom.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?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/xsd/maven-4.0.0.xsd";>
-  <modelVersion>4.0.0</modelVersion>
-
-  <groupId>org.apache.maven.its.install.55</groupId>
-  <artifactId>test</artifactId>
-  <version>1.0</version>
-  <packaging>jar</packaging>
-
-  <description>Tests the manual installation of a simple release JAR with a 
corresponding POM whose coordinates are inherited
-    from the parent.</description>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-install-plugin</artifactId>
-        <version>@project.version@</version>
-      </plugin>
-    </plugins>
-  </build>
-
-</project>
diff --git a/src/it/install-file-generated-pom/setup.groovy 
b/src/it/install-file-generated-pom/setup.groovy
deleted file mode 100644
index e04174d..0000000
--- a/src/it/install-file-generated-pom/setup.groovy
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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 java.io.*;
-import java.util.*;
-
-File file = new File( localRepositoryPath, "org/apache/maven/its/install/55" );
-System.out.println( "Deleting " + file );
-file.deleteDir();
-
-return true;
diff --git a/src/it/install-file-generated-pom/test-0.1.jar 
b/src/it/install-file-generated-pom/test-0.1.jar
deleted file mode 100644
index 226277c..0000000
Binary files a/src/it/install-file-generated-pom/test-0.1.jar and /dev/null 
differ
diff --git a/src/it/install-file-generated-pom/test-0.1.pom 
b/src/it/install-file-generated-pom/test-0.1.pom
deleted file mode 100644
index c07e440..0000000
--- a/src/it/install-file-generated-pom/test-0.1.pom
+++ /dev/null
@@ -1,35 +0,0 @@
-<?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/xsd/maven-4.0.0.xsd";>
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.maven.its.install.55</groupId>
-    <artifactId>parent</artifactId>
-    <version>1.0</version>
-  </parent>
-
-  <!-- NOTE: Inherit everything from the parent -->
-  <artifactId>test</artifactId>
-
-</project>
diff --git a/src/it/install-file-generated-pom/test.properties 
b/src/it/install-file-generated-pom/test.properties
deleted file mode 100644
index 5b4e2ae..0000000
--- a/src/it/install-file-generated-pom/test.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-# 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.
-
-file = test-0.1.jar
-pomFile = test-0.1.pom
diff --git a/src/it/install-file-generated-pom/verify.groovy 
b/src/it/install-file-generated-pom/verify.groovy
deleted file mode 100644
index 2affff8..0000000
--- a/src/it/install-file-generated-pom/verify.groovy
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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 java.io.*;
-import java.util.*;
-
-String[] paths =
-[
-    "org/apache/maven/its/install/55/test/maven-metadata-local.xml",
-    "org/apache/maven/its/install/55/test/1.0/test-1.0.pom",
-    "org/apache/maven/its/install/55/test/1.0/test-1.0.jar",
-];
-
-for ( String path : paths )
-{
-    File file = new File( localRepositoryPath, path );
-    System.out.println( "Checking for existence of " + file );
-    if ( !file.isFile() )
-    {
-        throw new FileNotFoundException( "Missing: " + file.getAbsolutePath() 
);
-    }
-}
-
-File file = new File( basedir, "test-0.1.pom" );
-if ( !file.isFile() )
-{
-    throw new FileNotFoundException( "Missing: " + file.getAbsolutePath() );
-}
-
-return true;
diff --git a/src/it/jar-sources-javadoc/invoker.properties 
b/src/it/jar-sources-javadoc/invoker.properties
deleted file mode 100644
index 0413238..0000000
--- a/src/it/jar-sources-javadoc/invoker.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-# 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.
-
-invoker.goals = 
org.apache.maven.plugins:maven-install-plugin:${project.version}:install-file
diff --git a/src/it/jar-sources-javadoc/javadoc.jar 
b/src/it/jar-sources-javadoc/javadoc.jar
deleted file mode 100644
index 226277c..0000000
Binary files a/src/it/jar-sources-javadoc/javadoc.jar and /dev/null differ
diff --git a/src/it/jar-sources-javadoc/pom.xml 
b/src/it/jar-sources-javadoc/pom.xml
deleted file mode 100644
index 2ebb9f8..0000000
--- a/src/it/jar-sources-javadoc/pom.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?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/xsd/maven-4.0.0.xsd";>
-  <modelVersion>4.0.0</modelVersion>
-
-  <groupId>org.apache.maven.its.install.jsj</groupId>
-  <artifactId>test</artifactId>
-  <version>1.0</version>
-  <packaging>jar</packaging>
-
-  <description>Tests combined installation of a JAR together with its API docs 
and sources (cf. MINSTALL-49).</description>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-install-plugin</artifactId>
-        <version>@project.version@</version>
-      </plugin>
-    </plugins>
-  </build>
-
-</project>
diff --git a/src/it/jar-sources-javadoc/setup.groovy 
b/src/it/jar-sources-javadoc/setup.groovy
deleted file mode 100644
index 19b1ee1..0000000
--- a/src/it/jar-sources-javadoc/setup.groovy
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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 java.io.*;
-import java.util.*;
-
-import org.codehaus.plexus.util.*;
-
-File groupDir = new File( localRepositoryPath, 
"org/apache/maven/its/install/jsj" );
-System.out.println( "Deleting " + groupDir );
-FileUtils.deleteDirectory( groupDir );
-
-return true;
diff --git a/src/it/jar-sources-javadoc/sources.jar 
b/src/it/jar-sources-javadoc/sources.jar
deleted file mode 100644
index 226277c..0000000
Binary files a/src/it/jar-sources-javadoc/sources.jar and /dev/null differ
diff --git a/src/it/jar-sources-javadoc/test.jar 
b/src/it/jar-sources-javadoc/test.jar
deleted file mode 100644
index 226277c..0000000
Binary files a/src/it/jar-sources-javadoc/test.jar and /dev/null differ
diff --git a/src/it/jar-sources-javadoc/test.properties 
b/src/it/jar-sources-javadoc/test.properties
deleted file mode 100644
index b7330af..0000000
--- a/src/it/jar-sources-javadoc/test.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-# 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.
-
-file = test.jar
-groupId = org.apache.maven.its.install.jsj
-artifactId = test
-version = 0.1
-packaging = jar
-javadoc = javadoc.jar
-sources = sources.jar
diff --git a/src/it/jar-sources-javadoc/verify.groovy 
b/src/it/jar-sources-javadoc/verify.groovy
deleted file mode 100644
index 8ca0f99..0000000
--- a/src/it/jar-sources-javadoc/verify.groovy
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * 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 java.io.*;
-import java.util.*;
-import java.lang.*;
-
-String[] paths =
-[
-    "org/apache/maven/its/install/jsj/test/maven-metadata-local.xml",
-    "org/apache/maven/its/install/jsj/test/0.1/test-0.1.jar",
-    "org/apache/maven/its/install/jsj/test/0.1/test-0.1.pom",
-    "org/apache/maven/its/install/jsj/test/0.1/test-0.1-sources.jar",
-    "org/apache/maven/its/install/jsj/test/0.1/test-0.1-javadoc.jar",
-];
-
-String[] pathsWhichShouldNotExist =
-[
-    "org/apache/maven/its/install/jsj/test/0.1/test-0.1.jar.md5",
-    "org/apache/maven/its/install/jsj/test/0.1/test-0.1.jar.sha1",
-    "org/apache/maven/its/install/jsj/test/0.1/test-0.1.pom.md5",
-    "org/apache/maven/its/install/jsj/test/0.1/test-0.1.pom.sha1",
-    "org/apache/maven/its/install/jsj/test/0.1/test-0.1-sources.jar.md5",
-    "org/apache/maven/its/install/jsj/test/0.1/test-0.1-sources.jar.sha1",
-    "org/apache/maven/its/install/jsj/test/0.1/test-0.1-javadoc.jar.md5",
-    "org/apache/maven/its/install/jsj/test/0.1/test-0.1-javadoc.jar.sha1",
-];
-
-for ( String path : paths )
-{
-    File file = new File( localRepositoryPath, path );
-    System.out.println( "Checking for existence of " + file );
-    if ( !file.isFile() )
-    {
-        throw new FileNotFoundException( "Missing: " + file.getAbsolutePath() 
);
-    }
-}
-
-for ( String path : pathsWhichShouldNotExist )
-{
-    File file = new File( localRepositoryPath, path );
-    System.out.println( "Checking for non existence of " + file );
-    if ( file.isFile() )
-    {
-        throw new IOException( "Missing: " + file.getAbsolutePath() );
-    }
-}
-
-return true;
diff --git a/src/it/release-jar/pom.xml b/src/it/release-jar/pom.xml
deleted file mode 100644
index 747a119..0000000
--- a/src/it/release-jar/pom.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?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/xsd/maven-4.0.0.xsd";>
-  <modelVersion>4.0.0</modelVersion>
-
-  <groupId>org.apache.maven.its.install.rj</groupId>
-  <artifactId>test</artifactId>
-  <version>1.0</version>
-  <packaging>jar</packaging>
-
-  <description>Tests the installation of a simple release JAR.</description>
-
-  <properties>
-    <maven.test.skip>true</maven.test.skip>
-  </properties>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <version>@version.maven-compiler-plugin@</version>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-install-plugin</artifactId>
-        <version>@project.version@</version>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-        <version>@version.maven-jar-plugin@</version>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-resources-plugin</artifactId>
-        <version>@version.maven-resources-plugin@</version>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <version>@version.maven-surefire@</version>
-      </plugin>
-    </plugins>
-  </build>
-
-</project>
diff --git a/src/it/release-jar/setup.groovy b/src/it/release-jar/setup.groovy
deleted file mode 100644
index dd33a5e..0000000
--- a/src/it/release-jar/setup.groovy
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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 java.io.*;
-import java.util.*;
-
-import org.codehaus.plexus.util.*;
-
-File file = new File( localRepositoryPath, "org/apache/maven/its/install/rj" );
-System.out.println( "Deleting " + file );
-FileUtils.deleteDirectory( file );
-
-return true;
diff --git a/src/it/release-jar/verify.groovy b/src/it/release-jar/verify.groovy
deleted file mode 100644
index a862f37..0000000
--- a/src/it/release-jar/verify.groovy
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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 java.io.*;
-import java.util.*;
-
-String[] paths =
-[
-    "org/apache/maven/its/install/rj/test/maven-metadata-local.xml",
-    "org/apache/maven/its/install/rj/test/1.0/test-1.0.pom",
-    "org/apache/maven/its/install/rj/test/1.0/test-1.0.jar",
-];
-
-for ( String path : paths )
-{
-    File file = new File( localRepositoryPath, path );
-    System.out.println( "Checking for existence of " + file );
-    if ( !file.isFile() )
-    {
-        throw new FileNotFoundException( "Missing: " + file.getAbsolutePath() 
);
-    }
-}
-
-return true;
diff --git a/src/it/release-pom/pom.xml b/src/it/release-pom/pom.xml
deleted file mode 100644
index 27e70b0..0000000
--- a/src/it/release-pom/pom.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?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/xsd/maven-4.0.0.xsd";>
-  <modelVersion>4.0.0</modelVersion>
-
-  <groupId>org.apache.maven.its.install.rp</groupId>
-  <artifactId>test</artifactId>
-  <version>1.0</version>
-  <packaging>pom</packaging>
-
-  <description>Tests the installation of a simple release POM.</description>
-
-  <properties>
-    <maven.test.skip>true</maven.test.skip>
-  </properties>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <version>@version.maven-compiler-plugin@</version>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-install-plugin</artifactId>
-        <version>@project.version@</version>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-resources-plugin</artifactId>
-        <version>@version.maven-resources-plugin@</version>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <version>@version.maven-surefire@</version>
-      </plugin>
-    </plugins>
-  </build>
-
-</project>
diff --git a/src/it/release-pom/setup.groovy b/src/it/release-pom/setup.groovy
deleted file mode 100644
index d1b2074..0000000
--- a/src/it/release-pom/setup.groovy
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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 java.io.*;
-import java.util.*;
-
-import org.codehaus.plexus.util.*;
-
-File file = new File( localRepositoryPath, "org/apache/maven/its/install/rp" );
-System.out.println( "Deleting " + file );
-FileUtils.deleteDirectory( file );
-
-return true;
diff --git a/src/it/release-pom/verify.groovy b/src/it/release-pom/verify.groovy
deleted file mode 100644
index 943f28f..0000000
--- a/src/it/release-pom/verify.groovy
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 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 java.io.*;
-import java.util.*;
-
-String[] paths =
-[
-    "org/apache/maven/its/install/rp/test/maven-metadata-local.xml",
-    "org/apache/maven/its/install/rp/test/1.0/test-1.0.pom",
-];
-
-for ( String path : paths )
-{
-    File file = new File( localRepositoryPath, path );
-    System.out.println( "Checking for existence of " + file );
-    if ( !file.isFile() )
-    {
-        throw new FileNotFoundException( "Missing: " + file.getAbsolutePath() 
);
-    }
-}
-
-return true;
diff --git a/src/it/snapshot-jar/pom.xml b/src/it/snapshot-jar/pom.xml
deleted file mode 100644
index e9c283d..0000000
--- a/src/it/snapshot-jar/pom.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?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/xsd/maven-4.0.0.xsd";>
-  <modelVersion>4.0.0</modelVersion>
-
-  <groupId>org.apache.maven.its.install.sj</groupId>
-  <artifactId>test</artifactId>
-  <version>1.0-SNAPSHOT</version>
-  <packaging>jar</packaging>
-
-  <description>Tests the installation of a simple snapshot JAR.</description>
-
-  <properties>
-    <maven.test.skip>true</maven.test.skip>
-  </properties>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <version>@version.maven-compiler-plugin@</version>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-        <version>@version.maven-jar-plugin@</version>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-install-plugin</artifactId>
-        <version>@project.version@</version>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-resources-plugin</artifactId>
-        <version>@version.maven-resources-plugin@</version>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <version>@version.maven-surefire@</version>
-      </plugin>
-    </plugins>
-  </build>
-
-</project>
diff --git a/src/it/snapshot-jar/setup.groovy b/src/it/snapshot-jar/setup.groovy
deleted file mode 100644
index d8cd355..0000000
--- a/src/it/snapshot-jar/setup.groovy
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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 java.io.*;
-import java.util.*;
-
-import org.codehaus.plexus.util.*;
-
-File file = new File( localRepositoryPath, "org/apache/maven/its/install/sj" );
-System.out.println( "Deleting " + file );
-FileUtils.deleteDirectory( file );
-
-return true;
diff --git a/src/it/snapshot-jar/verify.groovy 
b/src/it/snapshot-jar/verify.groovy
deleted file mode 100644
index 811ed08..0000000
--- a/src/it/snapshot-jar/verify.groovy
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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 java.io.*;
-import java.util.*;
-
-String[] paths =
-[
-    "org/apache/maven/its/install/sj/test/maven-metadata-local.xml",
-    
"org/apache/maven/its/install/sj/test/1.0-SNAPSHOT/maven-metadata-local.xml",
-    "org/apache/maven/its/install/sj/test/1.0-SNAPSHOT/test-1.0-SNAPSHOT.pom",
-    "org/apache/maven/its/install/sj/test/1.0-SNAPSHOT/test-1.0-SNAPSHOT.jar",
-];
-
-for ( String path : paths )
-{
-    File file = new File( localRepositoryPath, path );
-    System.out.println( "Checking for existence of " + file );
-    if ( !file.isFile() )
-    {
-        throw new FileNotFoundException( "Missing: " + file.getAbsolutePath() 
);
-    }
-}
-
-return true;
diff --git a/src/it/snapshot-pom/pom.xml b/src/it/snapshot-pom/pom.xml
deleted file mode 100644
index 991a007..0000000
--- a/src/it/snapshot-pom/pom.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?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/xsd/maven-4.0.0.xsd";>
-  <modelVersion>4.0.0</modelVersion>
-
-  <groupId>org.apache.maven.its.install.sp</groupId>
-  <artifactId>test</artifactId>
-  <version>1.0-SNAPSHOT</version>
-  <packaging>pom</packaging>
-
-  <description>Tests the installation of a simple snapshot POM.</description>
-
-  <properties>
-    <maven.test.skip>true</maven.test.skip>
-  </properties>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <version>@version.maven-compiler-plugin@</version>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-install-plugin</artifactId>
-        <version>@project.version@</version>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-resources-plugin</artifactId>
-        <version>@version.maven-resources-plugin@</version>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <version>@version.maven-surefire@</version>
-      </plugin>
-    </plugins>
-  </build>
-
-</project>
diff --git a/src/it/snapshot-pom/setup.groovy b/src/it/snapshot-pom/setup.groovy
deleted file mode 100644
index 27cbf2c..0000000
--- a/src/it/snapshot-pom/setup.groovy
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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 java.io.*;
-import java.util.*;
-
-import org.codehaus.plexus.util.*;
-
-File file = new File( localRepositoryPath, "org/apache/maven/its/install/sp" );
-System.out.println( "Deleting " + file );
-FileUtils.deleteDirectory( file );
-
-return true;
diff --git a/src/it/snapshot-pom/verify.groovy 
b/src/it/snapshot-pom/verify.groovy
deleted file mode 100644
index 7403ead..0000000
--- a/src/it/snapshot-pom/verify.groovy
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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 java.io.*;
-import java.util.*;
-
-String[] paths =
-[
-    "org/apache/maven/its/install/sp/test/maven-metadata-local.xml",
-    
"org/apache/maven/its/install/sp/test/1.0-SNAPSHOT/maven-metadata-local.xml",
-    "org/apache/maven/its/install/sp/test/1.0-SNAPSHOT/test-1.0-SNAPSHOT.pom",
-];
-
-for ( String path : paths )
-{
-    File file = new File( localRepositoryPath, path );
-    System.out.println( "Checking for existence of " + file );
-    if ( !file.isFile() )
-    {
-        throw new FileNotFoundException( "Missing: " + file.getAbsolutePath() 
);
-    }
-}
-
-return true;
diff --git 
a/src/test/java/org/apache/maven/plugins/install/InstallFileMojoTest.java 
b/src/test/java/org/apache/maven/plugins/install/InstallFileMojoTest.java
index d26dee9..a2d5bef 100644
--- a/src/test/java/org/apache/maven/plugins/install/InstallFileMojoTest.java
+++ b/src/test/java/org/apache/maven/plugins/install/InstallFileMojoTest.java
@@ -25,7 +25,9 @@ import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.util.Arrays;
 import java.util.Collections;
+import java.util.HashMap;
 import java.util.HashSet;
+import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.atomic.AtomicReference;
 import java.util.function.Consumer;
@@ -909,6 +911,135 @@ class InstallFileMojoTest {
             String classifier,
             String extension) {}
 
+    /**
+     * Converted from {@code src/it/install-file-generated-pom}: install-file 
is given only {@code file} and
+     * {@code pomFile}; groupId/artifactId/version are inherited from the 
supplied POM's parent. The IT asserted
+     * that the POM and JAR land at the inherited 1.0 coordinates, that the 
group-level metadata exists, and that
+     * the original {@code pomFile} is still on disk. The harness mocks the 
real {@link ArtifactInstaller} (which
+     * writes the metadata), so the metadata path is expressed through the 
install request's coordinates.
+     */
+    @Test
+    @InjectMojo(goal = "install-file")
+    @MojoParameter(
+            name = "file",
+            value = 
"${project.basedir}/target/test-classes/unit/maven-install-test-1.0-SNAPSHOT.jar")
+    void 
installFileWithPomFileInheritsCoordinatesAndKeepsSourcePom(InstallFileMojo 
mojo) throws Exception {
+        assertNotNull(mojo);
+        Path pomFile = Files.createTempFile("install-file-generated-pom", 
".pom");
+        Files.writeString(
+                pomFile,
+                "<project>"
+                        + "<modelVersion>4.0.0</modelVersion>"
+                        + "<parent>"
+                        + "<groupId>org.apache.maven.its.install.55</groupId>"
+                        + "<artifactId>parent</artifactId>"
+                        + "<version>1.0</version>"
+                        + "</parent>"
+                        + "<artifactId>test</artifactId>"
+                        + "</project>");
+        setVariableValueToObject(mojo, "pomFile", pomFile);
+
+        this.groupId = "org.apache.maven.its.install.55";
+        this.artifactId = "test";
+        this.version = "1.0";
+
+        ArtifactInstallerRequest request = execute(mojo);
+
+        assertNotNull(request);
+        Artifact pom = getArtifact(null, "pom");
+        Artifact jar = getArtifact(null, "jar");
+        assertEquals(new HashSet<>(Arrays.asList(pom, jar)), new 
HashSet<>(request.getArtifacts()));
+        assertEquals(pomFile, artifactManager.getPath(pom).orElse(null));
+        assertFileExists(artifactManager.getPath(jar).orElse(null));
+        assertTrue(Files.isRegularFile(pomFile), "the source pomFile must 
still exist after installation");
+        assertGroupMetadataCoordinates(request, 
"org/apache/maven/its/install/55/test");
+        InstallTestHelper.assertNoChecksumFiles(Paths.get(getBasedir(), 
LOCAL_REPO));
+    }
+
+    /**
+     * Converted from {@code src/it/jar-sources-javadoc}: install-file with a 
JAR plus {@code sources} and
+     * {@code javadoc} attachments installs all four files (POM, JAR, sources, 
javadoc) and no checksum files.
+     * The harness mocks the real {@link ArtifactInstaller} (which writes 
metadata), so the group-level metadata
+     * path is expressed through the install request's coordinates.
+     */
+    @Test
+    @InjectMojo(goal = "install-file")
+    @MojoParameter(name = "groupId", value = 
"org.apache.maven.its.install.jsj")
+    @MojoParameter(name = "artifactId", value = "test")
+    @MojoParameter(name = "version", value = "0.1")
+    @MojoParameter(name = "packaging", value = "jar")
+    @MojoParameter(
+            name = "file",
+            value = 
"${project.basedir}/target/test-classes/unit/maven-install-test-1.0-SNAPSHOT.jar")
+    @MojoParameter(
+            name = "sources",
+            value = 
"${project.basedir}/target/test-classes/unit/attached-artifact-test-1.0-SNAPSHOT.jar")
+    @MojoParameter(
+            name = "javadoc",
+            value = 
"${project.basedir}/target/test-classes/unit/attached-artifact-test-1.0-SNAPSHOT.jar")
+    void 
installFileWithSourcesAndJavadocInstallsAllFourFilesWithoutChecksums(InstallFileMojo
 mojo) throws Exception {
+        assertNotNull(mojo);
+        assignValuesForParameter(mojo);
+
+        Artifact pom = getArtifact(null, "pom");
+        Artifact jar = getArtifact(null, "jar");
+        Artifact sources = getArtifact("sources", "jar");
+        Artifact javadoc = getArtifact("javadoc", "jar");
+        // The generated POM is a temporary file on the harness's in-memory 
file system that the mojo deletes
+        // (and clears the path for) in its finally block, so capture its 
content while the install call is in
+        // flight; the real jar/sources/javadoc inputs are checked as ordinary 
files below.
+        Map<Artifact, Path> installedPaths = new HashMap<>();
+        AtomicReference<Model> generatedPom = new AtomicReference<>();
+        ArtifactInstallerRequest request = execute(mojo, air -> {
+            ArtifactManager requestArtifactManager = 
air.getSession().getService(ArtifactManager.class);
+            for (Artifact artifact : Arrays.asList(jar, sources, javadoc)) {
+                installedPaths.put(
+                        artifact, 
requestArtifactManager.getPath(artifact).orElse(null));
+            }
+            generatedPom.set(readModelFrom(air, pom));
+        });
+
+        assertNotNull(request);
+        assertEquals(new HashSet<>(Arrays.asList(pom, jar, sources, javadoc)), 
new HashSet<>(request.getArtifacts()));
+        for (Artifact artifact : Arrays.asList(jar, sources, javadoc)) {
+            Path path = installedPaths.get(artifact);
+            assertTrue(
+                    path != null && Files.exists(path),
+                    () -> artifact.key() + " should have an existing file, got 
" + path);
+        }
+        assertEquals("4.0.0", generatedPom.get().getModelVersion());
+        assertEquals(groupId, generatedPom.get().getGroupId());
+        assertEquals(artifactId, generatedPom.get().getArtifactId());
+        assertEquals(version, generatedPom.get().getVersion());
+        assertEquals(
+                "org/apache/maven/its/install/jsj/test/0.1/test-0.1.jar",
+                repoRelativePath(session.getPathForLocalArtifact(jar)));
+        assertEquals(
+                "org/apache/maven/its/install/jsj/test/0.1/test-0.1.pom",
+                repoRelativePath(session.getPathForLocalArtifact(pom)));
+        assertEquals(
+                
"org/apache/maven/its/install/jsj/test/0.1/test-0.1-sources.jar",
+                repoRelativePath(session.getPathForLocalArtifact(sources)));
+        assertEquals(
+                
"org/apache/maven/its/install/jsj/test/0.1/test-0.1-javadoc.jar",
+                repoRelativePath(session.getPathForLocalArtifact(javadoc)));
+        assertTrue(request.getArtifacts().stream()
+                .noneMatch(a -> "md5".equals(a.getExtension()) || 
"sha1".equals(a.getExtension())));
+        assertGroupMetadataCoordinates(request, 
"org/apache/maven/its/install/jsj/test");
+        InstallTestHelper.assertNoChecksumFiles(Paths.get(getBasedir(), 
LOCAL_REPO));
+    }
+
+    private void assertGroupMetadataCoordinates(ArtifactInstallerRequest 
request, String groupArtifactPath) {
+        Artifact pom = request.getArtifacts().stream()
+                .filter(a -> "pom".equals(a.getExtension()))
+                .findFirst()
+                .orElseThrow();
+        Path pomPath = request.getSession().getPathForLocalArtifact(pom);
+        assertEquals(
+                groupArtifactPath + "/maven-metadata-local.xml",
+                
InstallTestHelper.repoRelativePath(InstallTestHelper.groupLevelMetadataPath(pomPath),
 LOCAL_REPO));
+    }
+
     private static String repoRelativePath(Path path) {
         // The harness returns relative Paths from a different FileSystem 
provider than Paths.get, so compare strings.
         String prefix = LOCAL_REPO + "/";
diff --git 
a/src/test/java/org/apache/maven/plugins/install/InstallMojoPomPackagingTest.java
 
b/src/test/java/org/apache/maven/plugins/install/InstallMojoPomPackagingTest.java
index a59315a..514c843 100644
--- 
a/src/test/java/org/apache/maven/plugins/install/InstallMojoPomPackagingTest.java
+++ 
b/src/test/java/org/apache/maven/plugins/install/InstallMojoPomPackagingTest.java
@@ -19,6 +19,7 @@
 package org.apache.maven.plugins.install;
 
 import java.io.File;
+import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.util.Collection;
 import java.util.List;
@@ -124,6 +125,71 @@ class InstallMojoPomPackagingTest {
         InstallTestHelper.assertNoChecksumFiles(Paths.get(getBasedir(), 
LOCAL_REPO));
     }
 
+    /** Converted from {@code src/it/release-pom}: a plain release POM 
installs only its POM. */
+    @Test
+    @InjectMojo(goal = "install")
+    @MojoParameter(name = "installAtEnd", value = "false")
+    void releasePomInstallsPom(InstallMojo mojo) throws Exception {
+        assertNotNull(mojo);
+        ProjectStub project = (ProjectStub) getVariableValueFromObject(mojo, 
"project");
+        project.setGroupId("org.apache.maven.its.install.rp");
+        project.setArtifactId("test");
+        project.setVersion("1.0");
+        artifactManager.setPath(project.getPomArtifact(), 
project.getPomPath());
+
+        ArtifactInstallerRequest request = execute(mojo);
+
+        assertNotNull(request);
+        assertEquals(
+                List.of("org.apache.maven.its.install.rp:test:pom:1.0"),
+                request.getArtifacts().stream().map(Artifact::key).toList());
+        assertMetadataCoordinates(request, 
"org/apache/maven/its/install/rp/test", "1.0");
+    }
+
+    /**
+     * Converted from {@code src/it/snapshot-pom}: a snapshot POM installs its 
POM at the version path and the IT's
+     * two metadata locations. {@code installIfPackagingIsPom} covers the 
artifact part; this adds the metadata
+     * coordinates, which are the only assertion that IT had beyond it.
+     */
+    @Test
+    @InjectMojo(goal = "install")
+    @MojoParameter(name = "installAtEnd", value = "false")
+    void snapshotPomInstallsPomWithVersionedMetadata(InstallMojo mojo) throws 
Exception {
+        assertNotNull(mojo);
+        ProjectStub project = (ProjectStub) getVariableValueFromObject(mojo, 
"project");
+        project.setGroupId("org.apache.maven.its.install.sp");
+        project.setArtifactId("test");
+        project.setVersion("1.0-SNAPSHOT");
+        artifactManager.setPath(project.getPomArtifact(), 
project.getPomPath());
+
+        ArtifactInstallerRequest request = execute(mojo);
+
+        assertNotNull(request);
+        assertEquals(
+                
List.of("org.apache.maven.its.install.sp:test:pom:1.0-SNAPSHOT"),
+                request.getArtifacts().stream().map(Artifact::key).toList());
+        assertMetadataCoordinates(request, 
"org/apache/maven/its/install/sp/test", "1.0-SNAPSHOT");
+    }
+
+    /**
+     * Asserts the group-level and version-level {@code 
maven-metadata-local.xml} locations that the IT checked as
+     * files. The harness mocks the real {@link ArtifactInstaller}, which 
writes that metadata, so the paths are
+     * derived from the installed POM's coordinates handed to the session (see 
{@link InstallTestHelper}).
+     */
+    private void assertMetadataCoordinates(ArtifactInstallerRequest request, 
String groupArtifactPath, String version) {
+        Artifact pom = request.getArtifacts().stream()
+                .filter(a -> "pom".equals(a.getExtension()))
+                .findFirst()
+                .orElseThrow();
+        Path pomPath = request.getSession().getPathForLocalArtifact(pom);
+        assertEquals(
+                groupArtifactPath + "/maven-metadata-local.xml",
+                
InstallTestHelper.repoRelativePath(InstallTestHelper.groupLevelMetadataPath(pomPath),
 LOCAL_REPO));
+        assertEquals(
+                groupArtifactPath + "/" + version + 
"/maven-metadata-local.xml",
+                
InstallTestHelper.repoRelativePath(InstallTestHelper.versionLevelMetadataPath(pomPath),
 LOCAL_REPO));
+    }
+
     @Provides
     @Singleton
     @Priority(10)
diff --git 
a/src/test/java/org/apache/maven/plugins/install/InstallMojoTest.java 
b/src/test/java/org/apache/maven/plugins/install/InstallMojoTest.java
index 33c1d5b..86401c1 100644
--- a/src/test/java/org/apache/maven/plugins/install/InstallMojoTest.java
+++ b/src/test/java/org/apache/maven/plugins/install/InstallMojoTest.java
@@ -346,6 +346,115 @@ class InstallMojoTest {
         InstallTestHelper.assertNoChecksumFiles(Paths.get(getBasedir(), 
LOCAL_REPO));
     }
 
+    /** Converted from {@code src/it/release-jar}: a plain release JAR 
installs its POM and JAR. */
+    @Test
+    @InjectMojo(goal = "install")
+    @MojoParameter(name = "installAtEnd", value = "false")
+    void releaseJarInstallsPomAndJar(InstallMojo mojo) throws Exception {
+        assertNotNull(mojo);
+        ProjectStub project = (ProjectStub) getVariableValueFromObject(mojo, 
"project");
+        project.setGroupId("org.apache.maven.its.install.rj");
+        project.setArtifactId("test");
+        project.setVersion("1.0");
+        ProducedArtifactStub main =
+                new ProducedArtifactStub("org.apache.maven.its.install.rj", 
"test", "", "1.0", "jar");
+        project.setMainArtifact(main);
+        artifactManager.setPath(
+                main, Paths.get(getBasedir(), 
"target/test-classes/unit/maven-install-test-1.0-SNAPSHOT.jar"));
+
+        ArtifactInstallerRequest request = execute(mojo);
+
+        assertNotNull(request);
+        assertEquals(
+                Arrays.asList(
+                        "org.apache.maven.its.install.rj:test:pom:1.0", 
"org.apache.maven.its.install.rj:test:jar:1.0"),
+                request.getArtifacts().stream().map(Artifact::key).toList());
+        assertMetadataCoordinates(request, 
"org/apache/maven/its/install/rj/test", "1.0");
+    }
+
+    /**
+     * Converted from {@code src/it/attach-release-jar}: a release JAR with an 
attached sources JAR installs the
+     * POM, the main JAR and the classified sources JAR. {@code 
basicInstallWithAttachedArtifacts} covers the
+     * attachment mechanics, but used a different artifactId for the 
attachment and a snapshot version; this test
+     * preserves the IT's same-GAV sources classifier on a release version.
+     */
+    @Test
+    @InjectMojo(goal = "install")
+    @MojoParameter(name = "installAtEnd", value = "false")
+    void releaseJarWithAttachedSourcesInstallsPomJarAndSources(InstallMojo 
mojo) throws Exception {
+        assertNotNull(mojo);
+        ProjectStub project = (ProjectStub) getVariableValueFromObject(mojo, 
"project");
+        project.setGroupId("org.apache.maven.its.install.arj");
+        project.setArtifactId("test");
+        project.setVersion("1.0");
+        ProducedArtifactStub main =
+                new ProducedArtifactStub("org.apache.maven.its.install.arj", 
"test", "", "1.0", "jar");
+        project.setMainArtifact(main);
+        artifactManager.setPath(
+                main, Paths.get(getBasedir(), 
"target/test-classes/unit/maven-install-test-1.0-SNAPSHOT.jar"));
+        projectManager.attachArtifact(
+                project,
+                new ProducedArtifactStub("org.apache.maven.its.install.arj", 
"test", "sources", "1.0", "jar"),
+                Paths.get(getBasedir()).resolve(ATTACHED_ARTIFACT_JAR));
+
+        ArtifactInstallerRequest request = execute(mojo);
+
+        assertNotNull(request);
+        assertEquals(
+                Arrays.asList(
+                        "org.apache.maven.its.install.arj:test:pom:1.0",
+                        "org.apache.maven.its.install.arj:test:jar:1.0",
+                        
"org.apache.maven.its.install.arj:test:jar:sources:1.0"),
+                request.getArtifacts().stream().map(Artifact::key).toList());
+        assertMetadataCoordinates(request, 
"org/apache/maven/its/install/arj/test", "1.0");
+    }
+
+    /** Converted from {@code src/it/snapshot-jar}: a snapshot JAR installs 
its POM and JAR at the version path. */
+    @Test
+    @InjectMojo(goal = "install")
+    @MojoParameter(name = "installAtEnd", value = "false")
+    void snapshotJarInstallsPomAndJarWithVersionedMetadata(InstallMojo mojo) 
throws Exception {
+        assertNotNull(mojo);
+        ProjectStub project = (ProjectStub) getVariableValueFromObject(mojo, 
"project");
+        project.setGroupId("org.apache.maven.its.install.sj");
+        project.setArtifactId("test");
+        project.setVersion("1.0-SNAPSHOT");
+        ProducedArtifactStub main =
+                new ProducedArtifactStub("org.apache.maven.its.install.sj", 
"test", "", "1.0-SNAPSHOT", "jar");
+        project.setMainArtifact(main);
+        artifactManager.setPath(
+                main, Paths.get(getBasedir(), 
"target/test-classes/unit/maven-install-test-1.0-SNAPSHOT.jar"));
+
+        ArtifactInstallerRequest request = execute(mojo);
+
+        assertNotNull(request);
+        assertEquals(
+                Arrays.asList(
+                        
"org.apache.maven.its.install.sj:test:pom:1.0-SNAPSHOT",
+                        
"org.apache.maven.its.install.sj:test:jar:1.0-SNAPSHOT"),
+                request.getArtifacts().stream().map(Artifact::key).toList());
+        assertMetadataCoordinates(request, 
"org/apache/maven/its/install/sj/test", "1.0-SNAPSHOT");
+    }
+
+    /**
+     * Asserts the group-level and version-level {@code 
maven-metadata-local.xml} locations that the IT checked as
+     * files. The harness mocks the real {@link ArtifactInstaller}, which 
writes that metadata, so the paths are
+     * derived from the installed POM's coordinates handed to the session (see 
{@link InstallTestHelper}).
+     */
+    private void assertMetadataCoordinates(ArtifactInstallerRequest request, 
String groupArtifactPath, String version) {
+        Artifact pom = request.getArtifacts().stream()
+                .filter(a -> "pom".equals(a.getExtension()))
+                .findFirst()
+                .orElseThrow();
+        Path pomPath = request.getSession().getPathForLocalArtifact(pom);
+        assertEquals(
+                groupArtifactPath + "/maven-metadata-local.xml",
+                
InstallTestHelper.repoRelativePath(InstallTestHelper.groupLevelMetadataPath(pomPath),
 LOCAL_REPO));
+        assertEquals(
+                groupArtifactPath + "/" + version + 
"/maven-metadata-local.xml",
+                
InstallTestHelper.repoRelativePath(InstallTestHelper.versionLevelMetadataPath(pomPath),
 LOCAL_REPO));
+    }
+
     private void attachClassifiedJar(Project project, String classifier) {
         projectManager.attachArtifact(
                 project,
diff --git 
a/src/test/java/org/apache/maven/plugins/install/InstallTestHelper.java 
b/src/test/java/org/apache/maven/plugins/install/InstallTestHelper.java
index 55cfa57..b50db15 100644
--- a/src/test/java/org/apache/maven/plugins/install/InstallTestHelper.java
+++ b/src/test/java/org/apache/maven/plugins/install/InstallTestHelper.java
@@ -18,6 +18,7 @@
  */
 package org.apache.maven.plugins.install;
 
+import java.io.File;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.util.stream.Stream;
@@ -38,4 +39,45 @@ class InstallTestHelper {
                     "no .md5/.sha1 checksum files should be created");
         }
     }
+
+    /**
+     * Location of the version-level {@code maven-metadata-local.xml}, 
relative to the local repository root.
+     *
+     * <p>The Maven 4 {@code @MojoTest} harness mocks the real {@code 
ArtifactInstaller}, and that installer is
+     * the component which actually writes {@code maven-metadata-local.xml}. 
No metadata file is therefore
+     * created in the mock local repository during these tests. The metadata 
location is derived solely from
+     * the installed artifact's group/artifact/version, so the ITs' "metadata 
exists at path X" assertions are
+     * expressed here in terms of the coordinate-derived path the install 
request hands to the session.
+     *
+     * @param localArtifactPath path returned by {@code 
Session#getPathForLocalArtifact} for the installed POM
+     * @return the directory of the artifact version plus the metadata file 
name
+     */
+    static Path versionLevelMetadataPath(Path localArtifactPath) {
+        return 
localArtifactPath.getParent().resolve("maven-metadata-local.xml");
+    }
+
+    /**
+     * Location of the group-level {@code maven-metadata-local.xml}. See
+     * {@link #versionLevelMetadataPath(Path)} for why this is derived from 
coordinates rather than the file system.
+     *
+     * @param localArtifactPath path returned by {@code 
Session#getPathForLocalArtifact} for the installed POM
+     * @return the group/artifact directory plus the metadata file name
+     */
+    static Path groupLevelMetadataPath(Path localArtifactPath) {
+        return 
localArtifactPath.getParent().getParent().resolve("maven-metadata-local.xml");
+    }
+
+    /**
+     * Turns a (possibly Jimfs-provided) local-repository path into a stable, 
slash-separated relative path so it
+     * can be compared with the literal paths asserted by the converted 
integration tests.
+     */
+    static String repoRelativePath(Path path, String localRepoPrefix) {
+        String value = path.toString().replace(File.separator, "/");
+        String prefix = localRepoPrefix.replace(File.separator, "/");
+        while (prefix.endsWith("/")) {
+            prefix = prefix.substring(0, prefix.length() - 1);
+        }
+        prefix += "/";
+        return value.startsWith(prefix) ? value.substring(prefix.length()) : 
value;
+    }
 }

Reply via email to