mirror of https://github.com/apache/maven.git
[MNG-1071] lookup JarArchiver instead of calling contructor so output will be use with the correct logger.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@293285 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cce67f6caa
commit
bcbdec74fc
|
@ -42,7 +42,7 @@ import java.util.Set;
|
|||
*/
|
||||
public class MavenArchiver
|
||||
{
|
||||
private JarArchiver archiver = new JarArchiver();
|
||||
private JarArchiver archiver;
|
||||
|
||||
private File archiveFile;
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-archiver</artifactId>
|
||||
<version>2.0-beta-1</version>
|
||||
<version>2.0-beta-3-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -21,6 +21,7 @@ import org.apache.maven.archiver.MavenArchiver;
|
|||
import org.apache.maven.plugin.AbstractMojo;
|
||||
import org.apache.maven.plugin.MojoExecutionException;
|
||||
import org.apache.maven.project.MavenProject;
|
||||
import org.codehaus.plexus.archiver.jar.JarArchiver;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
|
@ -57,6 +58,14 @@ public abstract class AbstractJarMojo
|
|||
*/
|
||||
private String finalName;
|
||||
|
||||
/**
|
||||
* The Jar archiver.
|
||||
*
|
||||
* @parameter expression="${component.org.codehaus.plexus.archiver.Archiver#jar}"
|
||||
* @required
|
||||
*/
|
||||
private JarArchiver jarArchiver;
|
||||
|
||||
/**
|
||||
* The maven project.
|
||||
*
|
||||
|
@ -114,6 +123,8 @@ public abstract class AbstractJarMojo
|
|||
|
||||
MavenArchiver archiver = new MavenArchiver();
|
||||
|
||||
archiver.setArchiver( jarArchiver );
|
||||
|
||||
archiver.setOutputFile( jarFile );
|
||||
|
||||
try
|
||||
|
|
Loading…
Reference in New Issue