You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kh...@apache.org on 2017/04/03 21:01:44 UTC
svn commit: r1790050 - in /maven/plugins/trunk/maven-install-plugin/src:
it/install-file-minstall-121-bundle/
it/install-file-minstall-121-java-source/
it/install-file-minstall-121-maven-archetype/
it/install-file-minstall-121-war/ it/install-file-mins...
Author: khmarbaise
Date: Mon Apr 3 21:01:43 2017
New Revision: 1790050
URL: http://svn.apache.org/viewvc?rev=1790050&view=rev
Log:
[MINSTALL-121] The packaging property should not be used for the file extension
Added:
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121/
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-bundle/
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-bundle/invoker.properties
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-bundle/pom.xml
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-bundle/setup.bsh
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-bundle/test-0.1.jar (with props)
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-bundle/test-0.1.pom
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-bundle/test.properties
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-bundle/verify.bsh
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-java-source/
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-java-source/invoker.properties
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-java-source/pom.xml
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-java-source/setup.bsh
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-java-source/test-0.1.jar (with props)
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-java-source/test-0.1.pom
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-java-source/test.properties
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-java-source/verify.bsh
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-maven-archetype/
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-maven-archetype/invoker.properties
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-maven-archetype/pom.xml
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-maven-archetype/setup.bsh
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-maven-archetype/test-0.1.jar (with props)
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-maven-archetype/test-0.1.pom
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-maven-archetype/test.properties
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-maven-archetype/verify.bsh
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-war/
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-war/invoker.properties
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-war/pom.xml
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-war/setup.bsh
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-war/test-0.1.pom
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-war/test-0.1.war (with props)
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-war/test.properties
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-war/verify.bsh
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121/invoker.properties
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121/pom.xml
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121/setup.bsh
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121/test-0.1.jar (with props)
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121/test-0.1.pom
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121/test.properties
maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121/verify.bsh
Modified:
maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugins/install/InstallFileMojo.java
Added: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-bundle/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-bundle/invoker.properties?rev=1790050&view=auto
==============================================================================
--- maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-bundle/invoker.properties (added)
+++ maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-bundle/invoker.properties Mon Apr 3 21:01:43 2017
@@ -0,0 +1,18 @@
+# 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
Added: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-bundle/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-bundle/pom.xml?rev=1790050&view=auto
==============================================================================
--- maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-bundle/pom.xml (added)
+++ maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-bundle/pom.xml Mon Apr 3 21:01:43 2017
@@ -0,0 +1,46 @@
+<?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.121</groupId>
+ <artifactId>test-maven-bundle</artifactId>
+ <version>1.0</version>
+ <packaging>jar</packaging>
+
+ <description>
+ Test to install a file via install:install-file using
+ packaging and expected having a different file extension.
+ </description>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>@project.version@</version>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Added: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-bundle/setup.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-bundle/setup.bsh?rev=1790050&view=auto
==============================================================================
--- maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-bundle/setup.bsh (added)
+++ maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-bundle/setup.bsh Mon Apr 3 21:01:43 2017
@@ -0,0 +1,29 @@
+/*
+ * 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/121/maven-bundle" );
+System.out.println( "Deleting " + file );
+FileUtils.deleteDirectory( file );
+
+return true;
Added: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-bundle/test-0.1.jar
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-bundle/test-0.1.jar?rev=1790050&view=auto
==============================================================================
Binary file - no diff available.
Propchange: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-bundle/test-0.1.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-bundle/test-0.1.pom
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-bundle/test-0.1.pom?rev=1790050&view=auto
==============================================================================
--- maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-bundle/test-0.1.pom (added)
+++ maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-bundle/test-0.1.pom Mon Apr 3 21:01:43 2017
@@ -0,0 +1,35 @@
+<?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.121</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0</version>
+ </parent>
+
+ <!-- NOTE: Inherit everything from the parent -->
+ <artifactId>maven-bundle</artifactId>
+
+</project>
Added: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-bundle/test.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-bundle/test.properties?rev=1790050&view=auto
==============================================================================
--- maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-bundle/test.properties (added)
+++ maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-bundle/test.properties Mon Apr 3 21:01:43 2017
@@ -0,0 +1,20 @@
+# 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
+packaging = bundle
Added: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-bundle/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-bundle/verify.bsh?rev=1790050&view=auto
==============================================================================
--- maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-bundle/verify.bsh (added)
+++ maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-bundle/verify.bsh Mon Apr 3 21:01:43 2017
@@ -0,0 +1,52 @@
+/*
+ * 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/121/maven-bundle/maven-metadata-local.xml",
+ "org/apache/maven/its/install/121/maven-bundle/1.0/maven-bundle-1.0.pom",
+ "org/apache/maven/its/install/121/maven-bundle/1.0/maven-bundle-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() );
+}
+
+File file = new File( basedir, "test-0.1.jar" );
+if ( !file.isFile() )
+{
+ throw new FileNotFoundException( "Missing: " + file.getAbsolutePath() );
+}
+
+return true;
Added: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-java-source/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-java-source/invoker.properties?rev=1790050&view=auto
==============================================================================
--- maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-java-source/invoker.properties (added)
+++ maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-java-source/invoker.properties Mon Apr 3 21:01:43 2017
@@ -0,0 +1,18 @@
+# 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
Added: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-java-source/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-java-source/pom.xml?rev=1790050&view=auto
==============================================================================
--- maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-java-source/pom.xml (added)
+++ maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-java-source/pom.xml Mon Apr 3 21:01:43 2017
@@ -0,0 +1,46 @@
+<?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.121</groupId>
+ <artifactId>test-java-source</artifactId>
+ <version>1.0</version>
+ <packaging>jar</packaging>
+
+ <description>
+ Test to install a file via install:install-file using
+ packaging and expected having a different file extension.
+ </description>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>@project.version@</version>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Added: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-java-source/setup.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-java-source/setup.bsh?rev=1790050&view=auto
==============================================================================
--- maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-java-source/setup.bsh (added)
+++ maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-java-source/setup.bsh Mon Apr 3 21:01:43 2017
@@ -0,0 +1,29 @@
+/*
+ * 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/121/test-java-source" );
+System.out.println( "Deleting " + file );
+FileUtils.deleteDirectory( file );
+
+return true;
Added: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-java-source/test-0.1.jar
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-java-source/test-0.1.jar?rev=1790050&view=auto
==============================================================================
Binary file - no diff available.
Propchange: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-java-source/test-0.1.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-java-source/test-0.1.pom
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-java-source/test-0.1.pom?rev=1790050&view=auto
==============================================================================
--- maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-java-source/test-0.1.pom (added)
+++ maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-java-source/test-0.1.pom Mon Apr 3 21:01:43 2017
@@ -0,0 +1,35 @@
+<?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.121</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0</version>
+ </parent>
+
+ <!-- NOTE: Inherit everything from the parent -->
+ <artifactId>test-java-source</artifactId>
+
+</project>
Added: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-java-source/test.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-java-source/test.properties?rev=1790050&view=auto
==============================================================================
--- maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-java-source/test.properties (added)
+++ maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-java-source/test.properties Mon Apr 3 21:01:43 2017
@@ -0,0 +1,20 @@
+# 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
+packaging = java-source
Added: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-java-source/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-java-source/verify.bsh?rev=1790050&view=auto
==============================================================================
--- maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-java-source/verify.bsh (added)
+++ maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-java-source/verify.bsh Mon Apr 3 21:01:43 2017
@@ -0,0 +1,52 @@
+/*
+ * 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/121/test-java-source/maven-metadata-local.xml",
+ "org/apache/maven/its/install/121/test-java-source/1.0/test-java-source-1.0.pom",
+ "org/apache/maven/its/install/121/test-java-source/1.0/test-java-source-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() );
+ }
+}
+
+File file = new File( basedir, "test-0.1.pom" );
+if ( !file.isFile() )
+{
+ throw new FileNotFoundException( "Missing: " + file.getAbsolutePath() );
+}
+
+File file = new File( basedir, "test-0.1.jar" );
+if ( !file.isFile() )
+{
+ throw new FileNotFoundException( "Missing: " + file.getAbsolutePath() );
+}
+
+return true;
Added: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-maven-archetype/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-maven-archetype/invoker.properties?rev=1790050&view=auto
==============================================================================
--- maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-maven-archetype/invoker.properties (added)
+++ maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-maven-archetype/invoker.properties Mon Apr 3 21:01:43 2017
@@ -0,0 +1,18 @@
+# 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
Added: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-maven-archetype/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-maven-archetype/pom.xml?rev=1790050&view=auto
==============================================================================
--- maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-maven-archetype/pom.xml (added)
+++ maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-maven-archetype/pom.xml Mon Apr 3 21:01:43 2017
@@ -0,0 +1,46 @@
+<?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.121</groupId>
+ <artifactId>test-maven-archetype</artifactId>
+ <version>1.0</version>
+ <packaging>jar</packaging>
+
+ <description>
+ Test to install a file via install:install-file using
+ packaging and expected having a different file extension.
+ </description>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>@project.version@</version>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Added: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-maven-archetype/setup.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-maven-archetype/setup.bsh?rev=1790050&view=auto
==============================================================================
--- maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-maven-archetype/setup.bsh (added)
+++ maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-maven-archetype/setup.bsh Mon Apr 3 21:01:43 2017
@@ -0,0 +1,29 @@
+/*
+ * 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/121/maven-archetype" );
+System.out.println( "Deleting " + file );
+FileUtils.deleteDirectory( file );
+
+return true;
Added: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-maven-archetype/test-0.1.jar
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-maven-archetype/test-0.1.jar?rev=1790050&view=auto
==============================================================================
Binary file - no diff available.
Propchange: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-maven-archetype/test-0.1.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-maven-archetype/test-0.1.pom
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-maven-archetype/test-0.1.pom?rev=1790050&view=auto
==============================================================================
--- maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-maven-archetype/test-0.1.pom (added)
+++ maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-maven-archetype/test-0.1.pom Mon Apr 3 21:01:43 2017
@@ -0,0 +1,35 @@
+<?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.121</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0</version>
+ </parent>
+
+ <!-- NOTE: Inherit everything from the parent -->
+ <artifactId>maven-archetype</artifactId>
+
+</project>
Added: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-maven-archetype/test.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-maven-archetype/test.properties?rev=1790050&view=auto
==============================================================================
--- maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-maven-archetype/test.properties (added)
+++ maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-maven-archetype/test.properties Mon Apr 3 21:01:43 2017
@@ -0,0 +1,20 @@
+# 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
+packaging = maven-archetype
Added: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-maven-archetype/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-maven-archetype/verify.bsh?rev=1790050&view=auto
==============================================================================
--- maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-maven-archetype/verify.bsh (added)
+++ maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-maven-archetype/verify.bsh Mon Apr 3 21:01:43 2017
@@ -0,0 +1,52 @@
+/*
+ * 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/121/maven-archetype/maven-metadata-local.xml",
+ "org/apache/maven/its/install/121/maven-archetype/1.0/maven-archetype-1.0.pom",
+ "org/apache/maven/its/install/121/maven-archetype/1.0/maven-archetype-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() );
+}
+
+File file = new File( basedir, "test-0.1.jar" );
+if ( !file.isFile() )
+{
+ throw new FileNotFoundException( "Missing: " + file.getAbsolutePath() );
+}
+
+return true;
Added: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-war/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-war/invoker.properties?rev=1790050&view=auto
==============================================================================
--- maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-war/invoker.properties (added)
+++ maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-war/invoker.properties Mon Apr 3 21:01:43 2017
@@ -0,0 +1,18 @@
+# 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
Added: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-war/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-war/pom.xml?rev=1790050&view=auto
==============================================================================
--- maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-war/pom.xml (added)
+++ maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-war/pom.xml Mon Apr 3 21:01:43 2017
@@ -0,0 +1,46 @@
+<?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.121</groupId>
+ <artifactId>test-war</artifactId>
+ <version>1.0</version>
+ <packaging>jar</packaging>
+
+ <description>
+ Test to install a file via install:install-file using
+ packaging and expected having a different file extension.
+ </description>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>@project.version@</version>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Added: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-war/setup.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-war/setup.bsh?rev=1790050&view=auto
==============================================================================
--- maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-war/setup.bsh (added)
+++ maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-war/setup.bsh Mon Apr 3 21:01:43 2017
@@ -0,0 +1,29 @@
+/*
+ * 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/121/test-war" );
+System.out.println( "Deleting " + file );
+FileUtils.deleteDirectory( file );
+
+return true;
Added: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-war/test-0.1.pom
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-war/test-0.1.pom?rev=1790050&view=auto
==============================================================================
--- maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-war/test-0.1.pom (added)
+++ maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-war/test-0.1.pom Mon Apr 3 21:01:43 2017
@@ -0,0 +1,35 @@
+<?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.121</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0</version>
+ </parent>
+
+ <!-- NOTE: Inherit everything from the parent -->
+ <artifactId>test-war</artifactId>
+
+</project>
Added: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-war/test-0.1.war
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-war/test-0.1.war?rev=1790050&view=auto
==============================================================================
Binary file - no diff available.
Propchange: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-war/test-0.1.war
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-war/test.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-war/test.properties?rev=1790050&view=auto
==============================================================================
--- maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-war/test.properties (added)
+++ maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-war/test.properties Mon Apr 3 21:01:43 2017
@@ -0,0 +1,20 @@
+# 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.war
+pomFile = test-0.1.pom
+packaging = war
Added: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-war/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-war/verify.bsh?rev=1790050&view=auto
==============================================================================
--- maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-war/verify.bsh (added)
+++ maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121-war/verify.bsh Mon Apr 3 21:01:43 2017
@@ -0,0 +1,52 @@
+/*
+ * 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/121/test-war/maven-metadata-local.xml",
+ "org/apache/maven/its/install/121/test-war/1.0/test-war-1.0.pom",
+ "org/apache/maven/its/install/121/test-war/1.0/test-war-1.0.war",
+};
+
+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() );
+}
+
+File file = new File( basedir, "test-0.1.war" );
+if ( !file.isFile() )
+{
+ throw new FileNotFoundException( "Missing: " + file.getAbsolutePath() );
+}
+
+return true;
Added: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121/invoker.properties?rev=1790050&view=auto
==============================================================================
--- maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121/invoker.properties (added)
+++ maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121/invoker.properties Mon Apr 3 21:01:43 2017
@@ -0,0 +1,18 @@
+# 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
Added: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121/pom.xml?rev=1790050&view=auto
==============================================================================
--- maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121/pom.xml (added)
+++ maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121/pom.xml Mon Apr 3 21:01:43 2017
@@ -0,0 +1,46 @@
+<?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.121</groupId>
+ <artifactId>test</artifactId>
+ <version>1.0</version>
+ <packaging>jar</packaging>
+
+ <description>
+ Test to install a file via install:install-file using
+ packaging and expected having a different file extension.
+ </description>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>@project.version@</version>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Added: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121/setup.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121/setup.bsh?rev=1790050&view=auto
==============================================================================
--- maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121/setup.bsh (added)
+++ maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121/setup.bsh Mon Apr 3 21:01:43 2017
@@ -0,0 +1,29 @@
+/*
+ * 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/121" );
+System.out.println( "Deleting " + file );
+FileUtils.deleteDirectory( file );
+
+return true;
Added: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121/test-0.1.jar
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121/test-0.1.jar?rev=1790050&view=auto
==============================================================================
Binary file - no diff available.
Propchange: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121/test-0.1.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121/test-0.1.pom
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121/test-0.1.pom?rev=1790050&view=auto
==============================================================================
--- maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121/test-0.1.pom (added)
+++ maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121/test-0.1.pom Mon Apr 3 21:01:43 2017
@@ -0,0 +1,35 @@
+<?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.121</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0</version>
+ </parent>
+
+ <!-- NOTE: Inherit everything from the parent -->
+ <artifactId>test</artifactId>
+
+</project>
Added: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121/test.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121/test.properties?rev=1790050&view=auto
==============================================================================
--- maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121/test.properties (added)
+++ maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121/test.properties Mon Apr 3 21:01:43 2017
@@ -0,0 +1,20 @@
+# 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
+packaging = maven-plugin
Added: maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121/verify.bsh?rev=1790050&view=auto
==============================================================================
--- maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121/verify.bsh (added)
+++ maven/plugins/trunk/maven-install-plugin/src/it/install-file-minstall-121/verify.bsh Mon Apr 3 21:01:43 2017
@@ -0,0 +1,52 @@
+/*
+ * 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/121/test/maven-metadata-local.xml",
+ "org/apache/maven/its/install/121/test/1.0/test-1.0.pom",
+ "org/apache/maven/its/install/121/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() );
+}
+
+File file = new File( basedir, "test-0.1.jar" );
+if ( !file.isFile() )
+{
+ throw new FileNotFoundException( "Missing: " + file.getAbsolutePath() );
+}
+
+return true;
Modified: maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugins/install/InstallFileMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugins/install/InstallFileMojo.java?rev=1790050&r1=1790049&r2=1790050&view=diff
==============================================================================
--- maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugins/install/InstallFileMojo.java (original)
+++ maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugins/install/InstallFileMojo.java Mon Apr 3 21:01:43 2017
@@ -33,6 +33,7 @@ import java.util.jar.JarFile;
import java.util.regex.Pattern;
import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.handler.DefaultArtifactHandler;
import org.apache.maven.model.Model;
import org.apache.maven.model.Parent;
import org.apache.maven.model.building.ModelBuildingException;
@@ -58,6 +59,7 @@ import org.apache.maven.shared.utils.Os;
import org.apache.maven.shared.utils.ReaderFactory;
import org.apache.maven.shared.utils.WriterFactory;
import org.apache.maven.shared.utils.io.IOUtil;
+import org.codehaus.plexus.util.FileUtils;
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
/**
@@ -214,6 +216,14 @@ public class InstallFileMojo
}
MavenProject project = createMavenProject();
+
+ // We need to set a new ArtifactHandler otherwise
+ // the extension will be set to the packaging type
+ // which is sometimes wrong.
+ DefaultArtifactHandler ah = new DefaultArtifactHandler( packaging );
+ ah.setExtension( FileUtils.getExtension( file.getName() ) );
+
+ project.getArtifact().setArtifactHandler( ah );
Artifact artifact = project.getArtifact();
if ( file.equals( getLocalRepoFile( buildingRequest, artifact ) ) )