Generate dependency list 26/99426/2
authorTimoney, Dan (dt5972) <dtimoney@att.com>
Tue, 10 Dec 2019 15:30:14 +0000 (10:30 -0500)
committerTimoney, Dan (dt5972) <dtimoney@att.com>
Tue, 10 Dec 2019 21:53:55 +0000 (16:53 -0500)
Generate list of direct dependencies for repository and publish to Nexus.

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

index d61fc80..34a96c1 100755 (executable)
@@ -40,3 +40,6 @@ debug-logs/
 ccsdk-adaptors_bdio.jsonld
 blackDuckHubProjectName.txt
 blackDuckHubProjectVersionName.txt
+
+#Generated dependencies list
+direct-dependencies.txt
diff --git a/pom.xml b/pom.xml
index c8fe415..fa8254e 100755 (executable)
--- a/pom.xml
+++ b/pom.xml
 
         </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>
 
     <build>