Author: olamy Date: Mon Oct 17 09:16:38 2011 New Revision: 1185053 URL: http://svn.apache.org/viewvc?rev=1185053&view=rev Log: [MTOMCAT-102] Add a mojo to build a standalone jar to run a web application: make attach artifact classifier and type configurable
Modified: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7RunnerCli.java Modified: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java?rev=1185053&r1=1185052&r2=1185053&view=diff ============================================================================== --- tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java (original) +++ tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java Mon Oct 17 09:16:38 2011 @@ -168,13 +168,30 @@ public abstract class AbstractExecWarMoj private MavenProjectHelper projectHelper; /** - * The webapp context path to use for the web application being run. - * The name to store webapp in exec jar. Do not use / + * Attach or not the generated artifact to the build (use true if you want to install or deploy it) * * @parameter expression="${maven.tomcat.exec.war.attachArtifact}" default-value="true" * @required */ private boolean attachArtifact; + + + /** + * the classifier to use for the attached/generated artifact + * + * @parameter expression="${maven.tomcat.exec.war.attachArtifactClassifier}" default-value="exec-war" + * @required + */ + private String attachArtifactClassifier; + + + /** + * the type to use for the attached/generated artifact + * + * @parameter expression="${maven.tomcat.exec.war.attachArtifactType}" default-value="jar" + * @required + */ + private String attachArtifactClassifierType; public void execute() throws MojoExecutionException, MojoFailureException @@ -334,9 +351,8 @@ public abstract class AbstractExecWarMoj if ( attachArtifact ) { - // MavenProject project, File artifactFile, String artifactClassifier - // classifier configurable ? - projectHelper.attachArtifact( project, execWarJar, "exec-war" ); + //MavenProject project, String artifactType, String artifactClassifier, File artifactFile + projectHelper.attachArtifact( project, attachArtifactClassifierType, attachArtifactClassifier, execWarJar ); } } catch ( ManifestException e ) { Modified: tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7RunnerCli.java URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7RunnerCli.java?rev=1185053&r1=1185052&r2=1185053&view=diff ============================================================================== --- tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7RunnerCli.java (original) +++ tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7RunnerCli.java Mon Oct 17 09:16:38 2011 @@ -72,7 +72,7 @@ public class Tomcat7RunnerCli static Option debug = OptionBuilder .withLongOpt( "debug" ) .withDescription("debug") - .create("x"); + .create("X"); static Options options = new Options(); --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org