Skip to content

Commit 0209925

Browse files
authored
Merge branch 'development' into iss1107
2 parents 793e70b + d87c559 commit 0209925

15 files changed

Lines changed: 194 additions & 164 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
7777
distribution: ${{ env.java_distribution }}
7878
cache: maven
7979
- name: setup cvmfs
80-
uses: cvmfs-contrib/github-action-cvmfs@v5
80+
uses: cvmfs-contrib/github-action-cvmfs@v5.4
8181
with:
8282
cvmfs_repositories: 'oasis.opensciencegrid.org'
8383
- name: cvmfs
@@ -128,7 +128,7 @@ jobs:
128128
java-version: ${{ matrix.JAVA_VERSION }}
129129
distribution: ${{ env.java_distribution }}
130130
cache: maven
131-
- uses: cvmfs-contrib/github-action-cvmfs@v5
131+
- uses: cvmfs-contrib/github-action-cvmfs@v5.4
132132
with:
133133
cvmfs_repositories: 'oasis.opensciencegrid.org'
134134
- name: unit tests
@@ -155,7 +155,7 @@ jobs:
155155
java-version: ${{ env.JAVA_VERSION }}
156156
distribution: ${{ env.java_distribution }}
157157
cache: maven
158-
- uses: cvmfs-contrib/github-action-cvmfs@v5
158+
- uses: cvmfs-contrib/github-action-cvmfs@v5.4
159159
with:
160160
cvmfs_repositories: 'oasis.opensciencegrid.org'
161161
- uses: actions/download-artifact@v7
@@ -177,7 +177,7 @@ jobs:
177177
java-version: ${{ env.JAVA_VERSION }}
178178
distribution: ${{ env.java_distribution }}
179179
cache: maven
180-
- uses: cvmfs-contrib/github-action-cvmfs@v5
180+
- uses: cvmfs-contrib/github-action-cvmfs@v5.4
181181
with:
182182
cvmfs_repositories: 'oasis.opensciencegrid.org'
183183
- uses: actions/download-artifact@v7
@@ -209,7 +209,7 @@ jobs:
209209
distribution: ${{ env.java_distribution }}
210210
cache: maven
211211
- name: setup cvmfs
212-
uses: cvmfs-contrib/github-action-cvmfs@v5
212+
uses: cvmfs-contrib/github-action-cvmfs@v5.4
213213
with:
214214
cvmfs_repositories: 'oasis.opensciencegrid.org'
215215
- uses: actions/download-artifact@v7
@@ -265,7 +265,7 @@ jobs:
265265
- uses: actions/download-artifact@v7
266266
with:
267267
name: build_${{ matrix.runner }}
268-
- uses: cvmfs-contrib/github-action-cvmfs@v5
268+
- uses: cvmfs-contrib/github-action-cvmfs@v5.4
269269
with:
270270
cvmfs_repositories: 'oasis.opensciencegrid.org'
271271
- name: untar build
@@ -303,27 +303,6 @@ jobs:
303303
- name: test run-groovy
304304
run: coatjava/bin/run-groovy validation/advanced-tests/test-run-groovy.groovy
305305

306-
dependency_analysis:
307-
needs: [ build ]
308-
runs-on: ubuntu-latest
309-
steps:
310-
- uses: actions/checkout@v6
311-
- name: Set up JDK
312-
uses: actions/setup-java@v5
313-
with:
314-
java-version: ${{ env.JAVA_VERSION }}
315-
distribution: ${{ env.java_distribution }}
316-
cache: maven
317-
- uses: actions/download-artifact@v7
318-
with:
319-
name: build_ubuntu-latest
320-
- name: untar build
321-
run: tar xzvf coatjava.tar.gz
322-
- name: print dependency tree
323-
run: libexec/dependency-tree.sh
324-
- name: dependency analysis
325-
run: libexec/dependency-analysis.sh
326-
327306
# documentation
328307
#############################################################################
329308

@@ -413,7 +392,6 @@ jobs:
413392
final:
414393
needs:
415394
- test_coatjava
416-
- dependency_analysis
417395
- test_run-groovy
418396
- generate_documentation
419397
runs-on: ubuntu-latest

.gitlab-ci.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,6 @@ build:
6060
- coatjava.tar.gz
6161
- clara.tar.gz
6262

63-
.depana:
64-
allow_failure: true
65-
stage: build
66-
script:
67-
- libexec/dependency-tree.sh
68-
- libexec/dependency-analysis.sh
69-
7063
download:
7164
stage: build
7265
script:

build-coatjava.sh

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ set -o pipefail
1010
################################################################################
1111

1212
cleanBuild=false
13-
anaDepends=false
1413
runSpotBugs=false
1514
downloadMaps=true
1615
downloadNets=true
@@ -46,7 +45,6 @@ DATA RETRIEVAL OPTIONS
4645
TESTING OPTIONS
4746
--spotbugs also run spotbugs plugin
4847
--unittests also run unit tests
49-
--depana run dependency analysis (only)
5048
--data download test data (requires option `--lfs`)
5149
5250
MAVEN OPTIONS
@@ -70,7 +68,10 @@ do
7068
--nonets) downloadNets=false ;;
7169
--unittests) runUnitTests=true ;;
7270
--clean) cleanBuild=true ;;
73-
--depana) anaDepends=true ;;
71+
--depana)
72+
echo "ERROR: option \`$xx\` has been removed; dependency tree printout and analysis now happen automatically in the Maven build lifecycle" >&2
73+
exit 1
74+
;;
7475
--quiet)
7576
mvnArgs+=(--quiet --batch-mode)
7677
wgetArgs+=(--quiet)
@@ -86,7 +87,7 @@ do
8687
--clara) installClara=true ;;
8788
--data) downloadData=true ;;
8889
--xrootd)
89-
echo "ERROR: option \`$xx\` is deprecated; use \`--help\` for guidance" >&2
90+
echo "ERROR: option \`$xx\` has been removed; use \`--help\` for guidance" >&2
9091
exit 1
9192
;;
9293
-h|--help)
@@ -149,13 +150,6 @@ if $cleanBuild || [ "$dataRetrieval" = "wipe" ]; then
149150
exit
150151
fi
151152

152-
# run dependency analysis and exit
153-
if $anaDepends; then
154-
libexec/dependency-analysis.sh
155-
libexec/dependency-tree.sh
156-
exit 0
157-
fi
158-
159153

160154
################################################################################
161155
# download field maps, NN models, etc.
@@ -324,9 +318,9 @@ cp external-dependencies/jclara-4.3-SNAPSHOT.jar $prefix_dir/lib/utils
324318
# build (and test)
325319
unset CLAS12DIR
326320
if $runUnitTests; then
327-
$mvn install # also runs unit tests
321+
$mvn install -DskipTests=false
328322
else
329-
$mvn install -DskipTests
323+
$mvn install
330324
fi
331325

332326
# run spotbugs

common-tools/clas-utils/src/main/java/org/jlab/utils/options/OptionValue.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,8 @@ public boolean parse(List<String> arguments){
5353
arguments.remove(index);
5454
return true;
5555
}
56+
57+
public boolean isDefault() {
58+
return this.optionValue.equals(this.optionDefault);
59+
}
5660
}

common-tools/coat-libs/pom.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,15 @@
257257
<artifactId>maven-deploy-plugin</artifactId>
258258
</plugin>
259259

260+
<!-- no need for dependency analysis for this shaded JAR -->
261+
<plugin>
262+
<groupId>org.apache.maven.plugins</groupId>
263+
<artifactId>maven-dependency-plugin</artifactId>
264+
<configuration>
265+
<skip>true</skip>
266+
</configuration>
267+
</plugin>
268+
260269
</plugins>
261270
</build>
262271

libexec/dependency-analysis.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

libexec/dependency-tree.sh

Lines changed: 0 additions & 4 deletions
This file was deleted.

pom.xml

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,18 @@
2929
</repository>
3030
</repositories>
3131

32+
<profiles>
33+
<profile> <!-- skip unit tests by default -->
34+
<id>skip-tests</id>
35+
<activation>
36+
<activeByDefault>true</activeByDefault>
37+
</activation>
38+
<properties>
39+
<skipTests>true</skipTests>
40+
</properties>
41+
</profile>
42+
</profiles>
43+
3244
<!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
3345

3446
<dependencyManagement>
@@ -251,6 +263,7 @@
251263

252264
<plugins> <!-- plugins inherited by all child POMs -->
253265

266+
<!-- static analysis -->
254267
<plugin>
255268
<groupId>com.github.spotbugs</groupId>
256269
<artifactId>spotbugs-maven-plugin</artifactId>
@@ -260,6 +273,7 @@
260273
</configuration>
261274
</plugin>
262275

276+
<!-- documentation generation -->
263277
<plugin>
264278
<groupId>org.apache.maven.plugins</groupId>
265279
<artifactId>maven-javadoc-plugin</artifactId>
@@ -280,6 +294,7 @@
280294
</executions>
281295
</plugin>
282296

297+
<!-- general settings -->
283298
<plugin>
284299
<groupId>org.apache.maven.plugins</groupId>
285300
<artifactId>maven-compiler-plugin</artifactId>
@@ -289,7 +304,6 @@
289304
<encoding>UTF-8</encoding>
290305
</configuration>
291306
</plugin>
292-
293307
<plugin>
294308
<groupId>org.apache.maven.plugins</groupId>
295309
<artifactId>maven-resources-plugin</artifactId>
@@ -299,6 +313,7 @@
299313
</configuration>
300314
</plugin>
301315

316+
<!-- JAR -->
302317
<plugin>
303318
<groupId>org.apache.maven.plugins</groupId>
304319
<artifactId>maven-jar-plugin</artifactId>
@@ -323,6 +338,35 @@
323338
</configuration>
324339
</plugin>
325340

341+
<!-- dependency analysis -->
342+
<plugin>
343+
<groupId>org.apache.maven.plugins</groupId>
344+
<artifactId>maven-dependency-plugin</artifactId>
345+
<version>3.10.0</version>
346+
<executions>
347+
<execution>
348+
<id>analyze</id>
349+
<phase>verify</phase>
350+
<goals>
351+
<goal>tree</goal>
352+
<goal>analyze-only</goal>
353+
</goals>
354+
<configuration>
355+
<failOnWarning>true</failOnWarning>
356+
<!-- ignore certain "unused but declared" warnings -->
357+
<ignoredUnusedDeclaredDependencies>
358+
<ignoredUnusedDeclaredDependency>ai.djl:model-zoo</ignoredUnusedDeclaredDependency>
359+
<ignoredUnusedDeclaredDependency>ai.djl.pytorch:pytorch-model-zoo</ignoredUnusedDeclaredDependency>
360+
<ignoredUnusedDeclaredDependency>ai.djl.pytorch:pytorch-engine</ignoredUnusedDeclaredDependency>
361+
<ignoredUnusedDeclaredDependency>ai.djl.pytorch:pytorch-native-cpu</ignoredUnusedDeclaredDependency>
362+
<ignoredUnusedDeclaredDependency>ai.djl.pytorch:pytorch-jni</ignoredUnusedDeclaredDependency>
363+
</ignoredUnusedDeclaredDependencies>
364+
</configuration>
365+
</execution>
366+
</executions>
367+
</plugin>
368+
369+
<!-- dependency convergence -->
326370
<plugin>
327371
<groupId>org.apache.maven.plugins</groupId>
328372
<artifactId>maven-enforcer-plugin</artifactId>
@@ -347,6 +391,7 @@
347391
</executions>
348392
</plugin>
349393

394+
<!-- coverage -->
350395
<plugin>
351396
<groupId>org.jacoco</groupId>
352397
<artifactId>jacoco-maven-plugin</artifactId>

reconstruction/alert/pom.xml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
<plugin>
128128
<groupId>org.apache.maven.plugins</groupId>
129129
<artifactId>maven-dependency-plugin</artifactId>
130-
<version>3.9.0</version>
130+
<version>3.10.0</version>
131131
<executions>
132132
<execution>
133133
<id>copy-dependencies</id>
@@ -141,15 +141,6 @@
141141
</configuration>
142142
</execution>
143143
</executions>
144-
<configuration>
145-
<ignoredUnusedDeclaredDependencies> <!-- tell 'dependency:analyze' to not complain that these are unused -->
146-
<ignoredUnusedDeclaredDependency>ai.djl:model-zoo</ignoredUnusedDeclaredDependency>
147-
<ignoredUnusedDeclaredDependency>ai.djl.pytorch:pytorch-model-zoo</ignoredUnusedDeclaredDependency>
148-
<ignoredUnusedDeclaredDependency>ai.djl.pytorch:pytorch-engine</ignoredUnusedDeclaredDependency>
149-
<ignoredUnusedDeclaredDependency>ai.djl.pytorch:pytorch-native-cpu</ignoredUnusedDeclaredDependency>
150-
<ignoredUnusedDeclaredDependency>ai.djl.pytorch:pytorch-jni</ignoredUnusedDeclaredDependency>
151-
</ignoredUnusedDeclaredDependencies>
152-
</configuration>
153144
</plugin>
154145
</plugins>
155146
</build>

0 commit comments

Comments
 (0)