maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anders Hammar <and...@hammar.net>
Subject Re: creating a small non-primary war
Date Wed, 12 Jan 2011 07:08:55 GMT
Why isn't the war the primary artifact?
I would suggest you structure this as two modules; the first creates the war
that includes the applet and the other one is the larger war.

/Anders

On Tue, Jan 11, 2011 at 21:22, Mike Calmus <mike@calmus.org> wrote:

>  I am trying to create a non-primary war that includes an applet jar and
> its
> dependencies. This war is then merged into a larger war.
>
> When I try to do this, though I get an error from the Maven Install plugin
> indicating no primary artificat was created. The error returend is somewhat
> different depending upon the plugin versions involved.
>
> Here's what I have. Is there some better way to do this, or is this a bug
> in
> one of the plugins or both? Thanks.
>
> <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>my.test.group</groupId>
>  <artifactId>mytest-applet-war</artifactId>
>  <packaging>war</packaging>
>  <version>1.0</version>
>  <name>My Test Applet War</name>
>  <properties>
>
>
> <applet.directory>${project.build.directory}/${project.build.finalName}/applet</applet.directory>
>  </properties>
>  <dependencies>
>    <dependency>
>      <groupId>my.test.group</groupId>
>      <artifactId>mytest-applet</artifactId>
>      <version>1.0</version>
>      <type>jar</type>
>      <scope>provided</scope>
>    </dependency>
>  </dependencies>
>  <build>
>    <plugins>
>      <plugin>
>        <groupId>org.apache.maven.plugins</groupId>
>        <artifactId>maven-war-plugin</artifactId>
>        <configuration>
>          <primaryArtifact>false</primaryArtifact>
>          <failOnMissingWebXml>false</failOnMissingWebXml>
>        </configuration>
>      </plugin>
>      <plugin>
>        <groupId>org.apache.maven.plugins</groupId>
>        <artifactId>maven-dependency-plugin</artifactId>
>        <executions>
>          <execution>
>            <phase>process-resources</phase>
>            <goals>
>              <goal>copy-dependencies</goal>
>            </goals>
>            <configuration>
>              <outputDirectory>${applet.directory}</outputDirectory>
>              <stripVersion>true</stripVersion>
>            </configuration>
>          </execution>
>        </executions>
>      </plugin>
>    </plugins>
>  </build>
> </project>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message