Generate dependency list 13/99513/1
authorTimoney, Dan (dt5972) <dtimoney@att.com>
Wed, 11 Dec 2019 17:28:44 +0000 (12:28 -0500)
committerTimoney, Dan (dt5972) <dtimoney@att.com>
Wed, 11 Dec 2019 17:28:44 +0000 (12:28 -0500)
Generate list of direct dependencies for repository and publish to Nexus.

Change-Id: I068b4adde5c0d7559cbe63fe9a9e9b1b2dd31f03
Issue-ID: CCSDK-1986
Signed-off-by: Timoney, Dan (dt5972) <dtimoney@att.com>
.gitignore
pom.xml

index 48621bc..b53daa4 100644 (file)
@@ -156,3 +156,5 @@ MacOS
 **/application/blueprints
 /target/
 
+# Generated dependency list
+direct-dependencies.txt
diff --git a/pom.xml b/pom.xml
index 1e2f62f..65ee5c1 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -192,6 +192,48 @@ limitations under the License.
                 <format.skipExecute>false</format.skipExecute>
             </properties>
         </profile>
-
+        <profile>
+            <id>dependency-list</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>com.github.ferstl</groupId>
+                        <artifactId>depgraph-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>validate</phase>
+                                <inherited>false</inherited>
+                                <goals>
+                                    <goal>aggregate</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>build-helper-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>attach-artifacts</id>
+                                <phase>package</phase>
+                                <inherited>false</inherited>
+                                <goals>
+                                    <goal>attach-artifact</goal>
+                                </goals>
+                                <configuration>
+                                    <artifacts>
+                                        <artifact>
+                                            <file>${dependency-list.file}</file>
+                                            <type>txt</type>
+                                            <classifier>dependencies</classifier>
+                                        </artifact>
+                                    </artifacts>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
     </profiles>
 </project>