Author: vsiveton
Date: Tue Jul 26 03:44:06 2005
New Revision: 225270

URL: http://svn.apache.org/viewcvs?rev=225270&view=rev
Log:
MNG-477: Trying to unpack none jar file

Modified:
    maven/components/trunk/maven-plugins/maven-assembly-plugin/pom.xml
    
maven/components/trunk/maven-plugins/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AssemblyMojo.java

Modified: maven/components/trunk/maven-plugins/maven-assembly-plugin/pom.xml
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-assembly-plugin/pom.xml?rev=225270&r1=225269&r2=225270&view=diff
==============================================================================
--- maven/components/trunk/maven-plugins/maven-assembly-plugin/pom.xml 
(original)
+++ maven/components/trunk/maven-plugins/maven-assembly-plugin/pom.xml Tue Jul 
26 03:44:06 2005
@@ -1,3 +1,23 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+/*
+ * Copyright 2001-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ -->
+
 <project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
   <parent>
@@ -22,6 +42,17 @@
       <version>1.0-alpha-1</version>
     </dependency>
   </dependencies>
+  <developers>
+    <developer>
+      <id>vsiveton</id>
+      <name>Vincent Siveton</name>
+      <email>[EMAIL PROTECTED]</email>
+      <roles>
+        <role>Java Developer</role>
+      </roles>
+      <timezone>-5</timezone>
+    </developer>
+  </developers>
   <build>
     <plugins>
       <plugin>

Modified: 
maven/components/trunk/maven-plugins/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AssemblyMojo.java
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AssemblyMojo.java?rev=225270&r1=225269&r2=225270&view=diff
==============================================================================
--- 
maven/components/trunk/maven-plugins/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AssemblyMojo.java
 (original)
+++ 
maven/components/trunk/maven-plugins/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AssemblyMojo.java
 Tue Jul 26 03:44:06 2005
@@ -58,6 +58,7 @@
  * Assemble an application bundle or distribution.
  *
  * @author <a href="mailto:[EMAIL PROTECTED]">Brett Porter</a>
+ * @author <a href="mailto:[EMAIL PROTECTED]">Vincent Siveton</a>
  * @version $Id$
  * @goal assembly
  * @requiresDependencyResolution test
@@ -292,6 +293,12 @@
     private void unpackJar( File file, File tempLocation )
         throws IOException
     {
+        if ( !file.getAbsolutePath().toLowerCase().trim().endsWith( "jar" ) )
+        {
+            getLog().warn( "Trying to unpack a none jar file " + 
file.getAbsolutePath() + " - IGNORING" );
+            return;
+        }
+
         JarFile jar = new JarFile( file );
         for ( Enumeration e = jar.entries(); e.hasMoreElements(); )
         {



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to