Discussion:
Is <classifier> with maven-war-plugin?
s***@yahoo.co.uk
2006-05-09 07:05:27 UTC
Permalink
Hi,
The <classifier> feature appears not to be supported by the WAR plugin. Has
anyone got this working?

I always see an installed artifact of the form: [finalname]-[version].war
I'm expecting to see: [finalname]-[version][classifier].war

My pom.xml contains the following:
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<groupId>org.apache.maven.plugins</groupId>
<configuration>
<classifier>foobar</classifier>
</configuration>
</plugin>
</plugins>

If I run maven with "--debug" I see no reference to "foobar" in the output.

All help appreciated as use of classifier is essential to build for dev,
stage and live etc.
Regards,
Shaun.
Wayne Fay
2006-05-09 14:33:48 UTC
Permalink
Classifier goes in the top of your XML file, next to artifactId and
groupId, not down in the war plugin configuration. At least, that's
where I've put it when I've used it on some Jar files.

Give that a try.

Wayne
Post by s***@yahoo.co.uk
Hi,
The <classifier> feature appears not to be supported by the WAR plugin. Has
anyone got this working?
I always see an installed artifact of the form: [finalname]-[version].war
I'm expecting to see: [finalname]-[version][classifier].war
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<groupId>org.apache.maven.plugins</groupId>
<configuration>
<classifier>foobar</classifier>
</configuration>
</plugin>
</plugins>
If I run maven with "--debug" I see no reference to "foobar" in the output.
All help appreciated as use of classifier is essential to build for dev,
stage and live etc.
Regards,
Shaun.
Shaun Barriball
2006-05-12 14:23:50 UTC
Permalink
Hi all,
I've proven now that <classifier> works with Jars packaging but foes NOT
with WAR packaging:
I can see that when using the following config the WAR plugin is configured
with the warName and outputDirectory but NOT the classifier:

Is this just a bug in the WAR plugin then?

<build>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<classifier>fred</classifier>
<warName>The WAR</warName>
<outputDirectory>outputDir</outputDirectory>
</configuration>

</plugin>
</plugins>
</build>

[DEBUG] Configuring mojo
'org.apache.maven.plugins:maven-war-plugin:2.0-beta-2:war' -->
[DEBUG] (s) classesDirectory = c:\temp\my-webapp\target\classes
[DEBUG] (f) outputDirectory = outputDir
[DEBUG] (s) project = ***@d0fee35f
[DEBUG] (f) warName = The WAR
[DEBUG] (s) warSourceDirectory = c:\temp\my-webapp\src\main\webapp
[DEBUG] (s) webappDirectory =
c:\temp\my-webapp\target\my-webapp-1.0-SNAPSHOT

All help appreciated.
Regards,
Shaun.

-----Original Message-----
From: Wayne Fay [mailto:***@gmail.com]
Sent: 09 May 2006 15:34
To: Maven Users List
Subject: Re: Is <classifier> with maven-war-plugin?

Classifier goes in the top of your XML file, next to artifactId and groupId,
not down in the war plugin configuration. At least, that's where I've put it
when I've used it on some Jar files.

Give that a try.

Wayne
Post by s***@yahoo.co.uk
Hi,
The <classifier> feature appears not to be supported by the WAR
plugin. Has anyone got this working?
[finalname]-[version][classifier].war
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<groupId>org.apache.maven.plugins</groupId>
<configuration>
<classifier>foobar</classifier>
</configuration>
</plugin>
</plugins>
If I run maven with "--debug" I see no reference to "foobar" in the output.
All help appreciated as use of classifier is essential to build for
dev, stage and live etc.
Regards,
Shaun.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@maven.apache.org
For additional commands, e-mail: users-***@maven.apache.org



___________________________________________________________
Switch an email account to Yahoo! Mail, you could win FIFA World Cup tickets. http://uk.mail.yahoo.com
Shaun Barriball
2006-05-12 14:52:09 UTC
Permalink
Solved.
I checked out and built the latest maven-war-plugin and the issue is now
resolved.
Looks like a bug in version maven-war-plugin:2.0-beta-2.
Regards,
Shaun.

-----Original Message-----
From: Shaun Barriball [mailto:***@yahoo.co.uk]
Sent: 12 May 2006 15:24
To: 'Maven Users List'
Subject: RE: Is <classifier> with maven-war-plugin? Works with JAR but not
with WAR.

Hi all,
I've proven now that <classifier> works with Jars packaging but foes NOT
with WAR packaging:
I can see that when using the following config the WAR plugin is configured
with the warName and outputDirectory but NOT the classifier:

Is this just a bug in the WAR plugin then?

<build>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<classifier>fred</classifier>
<warName>The WAR</warName>
<outputDirectory>outputDir</outputDirectory>
</configuration>

</plugin>
</plugins>
</build>

[DEBUG] Configuring mojo
'org.apache.maven.plugins:maven-war-plugin:2.0-beta-2:war' -->
[DEBUG] (s) classesDirectory = c:\temp\my-webapp\target\classes
[DEBUG] (f) outputDirectory = outputDir
[DEBUG] (s) project = ***@d0fee35f
[DEBUG] (f) warName = The WAR
[DEBUG] (s) warSourceDirectory = c:\temp\my-webapp\src\main\webapp
[DEBUG] (s) webappDirectory =
c:\temp\my-webapp\target\my-webapp-1.0-SNAPSHOT

All help appreciated.
Regards,
Shaun.

-----Original Message-----
From: Wayne Fay [mailto:***@gmail.com]
Sent: 09 May 2006 15:34
To: Maven Users List
Subject: Re: Is <classifier> with maven-war-plugin?

Classifier goes in the top of your XML file, next to artifactId and groupId,
not down in the war plugin configuration. At least, that's where I've put it
when I've used it on some Jar files.

Give that a try.

Wayne
Post by s***@yahoo.co.uk
Hi,
The <classifier> feature appears not to be supported by the WAR
plugin. Has anyone got this working?
[finalname]-[version][classifier].war
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<groupId>org.apache.maven.plugins</groupId>
<configuration>
<classifier>foobar</classifier>
</configuration>
</plugin>
</plugins>
If I run maven with "--debug" I see no reference to "foobar" in the output.
All help appreciated as use of classifier is essential to build for
dev, stage and live etc.
Regards,
Shaun.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@maven.apache.org
For additional commands, e-mail: users-***@maven.apache.org



___________________________________________________________
Switch an email account to Yahoo! Mail, you could win FIFA World Cup
tickets. http://uk.mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@maven.apache.org
For additional commands, e-mail: users-***@maven.apache.org



___________________________________________________________
Switch an email account to Yahoo! Mail, you could win FIFA World Cup tickets. http://uk.mail.yahoo.com
Loading...