Repository: activemq-artemis
Updated Branches:
  refs/heads/master 92d866b49 -> 47ba1f051


ARTEMIS-1931 Support web dependencies in 'create' plugin


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/8e9bcf2d
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/8e9bcf2d
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/8e9bcf2d

Branch: refs/heads/master
Commit: 8e9bcf2d60f5e6a04784c4e09f9a95339e5d5fb1
Parents: 92d866b
Author: Justin Bertram <jbert...@apache.org>
Authored: Fri Nov 17 12:19:27 2017 -0600
Committer: Clebert Suconic <clebertsuco...@apache.org>
Committed: Mon Jun 18 15:03:31 2018 -0400

----------------------------------------------------------------------
 .../artemis/maven/ArtemisCreatePlugin.java      | 23 +++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/8e9bcf2d/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ArtemisCreatePlugin.java
----------------------------------------------------------------------
diff --git 
a/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ArtemisCreatePlugin.java
 
b/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ArtemisCreatePlugin.java
index 9bbb2a1..0559500 100644
--- 
a/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ArtemisCreatePlugin.java
+++ 
b/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ArtemisCreatePlugin.java
@@ -127,6 +127,12 @@ public class ArtemisCreatePlugin extends 
ArtemisAbstractPlugin {
    @Parameter
    private String[] libListWithDeps;
 
+   @Parameter
+   private String[] webList;
+
+   @Parameter
+   private String[] webListWithDeps;
+
    @Parameter(defaultValue = "${localRepository}")
    private org.apache.maven.artifact.repository.ArtifactRepository 
localRepository;
 
@@ -261,7 +267,18 @@ public class ArtemisCreatePlugin extends 
ArtemisAbstractPlugin {
             commandLineStream.println("# This is a list of files that need to 
be installed under ./lib.");
             commandLineStream.println("# We are copying them from your maven 
lib home");
             for (File file : files) {
-               copyToLib(file, commandLineStream);
+               copyToDir("lib", file, commandLineStream);
+            }
+         }
+
+         files = resolveDependencies(webListWithDeps, webList);
+
+         if (!files.isEmpty()) {
+            commandLineStream.println();
+            commandLineStream.println("# This is a list of files that need to 
be installed under ./web.");
+            commandLineStream.println("# We are copying them from your maven 
lib home");
+            for (File file : files) {
+               copyToDir("web", file, commandLineStream);
             }
          }
 
@@ -313,8 +330,8 @@ public class ArtemisCreatePlugin extends 
ArtemisAbstractPlugin {
       return buffer.toString();
    }
 
-   private void copyToLib(File projectLib, PrintStream commandLineStream) 
throws IOException {
-      Path target = 
instance.toPath().resolve("lib").resolve(projectLib.getName());
+   private void copyToDir(String destination, File projectLib, PrintStream 
commandLineStream) throws IOException {
+      Path target = 
instance.toPath().resolve(destination).resolve(projectLib.getName());
       File file = target.toFile();
       File parent = file.getParentFile();
       if (!parent.exists()) {

Reply via email to