Skip to content

Commit 7fffa89

Browse files
authored
Merge pull request #593 from paulrutter/FELIX-6872-tag-bundles
FELIX-6872 - Dependency Manager: tag every released bundle
2 parents 0b7e9c4 + 493cfa5 commit 7fffa89

6 files changed

Lines changed: 87 additions & 0 deletions

File tree

  • dependencymanager
    • org.apache.felix.dependencymanager.annotation
    • org.apache.felix.dependencymanager.lambda
    • org.apache.felix.dependencymanager.runtime
    • org.apache.felix.dependencymanager.shell
    • org.apache.felix.dependencymanager

‎dependencymanager/org.apache.felix.dependencymanager.annotation/pom.xml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@
8383
</instructions>
8484
</configuration>
8585
</plugin>
86+
<plugin>
87+
<!-- tags this bundle as <artifactId>-<version> when a release is performed, see the parent pom -->
88+
<groupId>org.codehaus.mojo</groupId>
89+
<artifactId>exec-maven-plugin</artifactId>
90+
</plugin>
8691
</plugins>
8792
</build>
8893
</project>

‎dependencymanager/org.apache.felix.dependencymanager.lambda/pom.xml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@
8888
</instructions>
8989
</configuration>
9090
</plugin>
91+
<plugin>
92+
<!-- tags this bundle as <artifactId>-<version> when a release is performed, see the parent pom -->
93+
<groupId>org.codehaus.mojo</groupId>
94+
<artifactId>exec-maven-plugin</artifactId>
95+
</plugin>
9196
</plugins>
9297
</build>
9398
</project>

‎dependencymanager/org.apache.felix.dependencymanager.runtime/pom.xml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@
8484
</instructions>
8585
</configuration>
8686
</plugin>
87+
<plugin>
88+
<!-- tags this bundle as <artifactId>-<version> when a release is performed, see the parent pom -->
89+
<groupId>org.codehaus.mojo</groupId>
90+
<artifactId>exec-maven-plugin</artifactId>
91+
</plugin>
8792
</plugins>
8893
</build>
8994
</project>

‎dependencymanager/org.apache.felix.dependencymanager.shell/pom.xml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@
9696
</instructions>
9797
</configuration>
9898
</plugin>
99+
<plugin>
100+
<!-- tags this bundle as <artifactId>-<version> when a release is performed, see the parent pom -->
101+
<groupId>org.codehaus.mojo</groupId>
102+
<artifactId>exec-maven-plugin</artifactId>
103+
</plugin>
99104
</plugins>
100105
</build>
101106
</project>

‎dependencymanager/org.apache.felix.dependencymanager/pom.xml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,11 @@
105105
</instructions>
106106
</configuration>
107107
</plugin>
108+
<plugin>
109+
<!-- tags this bundle as <artifactId>-<version> when a release is performed, see the parent pom -->
110+
<groupId>org.codehaus.mojo</groupId>
111+
<artifactId>exec-maven-plugin</artifactId>
112+
</plugin>
108113
</plugins>
109114
</build>
110115
</project>

‎dependencymanager/pom.xml‎

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@
8080
<log.version>1.3.2</log.version>
8181
<metatype.version>1.2.4</metatype.version>
8282
<servicemix.junit.version>4.13.2_1</servicemix.junit.version>
83+
<!-- set to false by the performRelease profile, see tag-bundles below -->
84+
<dependencymanager.tag.skip>true</dependencymanager.tag.skip>
8385
</properties>
8486

8587
<dependencyManagement>
@@ -190,7 +192,67 @@
190192
</execution>
191193
</executions>
192194
</plugin>
195+
<!--
196+
The release plugin makes one tag for the whole reactor (dependencymanager-parent-x.y.z). On top
197+
of that every released bundle gets its own tag, <artifactId>-<version>, like the earlier releases.
198+
Only the bundles that list this plugin in their build are tagged, and only while performing a
199+
release: release:perform builds the tag that was just made, so HEAD of its checkout is the release.
200+
-->
201+
<plugin>
202+
<groupId>org.codehaus.mojo</groupId>
203+
<artifactId>exec-maven-plugin</artifactId>
204+
<version>3.5.0</version>
205+
<configuration>
206+
<skip>${dependencymanager.tag.skip}</skip>
207+
<executable>git</executable>
208+
</configuration>
209+
<executions>
210+
<execution>
211+
<id>tag-bundle</id>
212+
<phase>deploy</phase>
213+
<goals>
214+
<goal>exec</goal>
215+
</goals>
216+
<configuration>
217+
<arguments>
218+
<argument>tag</argument>
219+
<argument>${project.artifactId}-${project.version}</argument>
220+
</arguments>
221+
</configuration>
222+
</execution>
223+
<execution>
224+
<id>push-bundle-tag</id>
225+
<phase>deploy</phase>
226+
<goals>
227+
<goal>exec</goal>
228+
</goals>
229+
<configuration>
230+
<arguments>
231+
<argument>push</argument>
232+
<argument>origin</argument>
233+
<argument>refs/tags/${project.artifactId}-${project.version}</argument>
234+
</arguments>
235+
</configuration>
236+
</execution>
237+
</executions>
238+
</plugin>
193239
</plugins>
194240
</pluginManagement>
195241
</build>
242+
243+
<profiles>
244+
<profile>
245+
<!-- release:perform sets performRelease -->
246+
<id>tag-bundles</id>
247+
<activation>
248+
<property>
249+
<name>performRelease</name>
250+
<value>true</value>
251+
</property>
252+
</activation>
253+
<properties>
254+
<dependencymanager.tag.skip>false</dependencymanager.tag.skip>
255+
</properties>
256+
</profile>
257+
</profiles>
196258
</project>

0 commit comments

Comments
 (0)