Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added script for finding out which Ditto artifacts are missing from t…
…he ditto-bom Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/sh | ||
# | ||
# Copyright (c) 2021 Contributors to the Eclipse Foundation | ||
# | ||
# See the NOTICE file(s) distributed with this work for additional | ||
# information regarding copyright ownership. | ||
# | ||
# This program and the accompanying materials are made available under the | ||
# terms of the Eclipse Public License 2.0 which is available at | ||
# http://www.eclipse.org/legal/epl-2.0 | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 | ||
# | ||
cd ../ | ||
|
||
mvn dependency:list -DincludeGroupIds=org.eclipse.ditto -Dsort=true -DoutputFile=dependencies.txt | ||
find . -name dependencies.txt|while read i; do cat $i;done|grep 'org.eclipse.ditto:' |tr -d '[:blank:]'|sed -e 's/(optional)//' -e 's/:compile.*/:compile/'|awk -F ':' '{print $2}'|sort|uniq > bom/ditto-modules.txt | ||
|
||
# Cleanup temp files | ||
find . -name dependencies.txt|while read i; do rm $i;done | ||
|
||
cd bom/ | ||
echo "Checking for missing dependencies from BOM. If no lines appear below, all dependencies were included. Missing from BOM are:" | ||
|
||
while read p; do | ||
if grep -Fq "<artifactId>$p" pom.xml | ||
then | ||
# do nothing | ||
printf "" | ||
else | ||
echo "org.eclipse.ditto:$p is not present in pom!" | ||
fi | ||
done <ditto-modules.txt | ||
|
||
rm ditto-modules.txt |