Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Reworked war overlay to depends on ui in a profile
See #187 (and also #180) War overlay plugin was depending on -ui.zip artifact, replaced by a profile to prevent build errors when, the ui artifact is nowhere to be found. If you want to build the "final" artifact, you will need to run the package command with the "release" profile enabled : mvn package -Prelease This will create a war file ending in -full.war containing your server logic as well as your ui. This generated file exists to prevent name clashing between artifact with and without ui logic.
- Loading branch information
1 parent
88e1be3
commit 3421e31
Showing
2 changed files
with
54 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,54 @@ | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-war-plugin</artifactId> | ||
<version>2.4</version> | ||
<configuration> | ||
<overlays> | ||
<overlay> | ||
<groupId>${project.war.overlay.groupId}</groupId> | ||
<artifactId>${project.war.overlay.artifactId}-ui</artifactId> | ||
<type>zip</type> | ||
</overlay> | ||
</overlays> | ||
</configuration> | ||
</plugin> | ||
<profiles> | ||
<profile> | ||
<id>release</id> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-war-plugin</artifactId> | ||
<version>2.6</version> | ||
<configuration> | ||
<warName>${project.war.overlay.artifactId}-full</warName> | ||
<overlays> | ||
<overlay> | ||
<groupId>${project.war.overlay.groupId}</groupId> | ||
<artifactId>${project.war.overlay.artifactId}-ui</artifactId> | ||
<type>zip</type> | ||
</overlay> | ||
</overlays> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>build-helper-maven-plugin</artifactId> | ||
<version>1.9.1</version> | ||
<executions> | ||
<execution> | ||
<id>attach-full-war</id> | ||
<goals> | ||
<goal>attach-artifact</goal> | ||
</goals> | ||
<configuration> | ||
<artifacts> | ||
<artifact> | ||
<file>${project.build.directory}${file.separator}${project.war.overlay.artifactId}-full.war</file> | ||
<type>war</type> | ||
<classifier>full</classifier> | ||
</artifact> | ||
</artifacts> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<dependencies> | ||
<dependency> | ||
<groupId>${project.war.overlay.groupId}</groupId> | ||
<artifactId>${project.war.overlay.artifactId}-ui</artifactId> | ||
<version>${project.version}</version> | ||
<type>zip</type> | ||
</dependency> | ||
</dependencies> | ||
</profile> | ||
</profiles> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters