-
Notifications
You must be signed in to change notification settings - Fork 12
/
pom.xml
101 lines (95 loc) · 4.29 KB
/
pom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.kohsuke.stapler.netbeans</groupId>
<artifactId>parent</artifactId>
<version>1.9</version>
<packaging>pom</packaging>
<name>Stapler/NetBeans</name>
<organization>
<name>CloudBees</name>
<url>https://www.cloudbees.com/</url>
</organization>
<licenses>
<license>
<name>MIT</name>
<url>https://opensource.org/licenses/MIT</url>
</license>
</licenses>
<repositories>
<repository>
<id>repo.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/public/</url>
</repository>
</repositories>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.netbeans.utilities</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<version>4.5</version>
<extensions>true</extensions>
<configuration>
<brandingToken>${brandingToken}</brandingToken>
<useOSGiDependencies>true</useOSGiDependencies>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<release>11</release>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>groovy-maven-plugin</artifactId>
<version>2.0</version>
<executions>
<execution>
<phase>process-classes</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<source>
def mf = new File(project.build.outputDirectory, 'META-INF/MANIFEST.MF')
if (mf.exists()) {
def mani = mf.withInputStream {is -> new java.util.jar.Manifest(is)}
def attr = mani.mainAttributes
def baseVer = attr.getValue('OpenIDE-Module-Specification-Version')
if (baseVer != null) {
// Trick originally posted as: https://disqus.com/home/discussion/axelfontaine/maven_release_plugin_the_final_nail_in_the_coffin_blog_axel_fontaine_software_development_expert_28/#comment-1593586324
// To support branches to some extent, use: $(git rev-list $(git merge-base master HEAD) --count).$(git rev-list ^master HEAD --count)
def extra = 'git rev-list HEAD --count'.execute(null, new File(project.basedir.path)).text.trim()
attr.putValue('OpenIDE-Module-Specification-Version', "${baseVer}.${extra}")
mf.withOutputStream {os -> mani.write(os)}
}
}
</source>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<modules>
<module>stapler-plugin</module>
<module>jenkins-plugin</module>
<module>application</module>
</modules>
<properties>
<netbeans.version>RELEASE121</netbeans.version>
<brandingToken>nb</brandingToken>
</properties>
</project>