Skip to content

Commit

Permalink
Make use of dash maven plugin to generate dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: Marinov Avgustin <[email protected]>
  • Loading branch information
avgustinmm committed Nov 17, 2023
1 parent 0021b03 commit b43849b
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 166 deletions.
4 changes: 4 additions & 0 deletions .3rd-party/DEPENDENCIES
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ maven/mavencentral/net.minidev/json-smart/2.4.11, Apache-2.0, approved, #3288
maven/mavencentral/org.apache.commons/commons-lang3/3.12.0, Apache-2.0, approved, clearlydefined
maven/mavencentral/org.apache.logging.log4j/log4j-api/2.17.2, Apache-2.0, approved, clearlydefined
maven/mavencentral/org.apache.logging.log4j/log4j-to-slf4j/2.17.2, Apache-2.0, approved, #2163
maven/mavencentral/org.apache.tomcat.embed/tomcat-embed-core/9.0.82, Apache-2.0 AND (CDDL-1.0 OR GPL-2.0 WITH Classpath-exception-2.0), approved, CQ20188
maven/mavencentral/org.apache.tomcat.embed/tomcat-embed-el/9.0.82, Apache-2.0, approved, CQ20193
maven/mavencentral/org.apache.tomcat.embed/tomcat-embed-websocket/9.0.82, Apache-2.0, approved, CQ20194
maven/mavencentral/org.aspectj/aspectjrt/1.9.7, EPL-1.0, approved, tools.aspectj
maven/mavencentral/org.aspectj/aspectjweaver/1.9.7, EPL-1.0, approved, tools.aspectj
maven/mavencentral/org.checkerframework/checker-qual/3.19.0, MIT, approved, clearlydefined
Expand Down Expand Up @@ -97,6 +100,7 @@ maven/mavencentral/org.springframework.boot/spring-boot-starter-json/2.7.17, Apa
maven/mavencentral/org.springframework.boot/spring-boot-starter-logging/2.7.17, Apache-2.0, approved, #4327
maven/mavencentral/org.springframework.boot/spring-boot-starter-oauth2-client/2.7.17, Apache-2.0, approved, #7511
maven/mavencentral/org.springframework.boot/spring-boot-starter-oauth2-resource-server/2.7.17, Apache-2.0, approved, #4312
maven/mavencentral/org.springframework.boot/spring-boot-starter-tomcat/2.7.17, Apache-2.0, approved, #4305
maven/mavencentral/org.springframework.boot/spring-boot-starter-web/2.7.17, Apache-2.0, approved, #4304
maven/mavencentral/org.springframework.boot/spring-boot-starter/2.7.17, Apache-2.0, approved, #4308
maven/mavencentral/org.springframework.boot/spring-boot/2.7.17, Apache-2.0, approved, #4322
Expand Down
144 changes: 0 additions & 144 deletions .3rd-party/hawkbit-maven.deps

This file was deleted.

32 changes: 10 additions & 22 deletions check-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,16 @@
# SPDX-License-Identifier: EPL-2.0
#

DASH_LICENSE_JAR=$1
shift
DASH_SUMMARY=".3rd-party/DEPENDENCIES"
DASH_REVIEW_SUMMARY=".3rd-party/DEPENDENCIES_REVIEW"

if [ ! -f "$DASH_LICENSE_JAR" ]; then
echo "This script can be used to update the DEPENDENCIES"
echo "file with the result of checking the Hawkbit maven"
echo "dependencies using the Dash License Tool."
echo ""
echo "Usage: $0 <org.eclipse.dash.licenses jar path> [<other dash-tool parameters>..]"
exit 1
if [ -z "$1" ]
then
DASH_IP_LAB=
else
DASH_IP_LAB="-Ddash.review.summary=${DASH_REVIEW_SUMMARY} -Ddash.iplab.token=$1"
fi

HAWKBIT_MAVEN_DEPS=".3rd-party/hawkbit-maven.deps"
DEPENDENCIES=".3rd-party/DEPENDENCIES"

mvn dependency:list \
-DexcludeGroupIds=org.eclipse,org.junit \
-pl '!org.eclipse.hawkbit:hawkbit-repository-test,!org.eclipse.hawkbit:hawkbit-dmf-rabbitmq-test' | \
grep -Poh "\S+:(runtime|compile|provided)" | \
sed -e 's/^\(.*\)\:.*$/\1/' | \
sort | \
uniq > $HAWKBIT_MAVEN_DEPS

java -Dorg.eclipse.dash.timeout=60 -jar "${DASH_LICENSE_JAR}" -batch 90 -summary ${DEPENDENCIES} ${HAWKBIT_MAVEN_DEPS} "$@"
sort -o ${DEPENDENCIES} ${DEPENDENCIES}
mvn clean install -DskipTests -Ddash.skip=false \
--projects '!org.eclipse.hawkbit:hawkbit-repository-test,!org.eclipse.hawkbit:hawkbit-dmf-rabbitmq-test' \
-Ddash.summary=${DASH_SUMMARY} ${DASH_IP_LAB}
27 changes: 27 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,24 @@
<url>https://maven.vaadin.com/vaadin-addons</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>dash-licenses</id>
<url>https://repo.eclipse.org/content/repositories/dash-licenses</url>
</pluginRepository>
</pluginRepositories>

<properties>
<revision>0.4.0-SNAPSHOT</revision>

<dash.skip>true</dash.skip>
<dash.fail>true</dash.fail>
<dash.projectId>iot.hawkbit</dash.projectId>
<dash.summary>${project.build.directory}/dash/summary</dash.summary>
<!-- To automatically create IP Team review requests for identified content call with -Ddash.iplab.token=<token> (do not share your access token) -->
<dash.review.summary>${project.build.directory}/dash/review-summary</dash.review.summary>
<excludeGroupIds>org.eclipse,org.junit</excludeGroupIds>

<snapshotDependencyAllowed>true</snapshotDependencyAllowed>

<java.version>17</java.version>
Expand Down Expand Up @@ -374,6 +388,19 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.dash</groupId>
<artifactId>license-tool-plugin</artifactId>
<version>1.0.2</version>
<executions>
<execution>
<id>license-check</id>
<goals>
<goal>license-check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>

<pluginManagement>
Expand Down

0 comments on commit b43849b

Please sign in to comment.