[prev in list] [next in list] [prev in thread] [next in thread]
List: maven-dev
Subject: cvs commit: jakarta-turbine-maven/src/java/org/apache/maven/app App.java CLIManager.java
From: jvanzyl () apache ! org
Date: 2002-07-31 16:24:51
[Download RAW message or body]
jvanzyl 2002/07/31 09:24:51
Modified: . jars.list project.xml
src/java/org/apache/maven/app App.java CLIManager.java
Log:
o adding the use of the xml-commons 'which' utility which reports some
information about the environment maven is running in. Hopefully this
should help us debug problems easier as we can easily collect info
from users as they can cut and paste the output from 'maven -i'
Revision Changes Path
1.54 +1 -0 jakarta-turbine-maven/jars.list
Index: jars.list
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/jars.list,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- jars.list 27 Jul 2002 23:12:55 -0000 1.53
+++ jars.list 31 Jul 2002 16:24:50 -0000 1.54
@@ -47,3 +47,4 @@
xerces/jars/xerces-2.0.0.jar
xml-apis/jars/xml-apis-2.0.2.jar
werkz/jars/werkz-SNAPSHOT.jar
+which/jars/which-1.0.jar
1.168 +5 -0 jakarta-turbine-maven/project.xml
Index: project.xml
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/project.xml,v
retrieving revision 1.167
retrieving revision 1.168
diff -u -r1.167 -r1.168
--- project.xml 27 Jul 2002 23:12:55 -0000 1.167
+++ project.xml 31 Jul 2002 16:24:50 -0000 1.168
@@ -427,6 +427,11 @@
<url>http://jakarta.apache.org/log4j/</url>
</dependency>
+ <dependency>
+ <id>which</id>
+ <version>1.0</version>
+ </dependency>
+
<!-- this is a dependency, but as the classes ship with ant, bootstrap will
fail with linkage errors if it's included and the junit tests are not
forked
1.5 +7 -0 jakarta-turbine-maven/src/java/org/apache/maven/app/App.java
Index: App.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/app/App.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- App.java 27 Jul 2002 23:11:46 -0000 1.4
+++ App.java 31 Jul 2002 16:24:50 -0000 1.5
@@ -269,6 +269,13 @@
return;
}
+ if (getCli().hasOption("i"))
+ {
+ CLIManager.displayInfo();
+ System.out.println("");
+ return;
+ }
+
Date buildStart = new Date();
Project mavenProject = getMaven().getProject();
1.8 +16 -0 jakarta-turbine-maven/src/java/org/apache/maven/app/CLIManager.java
Index: CLIManager.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/app/CLIManager.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- CLIManager.java 27 Jul 2002 23:11:46 -0000 1.7
+++ CLIManager.java 31 Jul 2002 16:24:50 -0000 1.8
@@ -63,6 +63,8 @@
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.ParseException;
+import org.apache.env.Which;
+
/** Utility for managing and parsing Maven's command-line.
*
* <p>
@@ -134,6 +136,10 @@
options.addOption("b", "nobanner", false,
"Do not display logo banner.",
false, false);
+
+ options.addOption("i", "info", false,
+ "Display system information.",
+ false, false);
}
/** Parse a string-array of command-line arguments.
@@ -172,5 +178,15 @@
options,
"\n");
+ }
+
+ /** Display system information. This is generally useful, maybe
+ * this could be made part of CLI? But it definitely shouldn't
+ * be stuck in Maven.
+ */
+ public static void displayInfo()
+ {
+ Which env = new Which();
+ env.doMain(new String[]{});
}
}
--
To unsubscribe, e-mail: <mailto:turbine-maven-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:turbine-maven-dev-help@jakarta.apache.org>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic