Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make use of dash maven plugin to generate dependencies #1479

Merged
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
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