Skip to content

Commit e53e83c

Browse files
committed
Use the git plugin to insert commit hash into the MANIFEST.MF of built archives
like the other Silverpeas platform projects. Change the artifactid of both the configuration and the war subprojects so that they satisfy the convention on the artifact ids of the Silverpeas platform projects.
1 parent f716695 commit e53e83c

File tree

3 files changed

+164
-15
lines changed

3 files changed

+164
-15
lines changed

mobile-configuration/pom.xml

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<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">
2+
<!--
3+
~ Copyright (C) 2000 - 2018 Silverpeas
4+
~ This program is free software: you can redistribute it and/or modify
5+
~ it under the terms of the GNU Affero General Public License as
6+
~ published by the Free Software Foundation, either version 3 of the
7+
~ License, or (at your option) any later version.
8+
~
9+
~ As a special exception to the terms and conditions of version 3.0 of
10+
~ the GPL, you may redistribute this Program in connection with Free/Libre
11+
~ Open Source Software ("FLOSS") applications as described in Silverpeas's
12+
~ FLOSS exception. You should have received a copy of the text describing
13+
~ the FLOSS exception, and it is also available here:
14+
~ "http://www.silverpeas.org/docs/core/legal/floss_exception.html"
15+
~
16+
~ This program is distributed in the hope that it will be useful,
17+
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
18+
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19+
~ GNU Affero General Public License for more details.
20+
~
21+
~ You should have received a copy of the GNU Affero General Public License
22+
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
23+
-->
24+
<project xmlns="http://maven.apache.org/POM/4.0.0"
25+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
26+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
327
<modelVersion>4.0.0</modelVersion>
428
<parent>
529
<groupId>org.silverpeas.components</groupId>
@@ -8,10 +32,9 @@
832
</parent>
933

1034
<groupId>org.silverpeas.components.mobile</groupId>
11-
<artifactId>mobile-configuration</artifactId>
35+
<artifactId>silverpeas-mobile-configuration</artifactId>
1236
<packaging>jar</packaging>
13-
<name>Mobile configuration</name>
14-
37+
<name>Silverpeas Mobile configuration</name>
1538

1639
<build>
1740
<resources>

mobile-war/pom.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
</parent>
3434

3535
<groupId>org.silverpeas.components.mobile</groupId>
36-
<artifactId>mobile-war</artifactId>
36+
<artifactId>silverpeas-mobile-war</artifactId>
3737
<packaging>war</packaging>
38-
<name>Silverpeas mobile</name>
38+
<name>Silverpeas Mobile Web Application</name>
3939

4040

4141
<properties>
@@ -59,7 +59,6 @@
5959
<plugin>
6060
<groupId>org.apache.maven.plugins</groupId>
6161
<artifactId>maven-war-plugin</artifactId>
62-
<version>2.2</version>
6362
<configuration>
6463
<warName>spmobile</warName>
6564
</configuration>

pom.xml

Lines changed: 135 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<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">
2+
<!--
3+
~ Copyright (C) 2000 - 2018 Silverpeas
4+
~ This program is free software: you can redistribute it and/or modify
5+
~ it under the terms of the GNU Affero General Public License as
6+
~ published by the Free Software Foundation, either version 3 of the
7+
~ License, or (at your option) any later version.
8+
~
9+
~ As a special exception to the terms and conditions of version 3.0 of
10+
~ the GPL, you may redistribute this Program in connection with Free/Libre
11+
~ Open Source Software ("FLOSS") applications as described in Silverpeas's
12+
~ FLOSS exception. You should have received a copy of the text describing
13+
~ the FLOSS exception, and it is also available here:
14+
~ "http://www.silverpeas.org/docs/core/legal/floss_exception.html"
15+
~
16+
~ This program is distributed in the hope that it will be useful,
17+
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
18+
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19+
~ GNU Affero General Public License for more details.
20+
~
21+
~ You should have received a copy of the GNU Affero General Public License
22+
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
23+
-->
24+
<project xmlns="http://maven.apache.org/POM/4.0.0"
25+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
26+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
327
<modelVersion>4.0.0</modelVersion>
428

529
<parent>
@@ -8,10 +32,16 @@
832
<version>1.1-build180618</version>
933
</parent>
1034

35+
<groupId>org.silverpeas.components</groupId>
36+
<artifactId>mobile</artifactId>
37+
<packaging>pom</packaging>
38+
<version>6.1-SNAPSHOT</version>
39+
<name>Silverpeas Mobile component</name>
40+
1141
<properties>
1242
<silverpeas.version>6.1-build180613</silverpeas.version>
13-
<maven.compiler.source>1.7</maven.compiler.source>
14-
<maven.compiler.target>1.7</maven.compiler.target>
43+
<maven.compiler.source>1.8</maven.compiler.source>
44+
<maven.compiler.target>1.8</maven.compiler.target>
1545
<next.release>6.1</next.release>
1646
</properties>
1747

@@ -30,11 +60,108 @@
3060
</repository>
3161
</repositories>
3262

33-
<groupId>org.silverpeas.components</groupId>
34-
<artifactId>mobile</artifactId>
35-
<packaging>pom</packaging>
36-
<version>6.1-SNAPSHOT</version>
37-
<name>Silverpeas Mobile component</name>
63+
<build>
64+
<plugins>
65+
<plugin>
66+
<groupId>org.apache.maven.plugins</groupId>
67+
<artifactId>maven-jar-plugin</artifactId>
68+
<configuration>
69+
<archive>
70+
<manifestEntries>
71+
<Build-Version>${project.version}</Build-Version>
72+
<Git-Commit>${git.commit.id.abbrev}</Git-Commit>
73+
<Build-Timestamp>${maven.build.timestamp}</Build-Timestamp>
74+
</manifestEntries>
75+
</archive>
76+
</configuration>
77+
</plugin>
78+
<plugin>
79+
<groupId>org.apache.maven.plugins</groupId>
80+
<artifactId>maven-war-plugin</artifactId>
81+
<configuration>
82+
<archive>
83+
<manifestEntries>
84+
<Build-Version>${project.version}</Build-Version>
85+
<Logging-Profile>silverpeas</Logging-Profile>
86+
<Git-Commit>${git.commit.id.abbrev}</Git-Commit>
87+
<Build-Timestamp>${maven.build.timestamp}</Build-Timestamp>
88+
</manifestEntries>
89+
</archive>
90+
</configuration>
91+
</plugin>
92+
<plugin>
93+
<groupId>pl.project13.maven</groupId>
94+
<artifactId>git-commit-id-plugin</artifactId>
95+
<executions>
96+
<execution>
97+
<phase>validate</phase>
98+
<goals>
99+
<goal>revision</goal>
100+
</goals>
101+
</execution>
102+
</executions>
103+
<configuration>
104+
<dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
105+
<dateFormat>yyyy-MM-dd'T'HH:mm:ssZ</dateFormat>
106+
<generateGitPropertiesFile>false</generateGitPropertiesFile>
107+
</configuration>
108+
</plugin>
109+
</plugins>
110+
</build>
111+
112+
<profiles>
113+
<profile>
114+
<id>deployment</id>
115+
<build>
116+
<plugins>
117+
<plugin>
118+
<groupId>org.apache.maven.plugins</groupId>
119+
<artifactId>maven-source-plugin</artifactId>
120+
<executions>
121+
<execution>
122+
<id>attach-sources</id>
123+
<phase>verify</phase>
124+
<goals>
125+
<goal>jar-no-fork</goal>
126+
</goals>
127+
</execution>
128+
</executions>
129+
<configuration>
130+
<archive>
131+
<manifestEntries>
132+
<Build-Version>${project.version}</Build-Version>
133+
<Git-Commit>${git.commit.id.abbrev}</Git-Commit>
134+
<Build-Timestamp>${maven.build.timestamp}</Build-Timestamp>
135+
</manifestEntries>
136+
</archive>
137+
</configuration>
138+
</plugin>
139+
<plugin>
140+
<groupId>org.apache.maven.plugins</groupId>
141+
<artifactId>maven-javadoc-plugin</artifactId>
142+
<executions>
143+
<execution>
144+
<id>attach-javadocs</id>
145+
<phase>verify</phase>
146+
<goals>
147+
<goal>jar</goal>
148+
</goals>
149+
</execution>
150+
</executions>
151+
<configuration>
152+
<archive>
153+
<manifestEntries>
154+
<Build-Version>${project.version}</Build-Version>
155+
<Git-Commit>${git.commit.id.abbrev}</Git-Commit>
156+
<Build-Timestamp>${maven.build.timestamp}</Build-Timestamp>
157+
</manifestEntries>
158+
</archive>
159+
</configuration>
160+
</plugin>
161+
</plugins>
162+
</build>
163+
</profile>
164+
</profiles>
38165

39166
<modules>
40167
<module>mobile-configuration</module>

0 commit comments

Comments
 (0)