You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Christian Schlaefcke <cs...@wms-network.de> on 2006/02/07 09:41:06 UTC
[M2] Ant-Script for simple Web-Project
Hi Folks,
I need to create a ant build script for a simple web project.
When I run "mvn install" it runs fine and creates a war file. When I run
"mvn ant:ant" and execute the resulting script it just produces a jar
file. How can I tell the ant plugin to create web specific build script?
Regards,
Christian
My pom.xml:
<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">
<modelVersion>4.0.0</modelVersion>
<groupId>de.tonline.app.forum</groupId>
<artifactId>WebProj</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>My Little Webproject</name>
<url>http://www.mysite.net</url>
<dependencies>
</dependencies>
<build>
<finalName>APForum</finalName>
<directory>target</directory>
<outputDirectory>WebRoot/WEB-INF/classes</outputDirectory>
<sourceDirectory>src</sourceDirectory>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<warSourceDirectory>WebRoot</warSourceDirectory>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [M2] Ant-Script for simple Web-Project
Posted by John Casey <jd...@yahoo.com>.
Unfortunately, there seems to be an open TODO in the code for that.
Off the top of my head, I can't imagine how you'd adjust it to work with
the packaging of the project...at least, not easily. If you'd like to
take a look at the source, it's here:
http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-ant-plugin
If you like, you can add an issue for this in jira at:
http://jira.codehaus.org/browse/MANT
Cheers,
John
Christian Schlaefcke wrote:
> Hi Folks,
>
> I need to create a ant build script for a simple web project.
>
> When I run "mvn install" it runs fine and creates a war file. When I run
> "mvn ant:ant" and execute the resulting script it just produces a jar
> file. How can I tell the ant plugin to create web specific build script?
>
> Regards,
>
> Christian
>
> My pom.xml:
> <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">
> <modelVersion>4.0.0</modelVersion>
> <groupId>de.tonline.app.forum</groupId>
> <artifactId>WebProj</artifactId>
> <packaging>war</packaging>
> <version>1.0-SNAPSHOT</version>
> <name>My Little Webproject</name>
> <url>http://www.mysite.net</url>
> <dependencies>
> </dependencies>
> <build>
> <finalName>APForum</finalName>
> <directory>target</directory>
> <outputDirectory>WebRoot/WEB-INF/classes</outputDirectory>
> <sourceDirectory>src</sourceDirectory>
> <pluginManagement>
> <plugins>
> <plugin>
> <artifactId>maven-war-plugin</artifactId>
> <configuration>
> <warSourceDirectory>WebRoot</warSourceDirectory>
> </configuration>
> </plugin>
> </plugins>
> </pluginManagement>
> </build>
> </project>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org