Skip to content

Commit

Permalink
move maven files to e2e/
Browse files Browse the repository at this point in the history
Signed-off-by: AdamKorcz <[email protected]>
  • Loading branch information
AdamKorcz committed Aug 2, 2023
1 parent fe95490 commit d82c253
Show file tree
Hide file tree
Showing 4 changed files with 186 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/e2e.maven.push.main.default.slsa3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,17 @@ on:
permissions: read-all

jobs:
bootstrap:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- run: mv e2e/maven/pom.xml ./ && mv e2e/maven/src ./
build:
runs-on: ubuntu-latest
permissions:
id-token: write # For signing.
contents: read # For repo checkout of private repos.
actions: read # For getting workflow run on private repos.
uses: slsa-framework/slsa-github-generator/.github/workflows/builder_maven_slsa3.yml@main
with:
rekor-log-public: true
163 changes: 163 additions & 0 deletions e2e/maven/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
<?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>io.github.adamkorcz</groupId>
<artifactId>test-java-project</artifactId>
<version>0.1.19</version>
<packaging>jar</packaging>
<name>Adams test java project</name>
<description>A test java project.</description>
<url>https://github.com/AdamKorcz/test-java-project</url>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<licenses>
<license>
<name>MIT License</name>
<url>http://www.opensource.org/licenses/mit-license.php</url>
</license>
</licenses>
<developers>
<developer>
<name>Adam K</name>
<email>[email protected]</email>
<organization>Ada Logics</organization>
<organizationUrl>http://www.adalogics.com</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git:git://github.com/adamkorcz/test-java-project.git</connection>
<developerConnection>scm:git:ssh://github.com:simpligility/test-java-project.git</developerConnection>
<url>http://github.com/adamkorcz/test-java-project/tree/main</url>
</scm>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<phase>package</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>hello.HelloWorld</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
<configuration>
<gpgArguments>
<argument>--pinentry-mode</argument>
<argument>loopback</argument>
</gpgArguments>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<id>deploy-file</id>
<phase>deploy</phase>
<goals>
<goal>deploy-file</goal>
</goals>
<configuration>
<file>textfile.txt</file>
<url>https://s01.oss.sonatype.org/</url>
<repositoryId>io.github.adamkorcz</repositoryId>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.github.slsa-framework.slsa-github-generator</groupId>
<artifactId>hash-maven-plugin</artifactId>
<version>0.0.1</version>
<executions>
<execution>
<goals>
<goal>hash-jarfile</goal>
</goals>
</execution>
</executions>
<configuration>
<outputJsonPath>${SLSA_OUTPUTS_ARTIFACTS_FILE}</outputJsonPath>
</configuration>
</plugin>
</plugins>
</build>
</project>
7 changes: 7 additions & 0 deletions e2e/maven/src/main/java/hello/Greeter.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package hello;

public class Greeter {
public String sayHello() {
return "Hello world!";
}
}
8 changes: 8 additions & 0 deletions e2e/maven/src/main/java/hello/HelloWorld.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package hello;

public class HelloWorld {
public static void main(String[] args) {
Greeter greeter = new Greeter();
System.out.println(greeter.sayHello());
}
}

0 comments on commit d82c253

Please sign in to comment.