Skip to content

Commit 3421e31

Browse files
committed
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.
1 parent 88e1be3 commit 3421e31

File tree

2 files changed

+54
-17
lines changed

2 files changed

+54
-17
lines changed
Lines changed: 54 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,54 @@
1-
<plugin>
2-
<groupId>org.apache.maven.plugins</groupId>
3-
<artifactId>maven-war-plugin</artifactId>
4-
<version>2.4</version>
5-
<configuration>
6-
<overlays>
7-
<overlay>
8-
<groupId>${project.war.overlay.groupId}</groupId>
9-
<artifactId>${project.war.overlay.artifactId}-ui</artifactId>
10-
<type>zip</type>
11-
</overlay>
12-
</overlays>
13-
</configuration>
14-
</plugin>
1+
<profiles>
2+
<profile>
3+
<id>release</id>
4+
<build>
5+
<plugins>
6+
<plugin>
7+
<groupId>org.apache.maven.plugins</groupId>
8+
<artifactId>maven-war-plugin</artifactId>
9+
<version>2.6</version>
10+
<configuration>
11+
<warName>${project.war.overlay.artifactId}-full</warName>
12+
<overlays>
13+
<overlay>
14+
<groupId>${project.war.overlay.groupId}</groupId>
15+
<artifactId>${project.war.overlay.artifactId}-ui</artifactId>
16+
<type>zip</type>
17+
</overlay>
18+
</overlays>
19+
</configuration>
20+
</plugin>
21+
<plugin>
22+
<groupId>org.codehaus.mojo</groupId>
23+
<artifactId>build-helper-maven-plugin</artifactId>
24+
<version>1.9.1</version>
25+
<executions>
26+
<execution>
27+
<id>attach-full-war</id>
28+
<goals>
29+
<goal>attach-artifact</goal>
30+
</goals>
31+
<configuration>
32+
<artifacts>
33+
<artifact>
34+
<file>${project.build.directory}${file.separator}${project.war.overlay.artifactId}-full.war</file>
35+
<type>war</type>
36+
<classifier>full</classifier>
37+
</artifact>
38+
</artifacts>
39+
</configuration>
40+
</execution>
41+
</executions>
42+
</plugin>
43+
</plugins>
44+
</build>
45+
<dependencies>
46+
<dependency>
47+
<groupId>${project.war.overlay.groupId}</groupId>
48+
<artifactId>${project.war.overlay.artifactId}-ui</artifactId>
49+
<version>${project.version}</version>
50+
<type>zip</type>
51+
</dependency>
52+
</dependencies>
53+
</profile>
54+
</profiles>

restx-core-shell/src/main/resources/templates/srv/main/_md.restx.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
},
1818
"dependencies": {
1919
"compile": [
20-
{{#useSrvuiLayout}}
21-
"{{groupId}}:{{artifactId}}-ui:{{version}}:zip",
22-
{{/useSrvuiLayout}}
2320
"io.restx:restx-core:${restx.version}",
2421
"io.restx:restx-security-basic:${restx.version}",
2522
"io.restx:restx-core-annotation-processor:${restx.version}",

0 commit comments

Comments
 (0)