[MDEPLOY-113] No longer able to deploy an artifact w/o a pom
git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk@892646 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/it/3rd-party-jar-without-pom/invoker.properties b/src/it/3rd-party-jar-without-pom/invoker.properties
new file mode 100644
index 0000000..2089b7f
--- /dev/null
+++ b/src/it/3rd-party-jar-without-pom/invoker.properties
@@ -0,0 +1 @@
+invoker.goals = org.apache.maven.plugins:maven-deploy-plugin:${project.version}:deploy-file
diff --git a/src/it/3rd-party-jar-without-pom/pom.xml b/src/it/3rd-party-jar-without-pom/pom.xml
new file mode 100644
index 0000000..ad91bea
--- /dev/null
+++ b/src/it/3rd-party-jar-without-pom/pom.xml
@@ -0,0 +1,44 @@
+<?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.deploy.tpjwop</groupId>
+ <artifactId>test</artifactId>
+ <version>1.0</version>
+ <packaging>jar</packaging>
+
+ <description>
+ Tests the manual deployment of a simple release JAR without a corresponding POM (cf. MDEPLOY-113).
+ </description>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <version>@project.version@</version>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
diff --git a/src/it/3rd-party-jar-without-pom/setup.bsh b/src/it/3rd-party-jar-without-pom/setup.bsh
new file mode 100644
index 0000000..18748d9
--- /dev/null
+++ b/src/it/3rd-party-jar-without-pom/setup.bsh
@@ -0,0 +1,14 @@
+import java.io.*;
+import java.util.*;
+
+import org.codehaus.plexus.util.*;
+
+File file = new File( localRepositoryPath, "org/apache/maven/its/deploy/tpjwop" );
+System.out.println( "Deleting " + file );
+FileUtils.deleteDirectory( file );
+
+file = new File( basedir, "target/repo" );
+System.out.println( "Deleting " + file );
+FileUtils.deleteDirectory( file );
+
+return true;
diff --git a/src/it/3rd-party-jar-without-pom/test-0.1.jar b/src/it/3rd-party-jar-without-pom/test-0.1.jar
new file mode 100644
index 0000000..226277c
--- /dev/null
+++ b/src/it/3rd-party-jar-without-pom/test-0.1.jar
Binary files differ
diff --git a/src/it/3rd-party-jar-without-pom/test.properties b/src/it/3rd-party-jar-without-pom/test.properties
new file mode 100644
index 0000000..9d260e5
--- /dev/null
+++ b/src/it/3rd-party-jar-without-pom/test.properties
@@ -0,0 +1,8 @@
+file = test-0.1.jar
+url = file:///${basedir}/target/repo
+updateReleaseInfo = true
+groupId = org.apache.maven.its.deploy.tpjwop
+artifactId = test
+version = 1.0
+packaging = jar
+generatePom = false
diff --git a/src/it/3rd-party-jar-without-pom/verify.bsh b/src/it/3rd-party-jar-without-pom/verify.bsh
new file mode 100644
index 0000000..709b6f9
--- /dev/null
+++ b/src/it/3rd-party-jar-without-pom/verify.bsh
@@ -0,0 +1,35 @@
+import java.io.*;
+import java.util.*;
+
+String[] paths =
+{
+ "org/apache/maven/its/deploy/tpjwop/test/maven-metadata.xml",
+ "org/apache/maven/its/deploy/tpjwop/test/1.0/test-1.0.jar",
+};
+
+for ( String path : paths )
+{
+ File file = new File( new File( basedir, "target/repo" ), path );
+ System.out.println( "Checking for existence of " + file );
+ if ( !file.isFile() )
+ {
+ throw new FileNotFoundException( "Missing: " + file.getAbsolutePath() );
+ }
+}
+
+String[] missing =
+{
+ "org/apache/maven/its/deploy/tpjwop/test/1.0/test-1.0.pom",
+};
+
+for ( String path : missing )
+{
+ File file = new File( new File( basedir, "target/repo" ), path );
+ System.out.println( "Checking for absence of " + file );
+ if ( file.exists() )
+ {
+ throw new FileNotFoundException( "Existent: " + file.getAbsolutePath() );
+ }
+}
+
+return true;