You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jean-Claude Vogel <vo...@gmail.com> on 2010/04/21 08:38:12 UTC
Re: Integration of an applet jar in a war with Eclipse (Maven
integration + WTP plugins)
Hello,
No idea of solution ? It seems that with maven 1 it was possible de add
properties to a dependency of the war to indicate the final location in the
war, but it's no more possible.
2010/4/17 Jean-Claude Vogel <vo...@gmail.com>
> Hello,
>
> I would like to put an applet Jar built with maven in my war. So in my war
> pom, I've used the goal copy from maven-dependency-plugin like that :
> <?xml version="1.0" encoding="UTF-8"?>
> <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>
> <parent>
> <groupId>jkt.centralisateur</groupId>
> <artifactId>centralisateur</artifactId>
> <version>1.0-SNAPSHOT</version>
> </parent>
>
> <artifactId>centralisateur-war</artifactId>
> <name>centralisateur-war</name>
> <packaging>war</packaging>
> <properties>
> <centralisateur-war-name>centralisateur-war</centralisateur-war-name>
> </properties>
> <dependencies>
> <dependency>
> <groupId>jkt.centralisateur</groupId>
> <artifactId>centralisateur-applet</artifactId>
> </dependency>
> <dependency>
> <groupId>jkt.centralisateur</groupId>
> <artifactId>centralisateur-common</artifactId>
> </dependency>
> <dependency>
> <groupId>jkt.centralisateur</groupId>
> <artifactId>centralisateur-pojo</artifactId>
>
> </dependency>
> <dependency>
> <groupId>jkt.centralisateur</groupId>
> <artifactId>centralisateur-interlocutor
> </artifactId>
> </dependency>
> <dependency>
> <groupId>jkt.centralisateur</groupId>
> <artifactId>centralisateur-storage</artifactId>
> </dependency>
> <dependency>
> <groupId>jkt.centralisateur</groupId>
> <artifactId>centralisateur-presentation
> </artifactId>
> </dependency>
> <dependency>
> <groupId>javax.servlet</groupId>
> <artifactId>jstl</artifactId>
> </dependency>
> <dependency>
> <groupId>org.springframework</groupId>
> <artifactId>spring-webmvc</artifactId>
> </dependency>
> <dependency>
> <groupId>commons-lang</groupId>
> <artifactId>commons-lang</artifactId>
> </dependency>
> </dependencies>
> <build>
> <finalName>${centralisateur-war-name}</finalName>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-dependency-plugin</artifactId>
> <version>2.1</version>
> <executions>
> <execution>
> <id>copy</id>
> <phase>compile</phase>
> <goals>
> <goal>copy</goal>
> </goals>
> <configuration>
> <artifactItems>
> <artifactItem>
> <groupId>jkt.centralisateur</groupId>
>
> <artifactId>centralisateur-applet</artifactId>
> <overWrite>true</overWrite>
>
> <destFileName>centralisateur-applet.jar</destFileName>
> </artifactItem>
> </artifactItems>
>
> <outputDirectory>${project.build.directory}/${centralisateur-war-name}/applets</outputDirectory>
> </configuration>
> </execution>
> </executions>
> </plugin>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-war-plugin</artifactId>
> <version>2.1-beta-1</version>
> <configuration>
> <warName>${centralisateur-war-name}</warName>
> </configuration>
> </plugin>
> </plugins>
> </build>
> </project>
> The maven build works fine and I get the file centralisateur-applet.jar in
> my war at the location {war-file}/applets/centralisateur-applet.jar like I
> want. But I would like also to launch the webapp in Eclipse with the Maven
> integration and WTP plugin. When I launch it in Eclipse the is no
> centralisateur-applet.jar file deployed. Do somebody knows the solution to
> be compliant with the Eclipse Tomcat launch and also the with the Maven
> build ?
>
> Thank for any help,
> JC
>
Re: Integration of an applet jar in a war with Eclipse (Maven
integration + WTP plugins)
Posted by Barrie Treloar <ba...@gmail.com>.
On Wed, Apr 21, 2010 at 4:08 PM, Jean-Claude Vogel
<vo...@gmail.com> wrote:
> Hello,
>
> No idea of solution ? It seems that with maven 1 it was possible de add
> properties to a dependency of the war to indicate the final location in the
> war, but it's no more possible.
I can't offer any definite advice - I dont build applets or wars.
However, I suspect that the location where Maven puts things is not
where Eclipse expects to find things.
So I would manually configure Eclipse to get everything working.
Once you have worked out what needs to be done you can then configure
maven-eclipse-plugin to setup your environment in the same way.
Alternatively you could try m2eclipse.
I dont use m2eclipse, so I have no idea whether your use case is supported.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org