directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smckin...@apache.org
Subject directory-fortress-core git commit: FC-164 - Remove dependency on ant (console and cli)
Date Sat, 02 Apr 2016 13:46:13 GMT
Repository: directory-fortress-core
Updated Branches:
  refs/heads/master fcdf5cae8 -> 4d9ccc857


 FC-164 - Remove dependency on ant  (console and cli)


Project: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/commit/4d9ccc85
Tree: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/tree/4d9ccc85
Diff: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/diff/4d9ccc85

Branch: refs/heads/master
Commit: 4d9ccc8570f0cbc38599f2b46a6819f5e1987392
Parents: fcdf5ca
Author: Shawn McKinney <smckinney@apache.org>
Authored: Sat Apr 2 08:46:10 2016 -0500
Committer: Shawn McKinney <smckinney@apache.org>
Committed: Sat Apr 2 08:46:10 2016 -0500

----------------------------------------------------------------------
 pom.xml                                         | 124 ++++++-------------
 .../core/cli/CommandLineInterpreter.java        |   1 +
 .../fortress/core/FortressConsole.java          |   1 +
 3 files changed, 39 insertions(+), 87 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/4d9ccc85/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index d0ee04e..4083631 100644
--- a/pom.xml
+++ b/pom.xml
@@ -740,61 +740,36 @@
   </build>
 
   <profiles>
+
     <!-- To execute: mvn -Pconsole test -->
     <profile>
       <id>console</id>
       <build>
         <plugins>
           <plugin>
-            <artifactId>maven-antrun-plugin</artifactId>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>exec-maven-plugin</artifactId>
             <executions>
-
               <execution>
                 <phase>test</phase>
-                <configuration>
-                  <target name="fortress-console" if="true" description="Run the Fortress
Console">
-                    <echo message="############### Run Fortress Console ###############"
/>
-                    <java classname="org.apache.directory.fortress.core.FortressConsole"
fork="false" failonerror="true" dir="${basedir}" timeout="4000000" taskname="startAnt">
-                      <classpath>
-                        <pathelement location="./config" />
-                        <pathelement location="./target/classes/" />
-                        <pathelement location="./target/test-classes/" />
-                        <pathelement location="${org.apache.ant:ant-launcher:jar}" />
-                        <pathelement location="${org.apache.ant:ant:jar}" />
-                        <pathelement location="${org.openldap:accelerator-api:jar}" />
-                        <pathelement location="${org.openldap:accelerator-impl:jar}" />
-                        <pathelement location="${log4j:log4j:jar}" />
-                        <pathelement location="${org.apache.directory.api:api-all:jar}"
/>
-                        <pathelement location="${org.apache.mina:mina-core:jar}" />
-                        <pathelement location="${org.jgrapht:jgrapht-core:jar}" />
-                        <pathelement location="${org.jasypt:jasypt:jar}" />
-                        <pathelement location="${commons-configuration:commons-configuration:jar}"
/>
-                        <pathelement location="${commons-lang:commons-lang:jar}" />
-                        <pathelement location="${commons-collections:commons-collections:jar}"
/>
-                        <pathelement location="${commons-logging:commons-logging:jar}"
/>
-                        <pathelement location="${commons-io:commons-io:jar}" />
-                        <pathelement location="${commons-pool:commons-pool:jar}" />
-                        <pathelement location="${net.sf.ehcache:ehcache-core:jar}" />
-                        <pathelement location="${org.slf4j:slf4j-api:jar}" />
-                        <pathelement location="${org.slf4j:slf4j-log4j12:jar}" />
-                        <pathelement location="${antlr:antlr:jar}" />
-                        <pathelement location="${junit:junit:jar}" />
-                        <pathelement location="${org.apache.cxf:cxf-api:jar}" />
-                        <pathelement location="${javax.ws.rs:javax.ws.rs-api:jar}" />
-                        <pathelement location="${javax.ws.rs:javax.ws.rs-api:jar}" />
-                        <pathelement location="${org.apache.httpcomponents:httpclient:jar}"
/>
-                        <pathelement location="${org.apache.httpcomponents:httpcore:jar}"
/>
-                        <pathelement location="${com.sun.xml.bind:jaxb-impl:jar}" />
-                        <pathelement location="${commons-codec:commons-codec:jar}" />
-                      </classpath>
-                      <sysproperty key="version" value="${project.version}" />
-                      <sysproperty key="tenant" value="${tenant}" />
-                    </java>
-                  </target>
-                </configuration>
                 <goals>
-                  <goal>run</goal>
+                  <goal>java</goal>
                 </goals>
+                <configuration>
+                  <echo message="############### Run Fortress Console ###############"
/>
+                  <mainClass>org.apache.directory.fortress.core.FortressConsole</mainClass>
+                  <classpathScope>test</classpathScope>
+                  <systemProperties>
+                    <systemProperty>
+                      <key>version</key>
+                      <value>${project.version}</value>
+                    </systemProperty>
+                    <systemProperty>
+                      <key>tenant</key>
+                      <value>${tenant}</value>
+                    </systemProperty>
+                  </systemProperties>
+                </configuration>
               </execution>
             </executions>
           </plugin>
@@ -808,54 +783,29 @@
       <build>
         <plugins>
           <plugin>
-            <artifactId>maven-antrun-plugin</artifactId>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>exec-maven-plugin</artifactId>
             <executions>
-
               <execution>
                 <phase>test</phase>
-                <configuration>
-                  <target name="fortress-cli" if="true" description="Run the Fortress
Command Line Interface">
-                    <echo message="############### Run Fortress Command Line Interface
###############" />
-                    <java classname="org.apache.directory.fortress.core.cli.CommandLineInterpreter"
fork="false" failonerror="true" dir="${basedir}" timeout="4000000" taskname="startAnt">
-                      <classpath>
-                        <pathelement location="./config" />
-                        <pathelement location="./target/classes/" />
-                        <pathelement location="./target/test-classes/" />
-                        <pathelement location="${org.apache.ant:ant-launcher:jar}" />
-                        <pathelement location="${org.apache.ant:ant:jar}" />
-                        <pathelement location="${org.openldap:accelerator-api:jar}" />
-                        <pathelement location="${org.openldap:accelerator-impl:jar}" />
-                        <pathelement location="${log4j:log4j:jar}" />
-                        <pathelement location="${org.apache.directory.api:api-all:jar}"
/>
-                        <pathelement location="${org.apache.mina:mina-core:jar}" />
-                        <pathelement location="${org.jgrapht:jgrapht-core:jar}" />
-                        <pathelement location="${org.jasypt:jasypt:jar}" />
-                        <pathelement location="${commons-configuration:commons-configuration:jar}"
/>
-                        <pathelement location="${commons-lang:commons-lang:jar}" />
-                        <pathelement location="${commons-collections:commons-collections:jar}"
/>
-                        <pathelement location="${commons-logging:commons-logging:jar}"
/>
-                        <pathelement location="${commons-io:commons-io:jar}" />
-                        <pathelement location="${commons-pool:commons-pool:jar}" />
-                        <pathelement location="${net.sf.ehcache:ehcache-core:jar}" />
-                        <pathelement location="${org.slf4j:slf4j-api:jar}" />
-                        <pathelement location="${org.slf4j:slf4j-log4j12:jar}" />
-                        <pathelement location="${antlr:antlr:jar}" />
-                        <pathelement location="${junit:junit:jar}" />
-                        <pathelement location="${org.apache.cxf:cxf-api:jar}" />
-                        <pathelement location="${javax.ws.rs:javax.ws.rs-api:jar}" />
-                        <pathelement location="${org.apache.httpcomponents:httpclient:jar}"
/>
-                          <pathelement location="${org.apache.httpcomponents:httpcore:jar}"
/>
-                        <pathelement location="${com.sun.xml.bind:jaxb-impl:jar}" />
-                        <pathelement location="${commons-codec:commons-codec:jar}" />
-                      </classpath>
-                      <sysproperty key="version" value="${project.version}" />
-                      <sysproperty key="tenant" value="${tenant}" />
-                    </java>
-                  </target>
-                </configuration>
                 <goals>
-                  <goal>run</goal>
+                  <goal>java</goal>
                 </goals>
+                <configuration>
+                  <echo message="############### Run Fortress Command Line Interface ###############"
/>
+                  <mainClass>org.apache.directory.fortress.core.cli.CommandLineInterpreter</mainClass>
+                  <classpathScope>test</classpathScope>
+                  <systemProperties>
+                    <systemProperty>
+                      <key>version</key>
+                      <value>${project.version}</value>
+                    </systemProperty>
+                    <systemProperty>
+                      <key>tenant</key>
+                      <value>${tenant}</value>
+                    </systemProperty>
+                  </systemProperties>
+                </configuration>
               </execution>
             </executions>
           </plugin>

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/4d9ccc85/src/main/java/org/apache/directory/fortress/core/cli/CommandLineInterpreter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/cli/CommandLineInterpreter.java
b/src/main/java/org/apache/directory/fortress/core/cli/CommandLineInterpreter.java
index c7ad523..111e28f 100755
--- a/src/main/java/org/apache/directory/fortress/core/cli/CommandLineInterpreter.java
+++ b/src/main/java/org/apache/directory/fortress/core/cli/CommandLineInterpreter.java
@@ -158,6 +158,7 @@ public class CommandLineInterpreter
     {
         CommandLineInterpreter cli = new CommandLineInterpreter();
         cli.runInteractiveMode();
+        System.exit( 0 );
     }
 
 

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/4d9ccc85/src/test/java/org/apache/directory/fortress/core/FortressConsole.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/directory/fortress/core/FortressConsole.java b/src/test/java/org/apache/directory/fortress/core/FortressConsole.java
index a17de4a..1721c0a 100755
--- a/src/test/java/org/apache/directory/fortress/core/FortressConsole.java
+++ b/src/test/java/org/apache/directory/fortress/core/FortressConsole.java
@@ -37,5 +37,6 @@ public class FortressConsole
     {
         ProcessMenuCommand rc = new ProcessMenuCommand();
         rc.processRbacControl();
+        System.exit( 0 );
     }
 }


Mime
View raw message