Skip to content

Commit c3ba76c

Browse files
authored
Maven Module Updates (#27)
* Remove configuration and protocol modules and put classes in core module, make distributions build profile based * Separate exec classes from CLI classes into 2 different modules * Fix native-image references
1 parent dce76b2 commit c3ba76c

File tree

101 files changed

+1444
-1041
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+1444
-1041
lines changed

.github/workflows/maven-ci.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
run: ./mvnw --batch-mode install -D ci.build
7272
- name: Build Maven Project and Deploy Snapshot
7373
if: success() && (github.event_name == 'push' && matrix.java == '8')
74-
run: ./mvnw --batch-mode deploy -D ci.deploy -D ci.snapshot
74+
run: ./mvnw --batch-mode deploy -D ci.build -D ci.deploy -D ci.snapshot
7575
env:
7676
BINTRAY_USERNAME: ${{ secrets.BINTRAY_USERNAME }}
7777
BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY }}
@@ -82,8 +82,8 @@ jobs:
8282
if: success()
8383
uses: actions/upload-artifact@v2
8484
with:
85-
name: native-image-jar-${{ matrix.java }}
86-
path: exec/target/*-native-image.jar
85+
name: native-image-${{ matrix.java }}
86+
path: cli/target/*-native-image.jar
8787
- name: Aggregate Coverage Reports
8888
id: aggregate_coverage_reports
8989
if: success()
@@ -108,7 +108,7 @@ jobs:
108108
steps:
109109
- uses: actions/download-artifact@v2
110110
with:
111-
name: native-image-jar-8
111+
name: native-image-8
112112
path: build
113113
- name: Rename Native Image JAR
114114
working-directory: build
@@ -137,7 +137,7 @@ jobs:
137137
steps:
138138
- uses: actions/download-artifact@v2
139139
with:
140-
name: native-image-jar-11
140+
name: native-image-11
141141
path: build
142142
- name: Rename Native Image JAR
143143
working-directory: build

.github/workflows/release.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
echo ::set-output name=RELEASE_VERSION::$RELEASE_VERSION
4848
- name: Build Maven Project and Deploy Release
4949
if: success()
50-
run: ./mvnw --batch-mode deploy -D ci.deploy -D ci.release
50+
run: ./mvnw --batch-mode deploy -D ci.build -D ci.deploy -D ci.release
5151
env:
5252
BINTRAY_USERNAME: ${{ secrets.BINTRAY_USERNAME }}
5353
BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY }}
@@ -60,8 +60,8 @@ jobs:
6060
if: success()
6161
uses: actions/upload-artifact@v2
6262
with:
63-
name: native-image-jar
64-
path: exec/target/*-native-image.jar
63+
name: native-image
64+
path: cli/target/*-native-image.jar
6565
- name: Aggregate Coverage Reports
6666
id: aggregate_coverage_reports
6767
if: success()
@@ -188,15 +188,15 @@ jobs:
188188
if: success()
189189
uses: actions/upload-artifact@v2
190190
with:
191-
name: native-image-jar-java11
192-
path: exec/target/*-native-image.jar
191+
name: native-image-java11
192+
path: cli/target/*-native-image.jar
193193
build-mac-native-image:
194194
runs-on: macos-latest
195195
needs: build
196196
steps:
197197
- uses: actions/download-artifact@v2
198198
with:
199-
name: native-image-jar
199+
name: native-image
200200
path: build
201201
- name: Rename Native Image JAR
202202
working-directory: build
@@ -236,7 +236,7 @@ jobs:
236236
steps:
237237
- uses: actions/download-artifact@v2
238238
with:
239-
name: native-image-jar-java11
239+
name: native-image-java11
240240
path: build
241241
- name: Rename Native Image JAR
242242
working-directory: build

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=com.optum.sourcehawk%3Asourcehawk&metric=alert_status)](https://sonarcloud.io/dashboard?id=com.optum.sourcehawk%3Asourcehawk)
1111

1212
![OSS Lifecycle](https://img.shields.io/osslifecycle/optum/sourcehawk)
13-
[![Sonatype OSS Index](https://img.shields.io/badge/Sonatype%20OSS%20Index-sourcehawk--exec-informational)](https://ossindex.sonatype.org/component/pkg:maven/com.optum.sourcehawk/sourcehawk-exec)
13+
[![Sonatype OSS Index](https://img.shields.io/badge/Sonatype%20OSS%20Index-sourcehawk--cli-informational)](https://ossindex.sonatype.org/component/pkg:maven/com.optum.sourcehawk/sourcehawk-cli)
1414

1515
`Sourcehawk` is an extensible compliance as code tool which allows development teams to run compliance scans on their source code.
1616

bom/pom.xml

+3-26
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@
2323

2424
<dependencyManagement>
2525
<dependencies>
26-
<dependency>
27-
<groupId>com.optum.sourcehawk</groupId>
28-
<artifactId>sourcehawk-configuration</artifactId>
29-
<version>${bom.version}</version>
30-
</dependency>
3126
<dependency>
3227
<groupId>com.optum.sourcehawk</groupId>
3328
<artifactId>sourcehawk-core</artifactId>
@@ -60,32 +55,14 @@
6055
</dependency>
6156
<dependency>
6257
<groupId>com.optum.sourcehawk</groupId>
63-
<artifactId>sourcehawk-exec</artifactId>
64-
<version>${bom.version}</version>
65-
<classifier>native-image</classifier>
66-
</dependency>
67-
<dependency>
68-
<groupId>com.optum.sourcehawk</groupId>
69-
<artifactId>sourcehawk-protocol-core</artifactId>
58+
<artifactId>sourcehawk-cli</artifactId>
7059
<version>${bom.version}</version>
7160
</dependency>
7261
<dependency>
7362
<groupId>com.optum.sourcehawk</groupId>
74-
<artifactId>sourcehawk-protocol-file</artifactId>
63+
<artifactId>sourcehawk-cli</artifactId>
7564
<version>${bom.version}</version>
76-
</dependency>
77-
<dependency>
78-
<groupId>com.optum.sourcehawk</groupId>
79-
<artifactId>sourcehawk-dist-linux</artifactId>
80-
<version>${bom.version}</version>
81-
<classifier>x86_64</classifier>
82-
<type>zip</type>
83-
</dependency>
84-
<dependency>
85-
<groupId>com.optum.sourcehawk</groupId>
86-
<artifactId>sourcehawk-dist-debian</artifactId>
87-
<version>${bom.version}</version>
88-
<type>deb</type>
65+
<classifier>native-image</classifier>
8966
</dependency>
9067
</dependencies>
9168
</dependencyManagement>

cli/README.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Sourcehawk CLI
2+
Sourcehawk CLI implementation uses [Picocli](https://github.com/remkop/picocli).
3+
4+
## Picocli
5+
Picocli source code is one file: `src/main/java/picocli.picocli/CommandLine.java`. To update it to the
6+
latest version, run the following script:
7+
8+
### Updating Picocli
9+
```bash
10+
./scripts/update-picocli.picocli.sh
11+
```
12+
13+
### Picocli on GraalVM
14+
https://picocli.picocli.info/picocli.picocli-on-graalvm.html
15+

0 commit comments

Comments
 (0)