jcscoobyrs 2005/10/10 23:14:03
Modified: modules/core/src/java/org/openejb/alt/config
EjbValidator.java Deploy.java
Log:
Updated per David to have new approach for help and examples.
Revision Changes Path
1.13 +5 -4
openejb1/modules/core/src/java/org/openejb/alt/config/EjbValidator.java
Index: EjbValidator.java
===================================================================
RCS file:
/scm/openejb/openejb1/modules/core/src/java/org/openejb/alt/config/EjbValidator.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- EjbValidator.java 29 Aug 2005 07:52:52 -0000 1.12
+++ EjbValidator.java 11 Oct 2005 03:14:03 -0000 1.13
@@ -66,6 +66,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">David Blevins</a>
*/
public class EjbValidator {
+ private static final String helpBase = "META-INF/org.openejb.cli/";
protected static final Messages _messages = new Messages(
"org.openejb.util.resources" );
@@ -269,7 +270,7 @@
// Internationalize this
try {
- InputStream in = new URL( "resource:/openejb/validate.txt"
).openConnection().getInputStream();
+ InputStream in =
Thread.currentThread().getContextClassLoader().getResource(helpBase +
"validate.help").openConnection().getInputStream();
int b = in.read();
while (b != -1) {
@@ -294,7 +295,7 @@
// Internationalize this
try {
- InputStream in = new URL(
"resource:/openejb/validate-examples.txt" ).openConnection().getInputStream();
+ InputStream in =
Thread.currentThread().getContextClassLoader().getResource(helpBase +
"validate.examples").openConnection().getInputStream();
int b = in.read();
while (b != -1) {
@@ -336,7 +337,7 @@
v.PRINT_WARNINGS = false;
} else if (args[i].equals("-xml")){
v.PRINT_XML = true;
- } else if (args[i].equals("-help")){
+ } else if (args[i].equals("--help")){
printHelp();
} else if (args[i].equals("-examples")){
printExamples();
1.13 +5 -6
openejb1/modules/core/src/java/org/openejb/alt/config/Deploy.java
Index: Deploy.java
===================================================================
RCS file:
/scm/openejb/openejb1/modules/core/src/java/org/openejb/alt/config/Deploy.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- Deploy.java 16 Aug 2005 04:18:56 -0000 1.12
+++ Deploy.java 11 Oct 2005 03:14:03 -0000 1.13
@@ -100,6 +100,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">David Blevins</a>
*/
public class Deploy {
+ private static final String helpBase = "META-INF/org.openejb.cli/";
protected static final Messages _messages = new
Messages("org.openejb.alt.util.resources");
@@ -858,7 +859,7 @@
printExamples();
} else if (args[i].equals("-version")) {
printVersion();
- } else if (args[i].equals("-help")) {
+ } else if (args[i].equals("--help")) {
printHelp();
} else if (args[i].startsWith("-")) {
error(INCORRECT_OPTION + args[i]);
@@ -927,8 +928,7 @@
// Internationalize this
try {
- InputStream in =
- new
URL("resource:/openejb/deploy.txt").openConnection().getInputStream();
+ InputStream in =
Thread.currentThread().getContextClassLoader().getResource(helpBase +
"deploy.help").openConnection().getInputStream();
int b = in.read();
while (b != -1) {
@@ -954,8 +954,7 @@
// Internationalize this
try {
- InputStream in =
- new
URL("resource:/openejb/deploy-examples.txt").openConnection().getInputStream();
+ InputStream in =
Thread.currentThread().getContextClassLoader().getResource(helpBase +
"deploy.examples").openConnection().getInputStream();
int b = in.read();
while (b != -1) {