From d82c25394aba2ade7c2a2d7dc3fa79482f10949e Mon Sep 17 00:00:00 2001 From: AdamKorcz Date: Wed, 2 Aug 2023 23:19:23 +0100 Subject: [PATCH] move maven files to e2e/ Signed-off-by: AdamKorcz --- .../e2e.maven.push.main.default.slsa3.yml | 10 +- e2e/maven/pom.xml | 163 ++++++++++++++++++ e2e/maven/src/main/java/hello/Greeter.java | 7 + e2e/maven/src/main/java/hello/HelloWorld.java | 8 + 4 files changed, 186 insertions(+), 2 deletions(-) create mode 100644 e2e/maven/pom.xml create mode 100644 e2e/maven/src/main/java/hello/Greeter.java create mode 100644 e2e/maven/src/main/java/hello/HelloWorld.java diff --git a/.github/workflows/e2e.maven.push.main.default.slsa3.yml b/.github/workflows/e2e.maven.push.main.default.slsa3.yml index b109567b7a..36dadfee0b 100644 --- a/.github/workflows/e2e.maven.push.main.default.slsa3.yml +++ b/.github/workflows/e2e.maven.push.main.default.slsa3.yml @@ -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 diff --git a/e2e/maven/pom.xml b/e2e/maven/pom.xml new file mode 100644 index 0000000000..1a25343adb --- /dev/null +++ b/e2e/maven/pom.xml @@ -0,0 +1,163 @@ + + + 4.0.0 + io.github.adamkorcz + test-java-project + 0.1.19 + jar + Adams test java project + A test java project. + https://github.com/AdamKorcz/test-java-project + + 1.8 + 1.8 + + + + ossrh + https://s01.oss.sonatype.org/content/repositories/snapshots + + + ossrh + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ + + + + + MIT License + http://www.opensource.org/licenses/mit-license.php + + + + + Adam K + Adam@adalogics.com + Ada Logics + http://www.adalogics.com + + + + scm:git:git://github.com/adamkorcz/test-java-project.git + scm:git:ssh://github.com:simpligility/test-java-project.git + http://github.com/adamkorcz/test-java-project/tree/main + + + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + package + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.9.1 + + ${java.home}/bin/javadoc + + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-shade-plugin + 3.2.4 + + + package + + shade + + + + + hello.HelloWorld + + + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.7 + true + + ossrh + https://s01.oss.sonatype.org/ + false + + + + org.apache.maven.plugins + maven-gpg-plugin + 3.1.0 + + + sign-artifacts + verify + + sign + + + + + + --pinentry-mode + loopback + + + + + org.apache.maven.plugins + maven-deploy-plugin + 3.1.1 + + + deploy-file + deploy + + deploy-file + + + textfile.txt + https://s01.oss.sonatype.org/ + io.github.adamkorcz + + + + + + io.github.slsa-framework.slsa-github-generator + hash-maven-plugin + 0.0.1 + + + + hash-jarfile + + + + + ${SLSA_OUTPUTS_ARTIFACTS_FILE} + + + + + diff --git a/e2e/maven/src/main/java/hello/Greeter.java b/e2e/maven/src/main/java/hello/Greeter.java new file mode 100644 index 0000000000..f92a442354 --- /dev/null +++ b/e2e/maven/src/main/java/hello/Greeter.java @@ -0,0 +1,7 @@ +package hello; + +public class Greeter { + public String sayHello() { + return "Hello world!"; + } +} diff --git a/e2e/maven/src/main/java/hello/HelloWorld.java b/e2e/maven/src/main/java/hello/HelloWorld.java new file mode 100644 index 0000000000..1626b45cbd --- /dev/null +++ b/e2e/maven/src/main/java/hello/HelloWorld.java @@ -0,0 +1,8 @@ +package hello; + +public class HelloWorld { + public static void main(String[] args) { + Greeter greeter = new Greeter(); + System.out.println(greeter.sayHello()); + } +}