Skip to content

Commit

Permalink
Draft: Re-organize platform POMs for building, staging, assembly, and…
Browse files Browse the repository at this point in the history
… tooling support
  • Loading branch information
GuusLieben committed Oct 11, 2024
1 parent 72aa7e7 commit 23bc3e8
Show file tree
Hide file tree
Showing 19 changed files with 691 additions and 578 deletions.
13 changes: 10 additions & 3 deletions hartshorn-assembly/pom.assembly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<!--
Note that Assembly is not a deployable unit, but does depend on some common
build configurations defined in staging.
-->
<groupId>org.dockbox.hartshorn</groupId>
<artifactId>hartshorn</artifactId>
<artifactId>hartshorn-platform-build</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
<relativePath>pom.platform.build.xml</relativePath>
</parent>

<name>Hartshorn Assembly</name>
<description>Assembly project for Hartshorn</description>
<description>Assembly project for Hartshorn, used to aggregate project artifacts (e.g. JavaDocs)</description>

<artifactId>hartshorn-assembly</artifactId>
<version>${revision}</version>
Expand All @@ -20,6 +24,8 @@
<properties>
<maven.deploy.skip>true</maven.deploy.skip>
<jacoco.skip>false</jacoco.skip>

<plugin.jacoco.version>0.8.12</plugin.jacoco.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -90,6 +96,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${plugin.jacoco.version}</version>
<executions>
<execution>
<id>report-aggregate</id>
Expand Down
237 changes: 237 additions & 0 deletions hartshorn-assembly/pom.platform.build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,237 @@
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.dockbox.hartshorn</groupId>
<artifactId>hartshorn-platform-build</artifactId>
<packaging>pom</packaging>
<version>${revision}</version>

<name>Hartshorn Platform Build</name>
<description>Build configuration for Hartshorn Maven modules</description>

<properties>
<!-- Project version, keep in sync with root pom.xml -->
<revision>0.7.0</revision>
<hartshorn.version>${revision}</hartshorn.version>

<!-- Project properties, inherited by all submodules -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>21</java.version>

<!-- Language versions, also inherited by BOM -->
<groovy.version>4.0.18</groovy.version>
<kotlin.version>2.0.0</kotlin.version>
<scala.version>3.3.1</scala.version>

<!-- Maven plugin versions, in alphabetical order -->
<plugin.buildhelper.version>3.6.0</plugin.buildhelper.version>
<plugin.compiler.version>3.13.0</plugin.compiler.version>
<plugin.gmaven.version>3.0.2</plugin.gmaven.version>
<plugin.groovy.version>2.1.1</plugin.groovy.version>
<plugin.jar.version>3.4.2</plugin.jar.version>
<plugin.javadoc.version>3.8.0</plugin.javadoc.version>
<plugin.kotlin.version>${kotlin.version}</plugin.kotlin.version>
<plugin.scala.version>4.9.2</plugin.scala.version>
</properties>

<build>
<testResources>
<testResource>
<directory>src/test/resources</directory>
</testResource>
<testResource>
<directory>src/testFixtures/resources</directory>
</testResource>
</testResources>
<pluginManagement>
<!-- Plugin management, in alphabetical order of version property -->
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>${plugin.buildhelper.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${plugin.compiler.version}</version>
</plugin>
<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>${plugin.gmaven.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${plugin.jar.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${plugin.javadoc.version}</version>
</plugin>
<plugin>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
<version>${plugin.kotlin.version}</version>
</plugin>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>${plugin.scala.version}</version>
</plugin>
</plugins>
</pluginManagement>

<plugins>
<!-- JavaDoc -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<javadocDirectory>${maven.multiModuleProjectDirectory}/hartshorn-assembly/javadoc</javadocDirectory>
<addStylesheets>
<stylesheetfile>overrides.css</stylesheetfile>
</addStylesheets>
<show>package</show>
<show>protected</show>
<show>public</show>
<tags>
<tag>
<name>apiNote</name>
<placement>a</placement>
<head>API Note:</head>
</tag>
<tag>
<name>implSpec</name>
<placement>a</placement>
<head>Implementation Specification:</head>
</tag>
<tag>
<name>implNote</name>
<placement>a</placement>
<head>Implementation Note:</head>
</tag>
</tags>
</configuration>
<executions>
<execution>
<id>aggregate</id>
<goals>
<goal>aggregate</goal>
</goals>
<phase>site</phase>
</execution>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>

<!-- Standard build configurations -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
</manifest>
</archive>
</configuration>
</plugin>

<!-- Testing -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-gradle-testfixtures</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>src/testFixtures/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>

<!-- Language support -->
<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<executions>
<execution>
<id>compile</id>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>test-compile</id>
<goals>
<goal>compileTests</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<configuration>
<scalaVersion>${scala.version}</scalaVersion>
</configuration>
</plugin>
<plugin>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
<executions>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<sourceDirs>
<sourceDir>${project.basedir}/src/main/java</sourceDir>
<sourceDir>${project.basedir}/src/main/kotlin</sourceDir>
<sourceDir>${project.basedir}/src/main/scala</sourceDir>
</sourceDirs>
</configuration>
</execution>
<execution>
<id>test-compile</id>
<phase>test-compile</phase>
<goals>
<goal>test-compile</goal>
</goals>
<configuration>
<sourceDirs>
<sourceDir>${project.basedir}/src/test/java</sourceDir>
<sourceDir>${project.basedir}/src/test/kotlin</sourceDir>
<sourceDir>${project.basedir}/src/test/scala</sourceDir>
</sourceDirs>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Loading

0 comments on commit 23bc3e8

Please sign in to comment.