[MNG-1071] lookup archiver instead of calling contructor so output will be use with the correct logger.

I forgot to modify these files

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@293450 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Emmanuel Venisse 2005-10-03 21:12:31 +00:00
parent 1bd22dc1b1
commit ef0763c291
8 changed files with 43 additions and 6 deletions

View File

@ -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>
<dependency>
<groupId>plexus</groupId>

View File

@ -19,6 +19,7 @@ package org.apache.maven.plugin.ear;
import org.apache.maven.archiver.MavenArchiveConfiguration;
import org.apache.maven.archiver.MavenArchiver;
import org.apache.maven.plugin.MojoExecutionException;
import org.codehaus.plexus.archiver.jar.JarArchiver;
import org.codehaus.plexus.util.FileUtils;
import java.io.File;
@ -85,6 +86,14 @@ public class EarMojo
*/
private File resourcesDir;
/**
* The Jar archiver.
*
* @parameter expression="${component.org.codehaus.plexus.archiver.Archiver#jar}"
* @required
*/
private JarArchiver jarArchiver;
/**
* The maven archiver to use.
*
@ -173,6 +182,7 @@ public class EarMojo
{
File earFile = new File( outputDirectory, finalName + ".ear" );
MavenArchiver archiver = new MavenArchiver();
archiver.setArchiver( jarArchiver );
archiver.setOutputFile( earFile );
// Include custom manifest if necessary

View File

@ -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>

View File

@ -22,6 +22,7 @@ import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.MavenProjectHelper;
import org.codehaus.plexus.archiver.jar.JarArchiver;
import java.io.File;
@ -87,6 +88,14 @@ public class EjbMojo
*/
private MavenProject project;
/**
* The Jar archiver.
*
* @parameter expression="${component.org.codehaus.plexus.archiver.Archiver#jar}"
* @required
*/
private JarArchiver jarArchiver;
/**
* The maven project's helper.
*
@ -117,6 +126,8 @@ public class EjbMojo
MavenArchiver archiver = new MavenArchiver();
archiver.setArchiver( jarArchiver );
archiver.setOutputFile( jarFile );
String ejbJarXmlFile = "META-INF/ejb-jar.xml";

View File

@ -13,7 +13,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>
<dependency>
<groupId>org.apache.maven</groupId>

View File

@ -22,6 +22,7 @@ import org.apache.maven.archiver.MavenArchiver;
import org.apache.maven.archiver.MavenArchiveConfiguration;
import org.apache.maven.project.MavenProject;
import org.apache.maven.artifact.Artifact;
import org.codehaus.plexus.archiver.jar.JarArchiver;
import org.codehaus.plexus.util.FileUtils;
import java.io.File;
@ -110,6 +111,14 @@ public class RarMojo
*/
private MavenProject project;
/**
* The Jar archiver.
*
* @parameter expression="${component.org.codehaus.plexus.archiver.Archiver#jar}"
* @required
*/
private JarArchiver jarArchiver;
/**
* The maven archiver to use.
*
@ -206,6 +215,7 @@ public class RarMojo
{
File rarFile = new File( outputDirectory, finalName + ".rar" );
MavenArchiver archiver = new MavenArchiver();
archiver.setArchiver( jarArchiver );
archiver.setOutputFile( rarFile );
// Include custom manifest if necessary

View File

@ -13,7 +13,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>
<dependency>
<groupId>org.apache.maven</groupId>

View File

@ -130,6 +130,14 @@ public class WarMojo
*/
private String warName;
/**
* The Jar archiver.
*
* @parameter expression="${component.org.codehaus.plexus.archiver.Archiver#war}"
* @required
*/
private WarArchiver warArchiver;
/**
* The maven archive configuration to use.
*
@ -323,8 +331,6 @@ public class WarMojo
MavenArchiver archiver = new MavenArchiver();
WarArchiver warArchiver = new WarArchiver();
archiver.setArchiver( warArchiver );
archiver.setOutputFile( warFile );