Skip to content

Commit a6eceac

Browse files
committed
centralize built properties into a single file
1 parent e3cf0c3 commit a6eceac

File tree

4 files changed

+43
-23
lines changed

4 files changed

+43
-23
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
strategy:
6464
fail-fast: false
6565
matrix:
66-
lucee: ${{ fromJSON(inputs.luceeVersions || vars.LUCEE_TEST_VERSIONS || '["6.2/stable/light", "7.0/snapshot/light"]') }}
66+
lucee: ${{ fromJSON(inputs.luceeVersions || '["6.2/stable/light", "7.0/stable/light"]') }}
6767
steps:
6868
- uses: actions/checkout@v4
6969

build.properties

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
bundlename: crypto.extension
2+
filename: crypto-extension
3+
bundleversion: 1.0.0.0
4+
extensionId: 17AB52DE-B300-A94B-E058FC978BE4542D
5+
luceeCoreVersion: 6.0.0.585
6+
releaseType: server
7+
appendix: -SNAPSHOT
8+
label: Crypto Extension
9+
description: BouncyCastle-based cryptographic functions
10+
mvnGroupId: org.lucee
11+
mvnGroupPath: org/lucee
12+
mvnArtifactId: extension-crypto

build.xml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,14 @@
44
Build Crypto Extension
55
</description>
66

7-
<!-- Default properties for local builds (can be overridden via -D or parent pom) -->
8-
<property name="bundleversion" value="1.0.0.0-SNAPSHOT"/>
7+
<!-- Load properties from build.properties (can be overridden via -D or parent pom) -->
8+
<property file="build.properties"/>
9+
10+
<!-- Computed version from bundleversion + appendix -->
11+
<property name="bundleversion" value="${bundleversion}${appendix}"/>
12+
13+
<!-- Build defaults -->
914
<property name="maven.goal" value="package"/>
10-
<property name="mvnGroupId" value="org.lucee"/>
11-
<property name="mvnGroupPath" value="org/lucee"/>
12-
<property name="mvnArtifactId" value="extension-crypto"/>
13-
<property name="filename" value="crypto-extension"/>
14-
<property name="id" value="17AB52DE-B300-A94B-E058FC978BE4542D"/>
15-
<property name="label" value="Crypto Extension"/>
16-
<property name="description" value="BouncyCastle-based cryptographic functions"/>
17-
<property name="releaseType" value="server"/>
18-
<property name="luceeCoreVersion" value="6.0.0.585"/>
1915
<property name="maven.username" value=""/>
2016
<property name="maven.password" value=""/>
2117
<property name="gpg.passphrase" value=""/>
@@ -138,7 +134,7 @@
138134
<echo file="${dist}/extension/META-INF/MANIFEST.MF">Manifest-Version: 1.0
139135
Built-Date: ${NOW}
140136
version: "${bundleversion}"
141-
id: "${id}"
137+
id: "${extensionId}"
142138
name: "${label}"
143139
description: "${description}"
144140
start-bundles: true

pom.xml

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,7 @@
1212
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1313
<maven.compiler.source>11</maven.compiler.source>
1414
<maven.compiler.target>11</maven.compiler.target>
15-
<id>17AB52DE-B300-A94B-E058FC978BE4542D</id>
16-
<bundlename>crypto.extension</bundlename>
17-
<mvnGroupId>org.lucee</mvnGroupId>
18-
<mvnGroupPath>org/lucee</mvnGroupPath>
19-
<mvnArtifactId>extension-crypto</mvnArtifactId>
20-
<filename>crypto-extension</filename>
21-
<luceeCoreVersion>6.0.0.585</luceeCoreVersion>
22-
<releaseType>server</releaseType>
23-
<label>Crypto Extension</label>
15+
<!-- Extension properties loaded from build.properties via properties-maven-plugin -->
2416
<release.url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</release.url>
2517
<snapshot.url>https://oss.sonatype.org/content/repositories/snapshots/</snapshot.url>
2618
</properties>
@@ -118,6 +110,26 @@
118110

119111
<build>
120112
<plugins>
113+
<!-- Load properties from build.properties -->
114+
<plugin>
115+
<groupId>org.codehaus.mojo</groupId>
116+
<artifactId>properties-maven-plugin</artifactId>
117+
<version>1.2.1</version>
118+
<executions>
119+
<execution>
120+
<phase>initialize</phase>
121+
<goals>
122+
<goal>read-project-properties</goal>
123+
</goals>
124+
<configuration>
125+
<files>
126+
<file>${basedir}/build.properties</file>
127+
</files>
128+
</configuration>
129+
</execution>
130+
</executions>
131+
</plugin>
132+
121133
<!-- Antrun plugin to execute the Ant build -->
122134
<plugin>
123135
<groupId>org.apache.maven.plugins</groupId>
@@ -135,7 +147,7 @@
135147
<property name="bundleversion" value="${project.version}"/>
136148
<property name="bundlename" value="${bundlename}"/>
137149
<property name="filename" value="${project.artifactId}"/>
138-
<property name="id" value="${id}"/>
150+
<property name="extensionId" value="${extensionId}"/>
139151
<property name="luceeCoreVersion" value="${luceeCoreVersion}"/>
140152
<property name="releaseType" value="${releaseType}"/>
141153
<property name="label" value="${label}"/>

0 commit comments

Comments
 (0)