Skip to content

Commit

Permalink
fix: only release generator executable; resolve child POMs
Browse files Browse the repository at this point in the history
  • Loading branch information
worstell committed Nov 24, 2023
1 parent f3fb34d commit 47494aa
Show file tree
Hide file tree
Showing 4 changed files with 138 additions and 30 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ jobs:
- name: Publish JARs # Snapshots are published first, then the tagged release
run: |
mvn -U --batch-mode clean deploy -P release
mvn --batch-mode versions:set -DnewVersion=$(git describe --tags --abbrev=0 | cut -c2-) -DprocessAllModules -DgenerateBackupPoms=false
mvn -U --batch-mode clean deploy -P release
# mvn -Drevision=$(git describe --tags --abbrev=0 | cut -c2-) -U --batch-mode clean deploy -P release
env:
SIGN_KEY_PASS: ${{ secrets.GPG_PASSPHRASE }}
OSSRH_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
Expand Down
51 changes: 41 additions & 10 deletions kotlin-runtime/ftl-generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,19 @@
<parent>
<groupId>xyz.block</groupId>
<artifactId>ftl</artifactId>
<version>1.0-SNAPSHOT</version>
<version>${revision}</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<artifactId>ftl-generator</artifactId>
<packaging>jar</packaging>

<name>${project.groupId}:${project.artifactId}</name>

<properties>
<rootDir>${basedir}/../..</rootDir>
<maven.deploy.skip>false</maven.deploy.skip>
<revision>1.0-SNAPSHOT</revision>
</properties>

<dependencies>
Expand All @@ -35,32 +38,60 @@
<artifactId>clikt-jvm</artifactId>
<version>4.2.1</version>
</dependency>
<dependency>
<groupId>com.squareup.wire</groupId>
<artifactId>wire-runtime-jvm</artifactId>
</dependency>
<dependency>
<groupId>com.squareup.wire</groupId>
<artifactId>wire-grpc-server</artifactId>
</dependency>
<dependency>
<groupId>com.squareup.wire</groupId>
<artifactId>wire-grpc-client-jvm</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
<goal>shade</goal>
</goals>
<configuration>
<archive>
<manifest>
<shadedArtifactAttached>false</shadedArtifactAttached>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>xyz.block.ftl.generator.MainKt</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<executions>
<!--
Workaround to flatten POM in the same build phase as packaging the shaded JAR, so that
we flatten the dependency-reduced POM instead of the original POM.
-->
<execution>
<id>flatten</id>
<phase>package</phase>
<goals>
<goal>flatten</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
Expand Down
21 changes: 20 additions & 1 deletion kotlin-runtime/ftl-runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@
<parent>
<groupId>xyz.block</groupId>
<artifactId>ftl</artifactId>
<version>1.0-SNAPSHOT</version>
<version>${revision}</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<artifactId>ftl-runtime</artifactId>
<packaging>jar</packaging>

<name>${project.groupId}:${project.artifactId}</name>

<properties>
<rootDir>${basedir}/../..</rootDir>
<maven.deploy.skip>false</maven.deploy.skip>
Expand Down Expand Up @@ -53,6 +55,19 @@
<version>2.10.1</version>
</dependency>

<dependency>
<groupId>com.squareup.wire</groupId>
<artifactId>wire-runtime-jvm</artifactId>
</dependency>
<dependency>
<groupId>com.squareup.wire</groupId>
<artifactId>wire-grpc-server</artifactId>
</dependency>
<dependency>
<groupId>com.squareup.wire</groupId>
<artifactId>wire-grpc-client-jvm</artifactId>
</dependency>

<!-- Test dependencies -->
<dependency>
<groupId>io.gitlab.arturbosch.detekt</groupId>
Expand All @@ -72,6 +87,10 @@

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
Expand Down
93 changes: 76 additions & 17 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,38 @@

<groupId>xyz.block</groupId>
<artifactId>ftl</artifactId>
<version>1.0-SNAPSHOT</version>
<version>${revision}</version>
<packaging>pom</packaging>

<name>FTL</name>
<description>Towards a 𝝺-calculus for large-scale systems</description>
<url>https://github.com/TBD54566975/ftl</url>

<licenses>
<license>
<name>The Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>

<developers>
<developer>
<name>Alec Thomas</name>
<organization>TBD</organization>
<organizationUrl>https://github.com/TBD54566975</organizationUrl>
</developer>
<developer>
<name>Wes Billman</name>
<organization>TBD</organization>
<organizationUrl>https://github.com/TBD54566975</organizationUrl>
</developer>
<developer>
<name>Elizabeth Worstell</name>
<organization>TBD</organization>
<organizationUrl>https://github.com/TBD54566975</organizationUrl>
</developer>
</developers>

<scm>
<connection>scm:git:git://github.com/TBD54566975/ftl.git</connection>
<developerConnection>scm:git:ssh://github.com/TBD54566975/ftl.git</developerConnection>
Expand All @@ -38,6 +60,7 @@
<logback.version>1.4.11</logback.version>
<junit.version>5.10.1</junit.version>
<logstash.version>7.4</logstash.version>
<revision>1.0-SNAPSHOT</revision>
</properties>

<dependencyManagement>
Expand All @@ -49,6 +72,21 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.squareup.wire</groupId>
<artifactId>wire-runtime-jvm</artifactId>
<version>${wire.version}</version>
</dependency>
<dependency>
<groupId>com.squareup.wire</groupId>
<artifactId>wire-grpc-server</artifactId>
<version>${wire.version}</version>
</dependency>
<dependency>
<groupId>com.squareup.wire</groupId>
<artifactId>wire-grpc-client-jvm</artifactId>
<version>${wire.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down Expand Up @@ -111,22 +149,6 @@
<artifactId>grpc-stub</artifactId>
<version>${grpc.version}</version>
</dependency>

<dependency>
<groupId>com.squareup.wire</groupId>
<artifactId>wire-runtime-jvm</artifactId>
<version>${wire.version}</version>
</dependency>
<dependency>
<groupId>com.squareup.wire</groupId>
<artifactId>wire-grpc-server</artifactId>
<version>${wire.version}</version>
</dependency>
<dependency>
<groupId>com.squareup.wire</groupId>
<artifactId>wire-grpc-client-jvm</artifactId>
<version>${wire.version}</version>
</dependency>
<dependency>
<groupId>org.hotswapagent</groupId>
<artifactId>hotswap-agent-core</artifactId>
Expand Down Expand Up @@ -280,6 +302,36 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.1</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.5.0</version>
<executions>
<execution>
<id>flatten</id>
<phase>process-resources</phase>
<goals>
<goal>flatten</goal>
</goals>
</execution>
<execution>
<id>flatten.clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
<configuration>
<flattenMode>resolveCiFriendliesOnly</flattenMode>
<updatePomFile>true</updatePomFile>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
Expand All @@ -294,6 +346,13 @@
</modules>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<configuration>
<flattenMode>ossrh</flattenMode>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
Expand Down

0 comments on commit 47494aa

Please sign in to comment.