Skip to content

Commit 35310b8

Browse files
committed
Using parent pom's buildNumber variable, and pushing a submodule-specific version and taint status as well
1 parent 35e8f9f commit 35310b8

1 file changed

Lines changed: 51 additions & 0 deletions

File tree

pom.xml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,26 @@
6363
</execution>
6464
</executions>
6565
</plugin>
66+
<plugin>
67+
<groupId>org.codehaus.mojo</groupId>
68+
<artifactId>buildnumber-maven-plugin</artifactId>
69+
<version>3.3.0</version>
70+
<executions>
71+
<execution>
72+
<phase>validate</phase>
73+
<goals>
74+
<goal>create</goal>
75+
</goals>
76+
</execution>
77+
</executions>
78+
<configuration>
79+
<doCheck>true</doCheck>
80+
<doUpdate>false</doUpdate>
81+
<failTheBuild>false</failTheBuild>
82+
<shortRevisionLength>7</shortRevisionLength>
83+
<buildNumberPropertyName>submoduleHash</buildNumberPropertyName>
84+
</configuration>
85+
</plugin>
6686
</plugins>
6787
</build>
6888
</profile>
@@ -131,6 +151,26 @@
131151
</filesets>
132152
</configuration>
133153
</plugin>
154+
<plugin>
155+
<groupId>org.codehaus.mojo</groupId>
156+
<artifactId>buildnumber-maven-plugin</artifactId>
157+
<version>3.3.0</version>
158+
<executions>
159+
<execution>
160+
<phase>validate</phase>
161+
<goals>
162+
<goal>create</goal>
163+
</goals>
164+
</execution>
165+
</executions>
166+
<configuration>
167+
<doCheck>true</doCheck>
168+
<doUpdate>false</doUpdate>
169+
<failTheBuild>false</failTheBuild>
170+
<shortRevisionLength>7</shortRevisionLength>
171+
<buildNumberPropertyName>submoduleHash</buildNumberPropertyName>
172+
</configuration>
173+
</plugin>
134174
</plugins>
135175
</build>
136176
</profile>
@@ -148,7 +188,18 @@
148188
<configuration>
149189
<instructions>
150190
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
191+
<!-- NOTE: This property is defined in the parent/main pom, at runtime.
192+
Building this module directly will leave this blank and thus it will be omitted from the built jar.
193+
Look up building specific maven project (-pl) if you need to build this module and care about this.
194+
-->
151195
<Build-Number>${buildNumber}</Build-Number>
196+
<Submodule-Hash>${submoduleHash}</Submodule-Hash>
197+
<!-- NOTE: This flag is showing if there are any un-committed modifications in the submodule.
198+
It does *not* check to see if you have modified the submodule relative to the branch.
199+
Adopters modifying their local forks should expect that this reads false.
200+
Developers modifying their local copies for testing should expect this could read true.
201+
-->
202+
<Submodule-Tainted>${buildIsTainted}</Submodule-Tainted>
152203
<Include-Resource>${ui.include.resource}</Include-Resource>
153204
<Private-Package>admin-ui.*</Private-Package>
154205
<Http-Alias>/admin-ui</Http-Alias>

0 commit comments

Comments
 (0)