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 20, 2023
1 parent 36579bc commit 1301f65
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 17 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,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
46 changes: 33 additions & 13 deletions kotlin-runtime/ftl-generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>xyz.block</groupId>
<artifactId>ftl</artifactId>
<version>1.0-SNAPSHOT</version>
<version>${revision}</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down Expand Up @@ -41,25 +41,25 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
<goal>shade</goal>
</goals>
<configuration>
<archive>
<manifest>
<mainClass>xyz.block.ftl.generator.MainKt</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</execution>
</executions>
<configuration>
<outputFile>${project.build.outputDirectory}/${project.artifactId}-${project.version}.jar</outputFile>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>xyz.block.ftl.generator.MainKt</mainClass>
</transformer>
</transformers>
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -89,4 +89,24 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>default-jar</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
2 changes: 1 addition & 1 deletion kotlin-runtime/ftl-runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>xyz.block</groupId>
<artifactId>ftl</artifactId>
<version>1.0-SNAPSHOT</version>
<version>${revision}</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
35 changes: 34 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

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

<licenses>
Expand Down Expand Up @@ -38,6 +38,7 @@
<logback.version>1.4.8</logback.version>
<junit.version>5.10.0</junit.version>
<logstash.version>7.4</logstash.version>
<revision>1.0-SNAPSHOT</revision>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -294,6 +295,38 @@
</modules>
<build>
<plugins>
<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>ossrh</flattenMode>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<pomFile>.flattened-pom.xml</pomFile>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
Expand Down

0 comments on commit 1301f65

Please sign in to comment.