Skip to content
This repository was archived by the owner on Jan 18, 2024. It is now read-only.

Commit e32b6d8

Browse files
committed
moved the java-versions into build profiles
1 parent 3f92f90 commit e32b6d8

1 file changed

Lines changed: 84 additions & 32 deletions

File tree

pom.xml

Lines changed: 84 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>com.xdev-software</groupId>
77
<artifactId>xapi-fx</artifactId>
8-
<version>1.0.0_java8-SNAPSHOT</version>
8+
<version>1.0.0_${version.suffix}-SNAPSHOT</version>
99
<packaging>jar</packaging>
1010

1111
<name>XDEV Application Framework JavaFX</name>
@@ -41,12 +41,11 @@
4141
</licenses>
4242

4343
<properties>
44-
<javaVersion>1.8</javaVersion>
45-
44+
<java.compiler.version>1.8</java.compiler.version>
4645
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4746
<license.licenseName>lgpl_v3</license.licenseName>
48-
<maven.compiler.source>${javaVersion}</maven.compiler.source>
49-
<maven.compiler.target>${javaVersion}</maven.compiler.target>
47+
<maven.compiler.source>${java.compiler.version}</maven.compiler.source>
48+
<maven.compiler.target>${java.compiler.version}</maven.compiler.target>
5049
</properties>
5150

5251
<repositories>
@@ -73,30 +72,8 @@
7372
</pluginRepository>
7473
</pluginRepositories>
7574

76-
<distributionManagement>
77-
<snapshotRepository>
78-
<id>ossrh</id>
79-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
80-
</snapshotRepository>
81-
<repository>
82-
<id>ossrh</id>
83-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
84-
</repository>
85-
</distributionManagement>
86-
<dependencies>
87-
88-
<dependency>
89-
<groupId>org.openjfx</groupId>
90-
<artifactId>javafx-swing</artifactId>
91-
<version>17-ea+16</version>
92-
</dependency>
93-
<dependency>
94-
<groupId>org.openjfx</groupId>
95-
<artifactId>javafx-web</artifactId>
96-
<version>17-ea+16</version>
97-
</dependency>
98-
99-
</dependencies>
75+
76+
10077

10178
<build>
10279
<plugins>
@@ -157,8 +134,12 @@
157134
<version>3.5.4</version>
158135
</requireMavenVersion>
159136
<requireJavaVersion>
160-
<version>${javaVersion}</version>
137+
<version>${java.runtime.version}</version>
161138
</requireJavaVersion>
139+
<requireActiveProfile>
140+
<profiles>java8,java11,java17</profiles>
141+
<all>false</all>
142+
</requireActiveProfile>
162143
</rules>
163144
</configuration>
164145
</execution>
@@ -170,8 +151,8 @@
170151
<version>3.8.1</version>
171152
<configuration>
172153
<compilerId>eclipse</compilerId>
173-
<source>${javaVersion}</source>
174-
<target>${javaVersion}</target>
154+
<source>${java.compiler.version}</source>
155+
<target>${java.compiler.version}</target>
175156
</configuration>
176157
<dependencies>
177158
<dependency>
@@ -269,8 +250,79 @@
269250
</build>
270251

271252
<profiles>
253+
254+
<profile>
255+
<id>java8</id>
256+
<activation>
257+
<activeByDefault>true</activeByDefault>
258+
</activation>
259+
<properties>
260+
<java.runtime.version>[1.8,9)</java.runtime.version>
261+
<version.suffix>java8</version.suffix>
262+
</properties>
263+
264+
<dependencies>
265+
<!-- There are no JavaFX dependencies here, because with Java8 JavaFX
266+
has to come with the JDK. There are no maven dependencies we can use. -->
267+
</dependencies>
268+
</profile>
269+
270+
<profile>
271+
<id>java11</id>
272+
<properties>
273+
<java.runtime.version>[11,12)</java.runtime.version>
274+
<version.suffix>java11</version.suffix>
275+
</properties>
276+
277+
<dependencies>
278+
<dependency>
279+
<groupId>org.openjfx</groupId>
280+
<artifactId>javafx-swing</artifactId>
281+
<version>11.0.2</version>
282+
</dependency>
283+
<dependency>
284+
<groupId>org.openjfx</groupId>
285+
<artifactId>javafx-web</artifactId>
286+
<version>11.0.2</version>
287+
</dependency>
288+
</dependencies>
289+
</profile>
290+
291+
<profile>
292+
<id>java17</id>
293+
<properties>
294+
<java.runtime.version>[17,18)</java.runtime.version>
295+
<version.suffix>java17</version.suffix>
296+
</properties>
297+
298+
<dependencies>
299+
<dependency>
300+
<groupId>org.openjfx</groupId>
301+
<artifactId>javafx-swing</artifactId>
302+
<version>17-ea+16</version>
303+
</dependency>
304+
<dependency>
305+
<groupId>org.openjfx</groupId>
306+
<artifactId>javafx-web</artifactId>
307+
<version>17-ea+16</version>
308+
</dependency>
309+
</dependencies>
310+
</profile>
311+
272312
<profile>
273313
<id>ossrh</id>
314+
315+
<distributionManagement>
316+
<snapshotRepository>
317+
<id>ossrh</id>
318+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
319+
</snapshotRepository>
320+
<repository>
321+
<id>ossrh</id>
322+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
323+
</repository>
324+
</distributionManagement>
325+
274326
<build>
275327
<plugins>
276328
<plugin>

0 commit comments

Comments
 (0)