Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
blank_issues_enabled: false
contact_links:
- name: GitHub Discussions
url: https://github.com/RHEcosystemAppEng/exhort-java-api/discussions/
url: https://github.com/trustification/exhort-java-api/discussions/
about: You can also use Discussions for questions and ideas.
29 changes: 0 additions & 29 deletions .github/workflows/oapi_spec.yml

This file was deleted.

3 changes: 1 addition & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
env:
EXHORT_PYTHON3_PATH: "${{steps.python-location.outputs.python-bin-location}}/python3"
EXHORT_PIP3_PATH: "${{steps.python-location.outputs.python-bin-location}}/pip3"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mvn verify -Pits,cov -B -ff

Expand All @@ -61,8 +62,6 @@ jobs:
./target/surefire-reports/*.xml
./target/junit-platform/TEST-junit-jupiter.xml



- name: Upload coverage reports
if: ${{ matrix.java == env.MAIN_JAVA_VER }}
uses: actions/upload-artifact@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
name: Deploy release
environment: staging
# only trigger the workflow on the base repository and if the merged branch name starts with release.
if: (github.repository_owner == 'RHEcosystemAppEng' && github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/') ) || (github.repository_owner == 'RHEcosystemAppEng' && github.ref_name == 'main' && contains(github.event.commits[0].message, 'release/directly'))
if: (github.repository_owner == 'trustification' && github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/') ) || (github.repository_owner == 'trustification' && github.ref_name == 'main' && contains(github.event.commits[0].message, 'release/directly'))
outputs:
project_version: ${{ steps.project.outputs.version }}
last_release_tag: ${{ steps.last-release.outputs.tag-name }}
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
release:
runs-on: ubuntu-latest
name: Release
if: (github.repository_owner == 'RHEcosystemAppEng' && startsWith(github.head_ref, 'release/')) || (github.repository_owner == 'RHEcosystemAppEng' && github.ref_name == 'main' && contains(github.event.commits[0].message, 'release/directly'))
if: (github.repository_owner == 'trustification' && startsWith(github.head_ref, 'release/')) || (github.repository_owner == 'trustification' && github.ref_name == 'main' && contains(github.event.commits[0].message, 'release/directly'))
environment: staging
needs: deploy
steps:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
name: Deploy snapshot
env:
RUN_PYTHON_BIN: ${{ vars.RUN_PYTHON_BIN }}
if: github.repository_owner == 'RHEcosystemAppEng' && github.event.pull_request.merged == true && !startsWith(github.head_ref, 'release/')
if: github.repository_owner == 'trustification' && github.event.pull_request.merged == true && !startsWith(github.head_ref, 'release/')
outputs:
project_version: ${{ steps.project.outputs.version }}
steps:
Expand All @@ -40,7 +40,7 @@ jobs:
- name: Deploy snapshot to GitHub
if: |
contains(steps.project.outputs.version, 'SNAPSHOT') &&
github.repository == 'RHEcosystemAppEng/exhort-java-api'
github.repository == 'trustification/exhort-java-api'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn deploy -Pprepare-deployment,deploy-github -B -ff -DskipTests=true -Dskip.junit_platform=true
Expand All @@ -52,7 +52,7 @@ jobs:
needs: deploy
if: |
contains(needs.deploy.outputs.project_version, 'SNAPSHOT') &&
github.repository_owner == 'RHEcosystemAppEng' && github.event.pull_request.merged == true && !startsWith(github.head_ref, 'release/')
github.repository_owner == 'trustification' && github.event.pull_request.merged == true && !startsWith(github.head_ref, 'release/')
steps:
- name: Check for existing ${{ needs.deploy.outputs.project_version }} release
id: existing_release
Expand Down
12 changes: 5 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,11 @@

### OpenAPI Specifications

We use our [Backend's OpenAPI spec file][1] for generating types used for deserialization of the Backend's
We use the Java generated library for the [Exhort OpenAPI spec][1] for deserialization of the Backend's
API responses.<br/>
The generated classes target package is the `com.redhat.exhort.api`. It is skipped when calculating coverage
thresholds. **Avoid writing code in this package.**<br/>
When the [Backend's spec file][1] is modified, we need to **manually** copy it here in
[src/main/resources/exhort](src/main/resources/exhort/openapi.yaml),
for the *openapi-generator-maven-plugin* to pick it up at **build time**.

When the [Backend's spec file][1] is modified, a new
version of the Java library should be used.

### Modular (JPMS)

Expand Down Expand Up @@ -116,7 +114,7 @@ contribution. See the [DCO](DCO) file for details.

<!-- Real links -->
[0]: https://www.conventionalcommits.org/en/v1.0.0/
[1]: https://github.com/RHEcosystemAppEng/exhort/blob/main/src/main/resources/META-INF/openapi.yaml
[1]: https://github.com/trustification/exhort-api-spec/blob/main/api/v4/openapi.yaml

<!-- Badge links -->
[10]: https://badgen.net/badge/Java%20Version/11/5382a1
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# CodeReady Dependency Analytics Java API<br/>![latest-no-snapshot][0] ![latest-snapshot][1]

* Looking for our JavaScript/TypeScript API? Try [Exhort JavaScript API](https://github.com/RHEcosystemAppEng/exhort-javascript-api).
* Looking for our Backend implementation? Try [Exhort](https://github.com/RHEcosystemAppEng/exhort).
* Looking for our JavaScript/TypeScript API? Try [Exhort JavaScript API](https://github.com/trustification/exhort-javascript-api).
* Looking for our Backend implementation? Try [Exhort](https://github.com/trustification/exhort).

The _Exhort Java API_ module is deployed to _GitHub Package Registry_.

Expand Down Expand Up @@ -69,7 +69,7 @@ encrypted-token-will-appear-here
...
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/RHEcosystemAppEng/exhort-java-api</url>
<url>https://maven.pkg.github.com/trustification/exhort-java-api</url>
</repository>
...
</repositories>
Expand All @@ -83,7 +83,7 @@ encrypted-token-will-appear-here
repositories {
...
maven {
url 'https://maven.pkg.github.com/RHEcosystemAppEng/exhort-java-api'
url 'https://maven.pkg.github.com/trustification/exhort-java-api'
credentials {
username System.getenv("GITHUB_USERNAME")
password System.getenv("GITHUB_TOKEN")
Expand Down Expand Up @@ -551,5 +551,5 @@ Customize image analysis optionally by using *Environment Variables* or *Java Pr


<!-- Badge links -->
[0]: https://img.shields.io/github/v/release/RHEcosystemAppEng/exhort-java-api?color=green&label=latest
[1]: https://img.shields.io/github/v/release/RHEcosystemAppEng/exhort-java-api?color=yellow&include_prereleases&label=snapshot
[0]: https://img.shields.io/github/v/release/trustification/exhort-java-api?color=green&label=latest
[1]: https://img.shields.io/github/v/release/trustification/exhort-java-api?color=yellow&include_prereleases&label=snapshot
10 changes: 5 additions & 5 deletions catalog-info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ kind: Component
metadata:
annotations:
backstage.io/kubernetes-id: exhort-java-api
github.com/project-slug: RHEcosystemAppEng/exhort-java-api
github.com/project-slug: trustification/exhort-java-api
github.com/project-readme-path: README.md
backstage.io/view-url: https://github.com/RHEcosystemAppEng/exhort-java-api/blob/main/catalog-info.yaml
backstage.io/edit-url: https://github.com/RHEcosystemAppEng/exhort-java-api/blob/main/catalog-info.yaml
backstage.io/source-location: url:https://github.com/RHEcosystemAppEng/exhort-java-api
backstage.io/view-url: https://github.com/trustification/exhort-java-api/blob/main/catalog-info.yaml
backstage.io/edit-url: https://github.com/trustification/exhort-java-api/blob/main/catalog-info.yaml
backstage.io/source-location: url:https://github.com/trustification/exhort-java-api
rhda/manifest-file-path: package.json
backstage.io/techdocs-ref: url:https://github.com/RHEcosystemAppEng/exhort-java-api
backstage.io/techdocs-ref: url:https://github.com/trustification/exhort-java-api
name: exhort-java-api
tags:
- rhda
Expand Down
89 changes: 32 additions & 57 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<version>0.0.8-SNAPSHOT</version>
<name>Exhort Java API</name>
<description>Exhort Java API</description>
<url>https://github.com/RHEcosystemAppEng/exhort-java-api#readme</url>
<url>https://github.com/trustification/exhort-java-api#readme</url>
<inceptionYear>2023</inceptionYear>

<properties>
Expand All @@ -18,10 +18,11 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.release>11</maven.compiler.release>
<!-- Dependencies -->
<exhort-api.version>1.0.6</exhort-api.version>
<jackson.version>2.15.0</jackson.version>
<jakarta.annotation-api.version>2.1.1</jakarta.annotation-api.version>
<jakarta.mail.version>2.0.2</jakarta.mail.version>
<cyclonedx.version>7.3.2</cyclonedx.version>
<cyclonedx.version>10.2.1</cyclonedx.version>
<!-- Testing Dependencies -->
<assertj.version>3.27.3</assertj.version>
<junit-jupiter.version>5.10.5</junit-jupiter.version>
Expand Down Expand Up @@ -49,13 +50,20 @@
<jacoco-maven-plugin.version>0.8.10</jacoco-maven-plugin.version>
<junit-platform-maven-plugin.version>1.1.8</junit-platform-maven-plugin.version>
<license-maven-plugin.version>4.1</license-maven-plugin.version>
<openapi-generator-maven-plugin.version>6.6.0</openapi-generator-maven-plugin.version>
<pitest-maven.version>1.13.2</pitest-maven.version>
<pitest-junit5-plugin.version>1.1.2</pitest-junit5-plugin.version>
<versions-maven-plugin.version>2.15.0</versions-maven-plugin.version>
<maven-failsafe-plugin.version>3.5.3</maven-failsafe-plugin.version>
<spotless-maven-plugin.version>2.44.4</spotless-maven-plugin.version>
</properties>

<repositories>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/trustification/exhort-api-spec</url>
</repository>
</repositories>

<licenses>
<license>
<name>Apache-2.0</name>
Expand All @@ -78,24 +86,29 @@

<issueManagement>
<system>GitHub Issues</system>
<url>https://github.com/RHEcosystemAppEng/exhort-java-api/issues</url>
<url>https://github.com/trustification/exhort-java-api/issues</url>
</issueManagement>

<scm>
<url>https://github.com/RHEcosystemAppEng/exhort-java-api</url>
<connection>scm:git:git@github.com:RHEcosystemAppEng/exhort-java-api.git</connection>
<developerConnection>scm:git:git@github.com:RHEcosystemAppEng/exhort-java-api.git</developerConnection>
<url>https://github.com/trustification/exhort-java-api</url>
<connection>scm:git:git@github.com:trustification/exhort-java-api.git</connection>
<developerConnection>scm:git:git@github.com:trustification/exhort-java-api.git</developerConnection>
<tag>HEAD</tag>
</scm>

<ciManagement>
<system>GitHub Workflows</system>
<url>https://github.com/RHEcosystemAppEng/exhort-java-api/actions</url>
<url>https://github.com/trustification/exhort-java-api/actions</url>
</ciManagement>

<dependencyManagement>
<dependencies>
<!-- Dependencies -->
<dependency>
<groupId>com.redhat.ecosystemappeng</groupId>
<artifactId>exhort-api-spec</artifactId>
<version>${exhort-api.version}</version>
</dependency>
<dependency>
<groupId>org.tomlj</groupId>
<artifactId>tomlj</artifactId>
Expand Down Expand Up @@ -172,6 +185,10 @@

<dependencies>
<!-- Dependencies -->
<dependency>
<groupId>com.redhat.ecosystemappeng</groupId>
<artifactId>exhort-api-spec</artifactId>
</dependency>
<dependency>
<groupId>org.tomlj</groupId>
<artifactId>tomlj</artifactId>
Expand Down Expand Up @@ -407,11 +424,6 @@ limitations under the License.]]>
</rules>
</configuration>
</plugin>
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>${openapi-generator-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
Expand All @@ -425,9 +437,6 @@ limitations under the License.]]>
</dependencies>
<configuration>
<exportLineCoverage>true</exportLineCoverage>
<excludedClasses>
<excludedClass>com.redhat.exhort.api.*</excludedClass>
</excludedClasses>
<mutationThreshold>${mutation.coverage.threshold}</mutationThreshold>
<mutators>
<mutator>STRONGER</mutator>
Expand All @@ -440,6 +449,11 @@ limitations under the License.]]>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${maven-failsafe-plugin.version}</version>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${spotless-maven-plugin.version}</version>
</plugin>
</plugins>
</pluginManagement>

Expand Down Expand Up @@ -637,45 +651,6 @@ limitations under the License.]]>
</execution>
</executions>
</plugin>

<!-- openapi-generator-maven-plugin:generate is bound to the generate-sources phase and will generate sources from exhort spec -->
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/src/main/resources/exhort/openapi.yaml</inputSpec>
<generatorName>java</generatorName>
<modelPackage>com.redhat.exhort.api</modelPackage>
<output>${project.build.directory}</output>
<configOptions>
<documentationProvider>none</documentationProvider>
<hideGenerationTimestamp>true</hideGenerationTimestamp>
<serializableModel>true</serializableModel>
<serializationLibrary>jackson</serializationLibrary>
<sourceFolder>generated-sources</sourceFolder>
<useJakartaEe>true</useJakartaEe>
</configOptions>
<library>native</library>
<!--<generateModels>false</generateModels>-->
<generateApis>false</generateApis>
<generateSupportingFiles>false</generateSupportingFiles>
<generateModelTests>false</generateModelTests>
<generateModelDocumentation>false</generateModelDocumentation>
<generateApiTests>false</generateApiTests>
<addCompileSourceRoot>false</addCompileSourceRoot>
<addTestCompileSourceRoot>false</addTestCompileSourceRoot>
<inlineSchemaNameMappings>analysis_200_response=AnalysisResponse</inlineSchemaNameMappings>
<schemaMappings>PackageRef=com.redhat.exhort.api.PackageRef</schemaMappings>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
Expand Down Expand Up @@ -826,11 +801,11 @@ limitations under the License.]]>
<distributionManagement>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/RHEcosystemAppEng/exhort-java-api</url>
<url>https://maven.pkg.github.com/trustification/exhort-java-api</url>
</repository>
<snapshotRepository>
<id>github</id>
<url>https://maven.pkg.github.com/RHEcosystemAppEng/exhort-java-api</url>
<url>https://maven.pkg.github.com/trustification/exhort-java-api</url>
</snapshotRepository>
</distributionManagement>
<build>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/redhat/exhort/Api.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
package com.redhat.exhort;

import com.redhat.exhort.api.AnalysisReport;
import com.redhat.exhort.api.v4.AnalysisReport;
import com.redhat.exhort.image.ImageRef;
import java.io.IOException;
import java.util.Arrays;
Expand Down
Loading
Loading