Skip to content

Commit

Permalink
Merge pull request #2111 from usethesource/unshaded-jar-configuration
Browse files Browse the repository at this point in the history
Added profile to pom for creation of unshaded Rascal jar
  • Loading branch information
rodinaarssen authored Dec 23, 2024
2 parents b1a5481 + 6291db5 commit bc98818
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
tests (buildjet-4vcpu-ubuntu-2204-arm)
ttl: 15

- name: Deploy
- name: Deploy shaded jar
if: startsWith(github.ref, 'refs/tags/v')
uses: usethesource/releases-maven-action@v1
with:
Expand All @@ -105,6 +105,19 @@ jobs:
ssh-username: ${{ secrets.RELEASE_SSH_USERNAME }}
ssh-private-key: ${{ secrets.RELEASE_SSH_PRIVATE_KEY }}

- name: Deploy unshaded jar
if: startsWith(github.ref, 'refs/tags/v')
uses: usethesource/releases-maven-action@v1
with:
maven-username: ${{ secrets.RELEASE_MAVEN_USERNAME }}
maven-password: ${{ secrets.RELEASE_MAVEN_PASSWORD }}
maven-local-port: ${{ secrets.RELEASE_MAVEN_LOCAL_PORT }}
ssh-hostname: ${{ secrets.RELEASE_SSH_SERVER }}
ssh-known-host: ${{ secrets.RELEASE_SSH_KNOWN_HOSTS }}
ssh-username: ${{ secrets.RELEASE_SSH_USERNAME }}
ssh-private-key: ${{ secrets.RELEASE_SSH_PRIVATE_KEY }}
maven-options: -Punshaded

- name: Prepare Draft Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
Expand Down
73 changes: 73 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -547,4 +547,77 @@
<version>${maven-version}</version>
</dependency>
</dependencies>
<profiles>
<profile>
<id>unshaded</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Name>rascal</Name>
<Main-Class>org.rascalmpl.shell.RascalShell</Main-Class>
<Specification-Version>${project.version}</Specification-Version>
<Specification-Vendor>http://www.usethesource.io</Specification-Vendor>
</manifestEntries>
</transformer>
</transformers>
<relocations>
<relocation>
<pattern>org.fusesource.jansi</pattern>
<shadedPattern>org.rascalmpl.fusesource.jansi</shadedPattern>
<excludes>
<exclude>org.fusesource.jansi.internal.*</exclude>
</excludes>
</relocation>
<relocation>
<pattern>jline</pattern>
<shadedPattern>org.rascalmpl.jline</shadedPattern>
</relocation>
</relocations>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
<artifactSet>
<includes>
<include>jline:*</include>
</includes>
</artifactSet>
<shadedClassifierName>unshaded</shadedClassifierName>
<shadedArtifactAttached>true</shadedArtifactAttached>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<configuration>
<skipDownloadLicenses>true</skipDownloadLicenses>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
</profile>
</profiles>
</project>

0 comments on commit bc98818

Please sign in to comment.