5 echo "Usage: $0 groupId artifactId version"
13 jarlist=/tmp/mkbom-jar-$$
18 for jar in $(find . -name '*.jar' -print | cut -d'/' -f2- | sort)
20 version=$(echo $jar | rev | cut -d'/' -f2 | rev)
21 artifactId=$(echo $jar | rev | cut -d'/' -f3 | rev)
22 groupId=$(echo $jar | rev | cut -d'/' -f4- | rev | tr '/' '.')
23 echo "$groupId|$artifactId|$version" >> $jarlist
29 <?xml version="1.0" encoding="UTF-8"?>
30 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
31 <modelVersion>4.0.0</modelVersion>
33 <groupId>$pomGroupId</groupId>
34 <artifactId>$pomArtifactId</artifactId>
35 <version>$pomVersion</version>
36 <packaging>pom</packaging>
38 <distributionManagement>
40 <id>ecomp-releases</id>
41 <url>https://nexus.onap.org/content/repositories/releases</url>
44 <id>ecomp-snapshots</id>
45 <url>https://nexus.onap.org/content/repositories/snapshots</url>
47 </distributionManagement>
49 <dependencyManagement>
54 lastArtifactId="UNSET"
56 for ln in $(cat $jarlist | sort -u)
59 groupId=$(echo $ln | cut -d'|' -f1)
60 artifactId=$(echo $ln | cut -d'|' -f2)
61 version=$(echo $ln | cut -d'|' -f3)
63 if [ "$lastGroupId" != "UNSET" ]
65 if [ "$lastGroupId" != "$groupId" -o "$lastArtifactId" != "$artifactId" ]
68 echo " <groupId>$lastGroupId</groupId>"
69 echo " <artifactId>$lastArtifactId</artifactId>"
70 echo " <version>$lastVersion</version>"
75 lastArtifactId=$artifactId
80 echo " <groupId>$lastGroupId</groupId>"
81 echo " <artifactId>$lastArtifactId</artifactId>"
82 echo " <version>$lastVersion</version>"
87 </dependencyManagement>
92 <groupId>org.apache.maven.plugins</groupId>
93 <artifactId>maven-deploy-plugin</artifactId>
94 <!-- This version supports the "deployAtEnd" parameter -->
95 <version>2.8</version>
98 <deployAtEnd>true</deployAtEnd>