mirror of https://github.com/apache/maven.git
MNG-477: Trying to unpack none jar file
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@225270 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c692568a42
commit
524a4602c4
|
@ -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>vincent.siveton@gmail.com</email>
|
||||
<roles>
|
||||
<role>Java Developer</role>
|
||||
</roles>
|
||||
<timezone>-5</timezone>
|
||||
</developer>
|
||||
</developers>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
|
|
|
@ -58,6 +58,7 @@ import java.util.regex.Pattern;
|
|||
* Assemble an application bundle or distribution.
|
||||
*
|
||||
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
|
||||
* @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
|
||||
* @version $Id$
|
||||
* @goal assembly
|
||||
* @requiresDependencyResolution test
|
||||
|
@ -292,6 +293,12 @@ public class AssemblyMojo
|
|||
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(); )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue