Skip to content

Commit

Permalink
Move pom-main.xml and pom-versioned.xml to separate folder
Browse files Browse the repository at this point in the history
This allows us to use a more standard Maven project setup and should work with GitHub's Dependency Graph and Dependabot.
  • Loading branch information
theigl committed Apr 23, 2023
1 parent c1cbe1b commit 1686533
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 23 deletions.
5 changes: 3 additions & 2 deletions build/assembly-all.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
</formats>
<fileSets>
<fileSet>
<directory>.</directory>
<includes>
<include>README*</include>
<include>license*</include>
<include>LICENCE*</include>
<include>CHANGES*</include>
<include>lib/</include>
<include>src/</include>
Expand All @@ -22,4 +23,4 @@
</includes>
</fileSet>
</fileSets>
</assembly>
</assembly>
18 changes: 16 additions & 2 deletions pom-versioned.xml → main/pom-versioned.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@
<groupId>com.esotericsoftware</groupId>
<artifactId>kryo-parent</artifactId>
<version>5.5.1-SNAPSHOT</version>
<relativePath>./pom.xml</relativePath>
<relativePath>../pom.xml</relativePath>
</parent>

<groupId>com.esotericsoftware.kryo</groupId>
<artifactId>kryo${kryo.major.version}</artifactId>
<packaging>jar</packaging>

<name>Kryo ${kryo.major.version}</name>
<description>Fast, efficient Java serialization. This is the version specific Kryo artifact.</description>

<properties>
<kryo.root>../</kryo.root>
</properties>

<dependencies>
<dependency>
<groupId>com.esotericsoftware</groupId>
Expand All @@ -24,7 +27,18 @@
</dependencies>

<build>
<directory>${kryo.root}/target</directory>
<sourceDirectory>${kryo.root}/src</sourceDirectory>
<testSourceDirectory>${kryo.root}/test</testSourceDirectory>

<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<!-- Skip clean phase so that artifacts from main POM are not deleted. -->
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
Expand Down
13 changes: 11 additions & 2 deletions pom-main.xml → main/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<groupId>com.esotericsoftware</groupId>
<artifactId>kryo-parent</artifactId>
<version>5.5.1-SNAPSHOT</version>
<relativePath>./pom.xml</relativePath>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>kryo</artifactId>
Expand All @@ -14,6 +14,10 @@
<name>Kryo</name>
<description>Fast, efficient Java serialization. This is the main Kryo artifact.</description>

<properties>
<kryo.root>../</kryo.root>
</properties>

<dependencies>
<dependency>
<groupId>com.esotericsoftware</groupId>
Expand All @@ -33,6 +37,10 @@
</dependencies>

<build>
<directory>${kryo.root}/target</directory>
<sourceDirectory>${kryo.root}/src</sourceDirectory>
<testSourceDirectory>${kryo.root}/test</testSourceDirectory>

<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand Down Expand Up @@ -75,8 +83,9 @@
<artifactId>maven-assembly-plugin</artifactId>
<version>3.4.2</version>
<configuration>
<archiveBaseDirectory>${kryo.root}</archiveBaseDirectory>
<descriptors>
<descriptor>build/assembly-all.xml</descriptor>
<descriptor>${kryo.root}/build/assembly-all.xml</descriptor>
</descriptors>
</configuration>
<!--
Expand Down
35 changes: 18 additions & 17 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
</properties>

<modules>
<module>pom-main.xml</module>
<module>pom-versioned.xml</module>
<module>main</module>
<module>main/pom-versioned.xml</module>
<module>benchmarks</module>
</modules>

Expand Down Expand Up @@ -182,7 +182,7 @@
<artifactId>findbugs-maven-plugin</artifactId>
<version>3.0.5</version>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
Expand All @@ -194,8 +194,8 @@
<arguments>-Prelease</arguments>
<goals>deploy</goals>
<!-- Don't run clean, because this would delete the kryo artifact, which would fail the shade plugin
because the kryo jar would no longer exist.
https://maven.apache.org/maven-release/maven-release-plugin/prepare-mojo.html#preparationGoals
because the kryo jar would no longer exist.
https://maven.apache.org/maven-release/maven-release-plugin/prepare-mojo.html#preparationGoals
-->
<preparationGoals>verify</preparationGoals>
</configuration>
Expand Down Expand Up @@ -364,7 +364,7 @@
</goals>
<configuration>
<sources>
<source>test-kotlin</source>
<source>${kryo.root}/test-kotlin</source>
</sources>
</configuration>
</execution>
Expand Down Expand Up @@ -419,8 +419,8 @@
</goals>
<configuration>
<sources>
<source>test-kotlin</source>
<source>test-jdk11</source>
<source>${kryo.root}/test-kotlin</source>
<source>${kryo.root}/test-jdk11</source>
</sources>
</configuration>
</execution>
Expand Down Expand Up @@ -466,9 +466,9 @@
</goals>
<configuration>
<sources>
<source>test-kotlin</source>
<source>test-jdk11</source>
<source>test-jdk17</source>
<source>${kryo.root}/test-kotlin</source>
<source>${kryo.root}/test-jdk11</source>
<source>${kryo.root}/test-jdk17</source>
</sources>
</configuration>
</execution>
Expand All @@ -493,12 +493,13 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>
--enable-preview
--add-opens java.base/sun.nio.ch=ALL-UNNAMED
--add-opens java.base/java.nio=ALL-UNNAMED
--add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED
</argLine>
<argLine>
--enable-preview
--add-opens java.base/sun.nio.ch=ALL-UNNAMED
--add-opens java.base/java.lang.invoke=ALL-UNNAMED
--add-opens java.base/java.nio=ALL-UNNAMED
--add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED
</argLine>
</configuration>
</plugin>
</plugins>
Expand Down

0 comments on commit 1686533

Please sign in to comment.