xmlbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kkro...@apache.org
Subject svn commit: r111562 - in xmlbeans: branches/1.x branches/1.x-jdk1.3 branches/1.x-jdk1.3/src/typeimpl/org/apache/xmlbeans/impl/schema branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool branches/1.x-jdk1.3/src/xmlpublic/org/apache/xmlbeans branches/1.x/src/typeimpl/org/apache/xmlbeans/impl/schema branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool branches/1.x/src/xmlpublic/org/apache/xmlbeans trunk trunk/src/xmlpublic/org/apache/xmlbeans
Date Sat, 11 Dec 2004 01:02:50 GMT
Author: kkrouse
Date: Fri Dec 10 17:02:48 2004
New Revision: 111562

URL: http://svn.apache.org/viewcvs?view=rev&rev=111562
Log:
- null check when getting XmlBeans Package
- added version api to 1.x and 1.x-jdk1.3


Modified:
   xmlbeans/branches/1.x-jdk1.3/build.xml
   xmlbeans/branches/1.x-jdk1.3/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeLoaderBase.java
   xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/BaseSchemaResourceManager.java
   xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/CommandLine.java
   xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/FactorImports.java
   xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/InstanceValidator.java
   xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/PrettyPrinter.java
   xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/RunXQuery.java
   xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaCompiler.java
   xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaResourceManager.java
   xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/TypeHierarchyPrinter.java
   xmlbeans/branches/1.x-jdk1.3/src/xmlpublic/org/apache/xmlbeans/XmlBeans.java
   xmlbeans/branches/1.x/build.xml
   xmlbeans/branches/1.x/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeLoaderBase.java
   xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/BaseSchemaResourceManager.java
   xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/CommandLine.java
   xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/FactorImports.java
   xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/InstanceValidator.java
   xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/PrettyPrinter.java
   xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/RunXQuery.java
   xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaCompiler.java
   xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaResourceManager.java
   xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/TypeHierarchyPrinter.java
   xmlbeans/branches/1.x/src/xmlpublic/org/apache/xmlbeans/XmlBeans.java
   xmlbeans/trunk/build.xml
   xmlbeans/trunk/src/xmlpublic/org/apache/xmlbeans/XmlBeans.java
   xmlbeans/trunk/testbuild.xml

Modified: xmlbeans/branches/1.x-jdk1.3/build.xml
Url: http://svn.apache.org/viewcvs/xmlbeans/branches/1.x-jdk1.3/build.xml?view=diff&rev=111562&p1=xmlbeans/branches/1.x-jdk1.3/build.xml&r1=111561&p2=xmlbeans/branches/1.x-jdk1.3/build.xml&r2=111562
==============================================================================
--- xmlbeans/branches/1.x-jdk1.3/build.xml	(original)
+++ xmlbeans/branches/1.x-jdk1.3/build.xml	Fri Dec 10 17:02:48 2004
@@ -14,7 +14,14 @@
 <project name="Xbean" default="default" basedir=".">
 
   <property name="build.compiler" value="javac1.3"/>
-  <property name="product.version" value="1.0.3"/>
+  <property name="product.version" value="1.0.4-jdk1.3"/>
+
+  <!-- manifest entries -->
+  <property name="manifest.name" value="org/apache/xmlbeans/"/>
+  <property name="manifest.title" value="org.apache.xmlbeans"/>
+  <property name="manifest.vendor" value="Apache Software Foundation"/>
+  <property name="manifest.url" value="http://xmlbeans.apache.org/"/>
+  <property name="manifest.comment" value="Apache XmlBeans version ${product.version}"/>
 
   <target name="usage">
     <echo message="The following ant targets are defined:"/>
@@ -754,6 +761,15 @@
       <fileset dir="build/classes/xmlinputstream"/>
       <fileset dir="build/classes/repackage"/>
       <fileset dir="src/license"/>
+      <manifest>
+        <section name="${manifest.name}">
+          <attribute name="Comment" value="${manifest.comment}"/>
+          <attribute name="Implementation-Title" value="${manifest.title}"/>
+          <attribute name="Implementation-Version" value="${product.version}"/>
+          <attribute name="Implementation-Vendor" value="${manifest.vendor}"/>
+          <attribute name="Implementation-URL" value="${manifest.url}"/>
+        </section>
+      </manifest>
     </jar>
   </target>
 
@@ -783,6 +799,15 @@
       <fileset dir="build/classes/xmlpublic"/>
       <fileset dir="build/classes/xmlschema"/>
       <fileset dir="build/classes/xsdschema"/>
+      <manifest>
+        <section name="${manifest.name}">
+          <attribute name="Comment" value="${manifest.comment}"/>
+          <attribute name="Implementation-Title" value="${manifest.title}"/>
+          <attribute name="Implementation-Version" value="${product.version}"/>
+          <attribute name="Implementation-Vendor" value="${manifest.vendor}"/>
+          <attribute name="Implementation-URL" value="${manifest.url}"/>
+        </section>
+      </manifest>
     </jar>
   </target>
 

Modified: xmlbeans/branches/1.x-jdk1.3/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeLoaderBase.java
Url: http://svn.apache.org/viewcvs/xmlbeans/branches/1.x-jdk1.3/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeLoaderBase.java?view=diff&rev=111562&p1=xmlbeans/branches/1.x-jdk1.3/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeLoaderBase.java&r1=111561&p2=xmlbeans/branches/1.x-jdk1.3/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeLoaderBase.java&r2=111562
==============================================================================
--- xmlbeans/branches/1.x-jdk1.3/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeLoaderBase.java
(original)
+++ xmlbeans/branches/1.x-jdk1.3/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeLoaderBase.java
Fri Dec 10 17:02:48 2004
@@ -61,6 +61,9 @@
 
 public abstract class SchemaTypeLoaderBase implements SchemaTypeLoader
 {
+    // User-Agent: XMLBeans/1.0.4-jdk1.3 (org.apache.xmlbeans)
+    private static final String USER_AGENT = "XMLBeans/" + XmlBeans.getVersion() + " (" +
XmlBeans.getTitle() + ")";
+
     private static final Method _rootBuilder = getMethod( "org.apache.xmlbeans.impl.store.Root",
"newStore", new Class[] { SchemaTypeLoader.class, SchemaType.class, XmlOptions.class } );
     private static final Method _pathCompiler = getMethod( "org.apache.xmlbeans.impl.store.Path",
"getCompiledPath", new Class[] { String.class, XmlOptions.class } );
     private static final Method _queryCompiler = getMethod( "org.apache.xmlbeans.impl.store.Path",
"getCompiledQuery", new Class[] { String.class, XmlOptions.class } );
@@ -270,7 +273,7 @@
 
             do {
                 conn = url.openConnection();
-                conn.setRequestProperty("User-Agent", "Apache XMLBeans/1.0.3");
+                conn.setRequestProperty("User-Agent", USER_AGENT);
                 conn.setRequestProperty("Accept", "application/xml, text/xml, */*");
                 if (conn instanceof HttpURLConnection)
                 {

Modified: xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/BaseSchemaResourceManager.java
Url: http://svn.apache.org/viewcvs/xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/BaseSchemaResourceManager.java?view=diff&rev=111562&p1=xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/BaseSchemaResourceManager.java&r1=111561&p2=xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/BaseSchemaResourceManager.java&r2=111562
==============================================================================
--- xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/BaseSchemaResourceManager.java
(original)
+++ xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/BaseSchemaResourceManager.java
Fri Dec 10 17:02:48 2004
@@ -15,14 +15,15 @@
 
 package org.apache.xmlbeans.impl.tool;
 
+import org.apache.xml.xmlbeans.x2004.x02.xmlbean.xsdownload.DownloadedSchemasDocument;
+import org.apache.xml.xmlbeans.x2004.x02.xmlbean.xsdownload.DownloadedSchemasDocument.DownloadedSchemas;
+import org.apache.xml.xmlbeans.x2004.x02.xmlbean.xsdownload.DownloadedSchemaEntry;
 import org.apache.xmlbeans.impl.util.HexBin;
 import org.apache.xmlbeans.impl.common.IOUtil;
 import org.apache.xmlbeans.impl.common.NetUtils;
 import org.apache.xmlbeans.XmlOptions;
 import org.apache.xmlbeans.XmlRuntimeException;
-import org.apache.xml.xmlbeans.x2004.x02.xmlbean.xsdownload.DownloadedSchemasDocument;
-import org.apache.xml.xmlbeans.x2004.x02.xmlbean.xsdownload.DownloadedSchemasDocument.DownloadedSchemas;
-import org.apache.xml.xmlbeans.x2004.x02.xmlbean.xsdownload.DownloadedSchemaEntry;
+import org.apache.xmlbeans.XmlBeans;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -45,6 +46,9 @@
 
 public abstract class BaseSchemaResourceManager extends SchemaImportResolver
 {
+    // User-Agent: XMLBeans/1.0.4-jdk1.3 (org.apache.xmlbeans)
+    private static final String USER_AGENT = "XMLBeans/" + XmlBeans.getVersion() + " (" +
XmlBeans.getTitle() + ")";
+
     private String _defaultCopyDirectory;
     private DownloadedSchemasDocument _importsDoc;
     private Map _resourceForFilename = new HashMap();
@@ -555,7 +559,7 @@
         {
             URL url = new URL( schemaLocation );
             URLConnection conn = url.openConnection();
-            conn.setRequestProperty("User-Agent", "Apache XMLBeans/1.0.3");
+            conn.setRequestProperty("User-Agent", USER_AGENT);
             conn.setRequestProperty("Accept", "application/xml, text/xml, */*");
             DigestInputStream input = digestInputStream(conn.getInputStream());
             IOUtil.copyCompletely(input, buffer);

Modified: xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/CommandLine.java
Url: http://svn.apache.org/viewcvs/xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/CommandLine.java?view=diff&rev=111562&p1=xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/CommandLine.java&r1=111561&p2=xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/CommandLine.java&r2=111562
==============================================================================
--- xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/CommandLine.java
(original)
+++ xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/CommandLine.java
Fri Dec 10 17:02:48 2004
@@ -15,6 +15,7 @@
 
 package org.apache.xmlbeans.impl.tool;
 
+import org.apache.xmlbeans.XmlBeans;
 import org.apache.xmlbeans.impl.common.IOUtil;
 import org.apache.xmlbeans.impl.common.NetUtils;
 import org.apache.xmlbeans.impl.common.SequencedHashMap;
@@ -67,6 +68,11 @@
         {
             System.out.println("License available in this JAR in license.txt");
         }
+    }
+
+    public static void printVersion()
+    {
+        System.out.println(XmlBeans.getVendor() + ", " + XmlBeans.getTitle() + ".XmlBeans
version " + XmlBeans.getVersion());
     }
 
     private Map _options;

Modified: xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/FactorImports.java
Url: http://svn.apache.org/viewcvs/xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/FactorImports.java?view=diff&rev=111562&p1=xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/FactorImports.java&r1=111561&p2=xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/FactorImports.java&r2=111562
==============================================================================
--- xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/FactorImports.java
(original)
+++ xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/FactorImports.java
Fri Dec 10 17:02:48 2004
@@ -60,6 +60,13 @@
             return;
         }
 
+        if (cl.getOpt("version") != null)
+        {
+            CommandLine.printVersion();
+            System.exit(0);
+            return;
+        }
+
         args = cl.args();
         if (args.length != 1)
         {

Modified: xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/InstanceValidator.java
Url: http://svn.apache.org/viewcvs/xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/InstanceValidator.java?view=diff&rev=111562&p1=xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/InstanceValidator.java&r1=111561&p2=xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/InstanceValidator.java&r2=111562
==============================================================================
--- xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/InstanceValidator.java
(original)
+++ xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/InstanceValidator.java
Fri Dec 10 17:02:48 2004
@@ -51,6 +51,20 @@
             return;
         }
         
+        if (cl.getOpt("license") != null)
+        {
+            CommandLine.printLicense();
+            System.exit(0);
+            return;
+        }
+
+        if (cl.getOpt("version") != null)
+        {
+            CommandLine.printVersion();
+            System.exit(0);
+            return;
+        }
+
         boolean dl = (cl.getOpt("dl") != null);
         boolean nopvr = (cl.getOpt("nopvr") != null);
         boolean noupa = (cl.getOpt("noupa") != null);

Modified: xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/PrettyPrinter.java
Url: http://svn.apache.org/viewcvs/xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/PrettyPrinter.java?view=diff&rev=111562&p1=xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/PrettyPrinter.java&r1=111561&p2=xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/PrettyPrinter.java&r2=111562
==============================================================================
--- xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/PrettyPrinter.java
(original)
+++ xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/PrettyPrinter.java
Fri Dec 10 17:02:48 2004
@@ -33,6 +33,13 @@
             System.exit(0);
             return;
         }
+
+        if (cl.getOpt("version") != null)
+        {
+            CommandLine.printVersion();
+            System.exit(0);
+            return;
+        }
         
         if (cl.args().length == 0)
         {

Modified: xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/RunXQuery.java
Url: http://svn.apache.org/viewcvs/xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/RunXQuery.java?view=diff&rev=111562&p1=xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/RunXQuery.java&r1=111561&p2=xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/RunXQuery.java&r2=111562
==============================================================================
--- xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/RunXQuery.java
(original)
+++ xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/RunXQuery.java
Fri Dec 10 17:02:48 2004
@@ -35,6 +35,13 @@
             return;
         }
 
+        if (cl.getOpt("version") != null)
+        {
+            CommandLine.printVersion();
+            System.exit(0);
+            return;
+        }
+
         args = cl.args();
         
         if (args.length == 0)
@@ -203,4 +210,4 @@
             }
         }
     }
-}
\ No newline at end of file
+}

Modified: xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaCompiler.java
Url: http://svn.apache.org/viewcvs/xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaCompiler.java?view=diff&rev=111562&p1=xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaCompiler.java&r1=111561&p2=xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaCompiler.java&r2=111562
==============================================================================
--- xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaCompiler.java
(original)
+++ xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaCompiler.java
Fri Dec 10 17:02:48 2004
@@ -65,6 +65,7 @@
             System.out.println("    -debug - compile with debug symbols");
             System.out.println("    -quiet - print fewer informational messages");
             System.out.println("    -verbose - print more informational messages");
+            System.out.println("    -version - prints version information");
             System.out.println("    -license - prints license information");
             System.out.println("    -allowmdef \"[ns] [ns] [ns]\" - ignores multiple defs
in given namespaces");
             /* Undocumented feature - pass in one schema compiler extension and related parameters
@@ -97,6 +98,13 @@
         if (cl.getOpt("license") != null)
         {
             CommandLine.printLicense();
+            System.exit(0);
+            return;
+        }
+
+        if (cl.getOpt("version") != null)
+        {
+            CommandLine.printVersion();
             System.exit(0);
             return;
         }

Modified: xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaResourceManager.java
Url: http://svn.apache.org/viewcvs/xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaResourceManager.java?view=diff&rev=111562&p1=xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaResourceManager.java&r1=111561&p2=xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaResourceManager.java&r2=111562
==============================================================================
--- xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaResourceManager.java
(original)
+++ xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaResourceManager.java
Fri Dec 10 17:02:48 2004
@@ -59,6 +59,13 @@
             System.exit(0);
             return;
         }
+
+        if (cl.getOpt("version") != null)
+        {
+            CommandLine.printVersion();
+            System.exit(0);
+            return;
+        }
         
         args = cl.args();
 

Modified: xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/TypeHierarchyPrinter.java
Url: http://svn.apache.org/viewcvs/xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/TypeHierarchyPrinter.java?view=diff&rev=111562&p1=xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/TypeHierarchyPrinter.java&r1=111561&p2=xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/TypeHierarchyPrinter.java&r2=111562
==============================================================================
--- xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/TypeHierarchyPrinter.java
(original)
+++ xmlbeans/branches/1.x-jdk1.3/src/xmlcomp/org/apache/xmlbeans/impl/tool/TypeHierarchyPrinter.java
Fri Dec 10 17:02:48 2004
@@ -46,6 +46,14 @@
             System.exit(0);
             return;
         }
+
+        if (cl.getOpt("version") != null)
+        {
+            CommandLine.printVersion();
+            System.exit(0);
+            return;
+        }
+
         if (cl.args().length == 0)
         {
             System.out.println("Prints inheritance hierarchy of types defined in a schema.");

Modified: xmlbeans/branches/1.x-jdk1.3/src/xmlpublic/org/apache/xmlbeans/XmlBeans.java
Url: http://svn.apache.org/viewcvs/xmlbeans/branches/1.x-jdk1.3/src/xmlpublic/org/apache/xmlbeans/XmlBeans.java?view=diff&rev=111562&p1=xmlbeans/branches/1.x-jdk1.3/src/xmlpublic/org/apache/xmlbeans/XmlBeans.java&r1=111561&p2=xmlbeans/branches/1.x-jdk1.3/src/xmlpublic/org/apache/xmlbeans/XmlBeans.java&r2=111562
==============================================================================
--- xmlbeans/branches/1.x-jdk1.3/src/xmlpublic/org/apache/xmlbeans/XmlBeans.java	(original)
+++ xmlbeans/branches/1.x-jdk1.3/src/xmlpublic/org/apache/xmlbeans/XmlBeans.java	Fri Dec 10
17:02:48 2004
@@ -27,6 +27,51 @@
  */
 public final class XmlBeans
 {
+    private static String XMLBEANS_TITLE = "org.apache.xmlbeans";
+    private static String XMLBEANS_VERSION = "1.0.4-jdk1.3";
+    private static String XMLBEANS_VENDOR = "Apache Software Foundation";
+
+    static
+    {
+        Package pkg = XmlBeans.class.getPackage();
+        if (pkg != null)
+        {
+            XMLBEANS_TITLE = pkg.getImplementationTitle();
+            XMLBEANS_VERSION = pkg.getImplementationVersion();
+            XMLBEANS_VENDOR = pkg.getImplementationVendor();
+        }
+    }
+
+    /**
+     * Returns the XmlBeans Package title, "org.apache.xmlbeans",
+     * the value of
+     * {@link Package#getImplementationTitle() XmlBeans.class.getPackage().getImplementationTitle()}.
+     */
+    public static final String getTitle()
+    {
+        return XMLBEANS_TITLE;
+    }
+
+    /**
+     * Returns the XmlBeans vendor, "Apache Software Foundation",
+     * the value of
+     * {@link Package#getImplementationVendor() XmlBeans.class.getPackage().getImplementationVendor()}.
+     */
+    public static final String getVendor()
+    {
+        return XMLBEANS_VENDOR;
+    }
+
+    /**
+     * Returns the XmlBeans version, "1.0.4-jdk1.3",
+     * the value of
+     * {@link Package#getImplementationVersion() XmlBeans.class.getPackage().getImplementationVersion()}.
+     */
+    public static final String getVersion()
+    {
+        return XMLBEANS_VERSION;
+    }
+
     /**
      * Thread local QName cache for general use
      */

Modified: xmlbeans/branches/1.x/build.xml
Url: http://svn.apache.org/viewcvs/xmlbeans/branches/1.x/build.xml?view=diff&rev=111562&p1=xmlbeans/branches/1.x/build.xml&r1=111561&p2=xmlbeans/branches/1.x/build.xml&r2=111562
==============================================================================
--- xmlbeans/branches/1.x/build.xml	(original)
+++ xmlbeans/branches/1.x/build.xml	Fri Dec 10 17:02:48 2004
@@ -14,7 +14,14 @@
 <project name="Xbean" default="default" basedir=".">
 
   <property name="build.compiler" value="javac1.4"/>
-  <property name="product.version" value="1.0.3"/>
+  <property name="product.version" value="1.0.4"/>
+
+  <!-- manifest entries -->
+  <property name="manifest.name" value="org/apache/xmlbeans/"/>
+  <property name="manifest.title" value="org.apache.xmlbeans"/>
+  <property name="manifest.vendor" value="Apache Software Foundation"/>
+  <property name="manifest.url" value="http://xmlbeans.apache.org/"/>
+  <property name="manifest.comment" value="Apache XmlBeans version ${product.version}"/>
 
   <target name="usage">
     <echo message="The following ant targets are defined:"/>
@@ -720,6 +727,15 @@
       <fileset dir="build/classes/xmlinputstream"/>
       <fileset dir="build/classes/repackage"/>
       <fileset dir="src/license"/>
+      <manifest>
+        <section name="${manifest.name}">
+          <attribute name="Comment" value="${manifest.comment}"/>
+          <attribute name="Implementation-Title" value="${manifest.title}"/>
+          <attribute name="Implementation-Version" value="${product.version}"/>
+          <attribute name="Implementation-Vendor" value="${manifest.vendor}"/>
+          <attribute name="Implementation-URL" value="${manifest.url}"/>
+        </section>
+      </manifest>
     </jar>
   </target>
 
@@ -749,6 +765,15 @@
       <fileset dir="build/classes/xmlpublic"/>
       <fileset dir="build/classes/xmlschema"/>
       <fileset dir="build/classes/xsdschema"/>
+      <manifest>
+        <section name="${manifest.name}">
+          <attribute name="Comment" value="${manifest.comment}"/>
+          <attribute name="Implementation-Title" value="${manifest.title}"/>
+          <attribute name="Implementation-Version" value="${product.version}"/>
+          <attribute name="Implementation-Vendor" value="${manifest.vendor}"/>
+          <attribute name="Implementation-URL" value="${manifest.url}"/>
+        </section>
+      </manifest>
     </jar>
   </target>
 

Modified: xmlbeans/branches/1.x/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeLoaderBase.java
Url: http://svn.apache.org/viewcvs/xmlbeans/branches/1.x/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeLoaderBase.java?view=diff&rev=111562&p1=xmlbeans/branches/1.x/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeLoaderBase.java&r1=111561&p2=xmlbeans/branches/1.x/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeLoaderBase.java&r2=111562
==============================================================================
--- xmlbeans/branches/1.x/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeLoaderBase.java
(original)
+++ xmlbeans/branches/1.x/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeLoaderBase.java
Fri Dec 10 17:02:48 2004
@@ -31,6 +31,7 @@
 import org.apache.xmlbeans.XmlObject;
 import org.apache.xmlbeans.XmlOptions;
 import org.apache.xmlbeans.XmlFactoryHook;
+import org.apache.xmlbeans.XmlBeans;
 
 import java.lang.reflect.Method;
 import java.lang.reflect.InvocationTargetException;
@@ -57,6 +58,9 @@
 
 public abstract class SchemaTypeLoaderBase implements SchemaTypeLoader
 {
+    // User-Agent: XMLBeans/1.0.4 (org.apache.xmlbeans)
+    private static final String USER_AGENT = "XMLBeans/" + XmlBeans.getVersion() + " (" +
XmlBeans.getTitle() + ")";
+
     private static final Method _rootBuilder = getMethod( "org.apache.xmlbeans.impl.store.Root",
"newStore", new Class[] { SchemaTypeLoader.class, SchemaType.class, XmlOptions.class } );
     private static final Method _pathCompiler = getMethod( "org.apache.xmlbeans.impl.store.Path",
"getCompiledPath", new Class[] { String.class, XmlOptions.class } );
     private static final Method _queryCompiler = getMethod( "org.apache.xmlbeans.impl.store.Path",
"getCompiledQuery", new Class[] { String.class, XmlOptions.class } );
@@ -259,7 +263,7 @@
 
             do {
                 conn = url.openConnection();
-                conn.addRequestProperty("User-Agent", "Apache XMLBeans/1.0.3");
+                conn.addRequestProperty("User-Agent", USER_AGENT);
                 conn.addRequestProperty("Accept", "application/xml, text/xml, */*");
                 if (conn instanceof HttpURLConnection)
                 {

Modified: xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/BaseSchemaResourceManager.java
Url: http://svn.apache.org/viewcvs/xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/BaseSchemaResourceManager.java?view=diff&rev=111562&p1=xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/BaseSchemaResourceManager.java&r1=111561&p2=xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/BaseSchemaResourceManager.java&r2=111562
==============================================================================
--- xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/BaseSchemaResourceManager.java
(original)
+++ xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/BaseSchemaResourceManager.java
Fri Dec 10 17:02:48 2004
@@ -15,12 +15,13 @@
 
 package org.apache.xmlbeans.impl.tool;
 
-import org.apache.xmlbeans.impl.util.HexBin;
-import org.apache.xmlbeans.impl.common.IOUtil;
-import org.apache.xmlbeans.XmlOptions;
 import org.apache.xml.xmlbeans.x2004.x02.xmlbean.xsdownload.DownloadedSchemasDocument;
 import org.apache.xml.xmlbeans.x2004.x02.xmlbean.xsdownload.DownloadedSchemasDocument.DownloadedSchemas;
 import org.apache.xml.xmlbeans.x2004.x02.xmlbean.xsdownload.DownloadedSchemaEntry;
+import org.apache.xmlbeans.impl.util.HexBin;
+import org.apache.xmlbeans.impl.common.IOUtil;
+import org.apache.xmlbeans.XmlOptions;
+import org.apache.xmlbeans.XmlBeans;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -44,6 +45,9 @@
 
 public abstract class BaseSchemaResourceManager extends SchemaImportResolver
 {
+    // User-Agent: XMLBeans/1.0.4 (org.apache.xmlbeans)
+    private static final String USER_AGENT = "XMLBeans/" + XmlBeans.getVersion() + " (" +
XmlBeans.getTitle() + ")";
+
     private String _defaultCopyDirectory;
     private DownloadedSchemasDocument _importsDoc;
     private Map _resourceForFilename = new HashMap();
@@ -554,7 +558,7 @@
         {
             URL url = new URL( schemaLocation );
             URLConnection conn = url.openConnection();
-            conn.addRequestProperty("User-Agent", "Apache XMLBeans/1.0.3");
+            conn.addRequestProperty("User-Agent", USER_AGENT);
             conn.addRequestProperty("Accept", "application/xml, text/xml, */*");
             DigestInputStream input = digestInputStream(conn.getInputStream());
             IOUtil.copyCompletely(input, buffer);

Modified: xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/CommandLine.java
Url: http://svn.apache.org/viewcvs/xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/CommandLine.java?view=diff&rev=111562&p1=xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/CommandLine.java&r1=111561&p2=xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/CommandLine.java&r2=111562
==============================================================================
--- xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/CommandLine.java	(original)
+++ xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/CommandLine.java	Fri Dec
10 17:02:48 2004
@@ -15,6 +15,7 @@
 
 package org.apache.xmlbeans.impl.tool;
 
+import org.apache.xmlbeans.XmlBeans;
 import org.apache.xmlbeans.impl.common.IOUtil;
 
 import java.util.Map;
@@ -67,6 +68,11 @@
         {
             System.out.println("License available in this JAR in license.txt");
         }
+    }
+
+    public static void printVersion()
+    {
+        System.out.println(XmlBeans.getVendor() + ", " + XmlBeans.getTitle() + ".XmlBeans
version " + XmlBeans.getVersion());
     }
 
     private Map _options;

Modified: xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/FactorImports.java
Url: http://svn.apache.org/viewcvs/xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/FactorImports.java?view=diff&rev=111562&p1=xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/FactorImports.java&r1=111561&p2=xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/FactorImports.java&r2=111562
==============================================================================
--- xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/FactorImports.java	(original)
+++ xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/FactorImports.java	Fri
Dec 10 17:02:48 2004
@@ -59,6 +59,13 @@
             return;
         }
 
+        if (cl.getOpt("version") != null)
+        {
+            CommandLine.printVersion();
+            System.exit(0);
+            return;
+        }
+
         args = cl.args();
         if (args.length != 1)
         {

Modified: xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/InstanceValidator.java
Url: http://svn.apache.org/viewcvs/xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/InstanceValidator.java?view=diff&rev=111562&p1=xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/InstanceValidator.java&r1=111561&p2=xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/InstanceValidator.java&r2=111562
==============================================================================
--- xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/InstanceValidator.java
(original)
+++ xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/InstanceValidator.java
Fri Dec 10 17:02:48 2004
@@ -51,6 +51,20 @@
             return;
         }
         
+        if (cl.getOpt("license") != null)
+        {
+            CommandLine.printLicense();
+            System.exit(0);
+            return;
+        }
+
+        if (cl.getOpt("version") != null)
+        {
+            CommandLine.printVersion();
+            System.exit(0);
+            return;
+        }
+
         boolean dl = (cl.getOpt("dl") != null);
         boolean nopvr = (cl.getOpt("nopvr") != null);
         boolean noupa = (cl.getOpt("noupa") != null);

Modified: xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/PrettyPrinter.java
Url: http://svn.apache.org/viewcvs/xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/PrettyPrinter.java?view=diff&rev=111562&p1=xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/PrettyPrinter.java&r1=111561&p2=xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/PrettyPrinter.java&r2=111562
==============================================================================
--- xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/PrettyPrinter.java	(original)
+++ xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/PrettyPrinter.java	Fri
Dec 10 17:02:48 2004
@@ -33,6 +33,13 @@
             System.exit(0);
             return;
         }
+
+        if (cl.getOpt("version") != null)
+        {
+            CommandLine.printVersion();
+            System.exit(0);
+            return;
+        }
         
         if (cl.args().length == 0)
         {

Modified: xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/RunXQuery.java
Url: http://svn.apache.org/viewcvs/xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/RunXQuery.java?view=diff&rev=111562&p1=xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/RunXQuery.java&r1=111561&p2=xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/RunXQuery.java&r2=111562
==============================================================================
--- xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/RunXQuery.java	(original)
+++ xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/RunXQuery.java	Fri Dec
10 17:02:48 2004
@@ -35,6 +35,13 @@
             return;
         }
 
+        if (cl.getOpt("version") != null)
+        {
+            CommandLine.printVersion();
+            System.exit(0);
+            return;
+        }
+
         args = cl.args();
         
         if (args.length == 0)
@@ -203,4 +210,4 @@
             }
         }
     }
-}
\ No newline at end of file
+}

Modified: xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaCompiler.java
Url: http://svn.apache.org/viewcvs/xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaCompiler.java?view=diff&rev=111562&p1=xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaCompiler.java&r1=111561&p2=xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaCompiler.java&r2=111562
==============================================================================
--- xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaCompiler.java	(original)
+++ xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaCompiler.java	Fri
Dec 10 17:02:48 2004
@@ -63,6 +63,7 @@
             System.out.println("    -debug - compile with debug symbols");
             System.out.println("    -quiet - print fewer informational messages");
             System.out.println("    -verbose - print more informational messages");
+            System.out.println("    -version - prints version information");
             System.out.println("    -license - prints license information");
             System.out.println("    -allowmdef \"[ns] [ns] [ns]\" - ignores multiple defs
in given namespaces");
             /* Undocumented feature - pass in one schema compiler extension and related parameters
@@ -95,6 +96,13 @@
         if (cl.getOpt("license") != null)
         {
             CommandLine.printLicense();
+            System.exit(0);
+            return;
+        }
+
+        if (cl.getOpt("version") != null)
+        {
+            CommandLine.printVersion();
             System.exit(0);
             return;
         }

Modified: xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaResourceManager.java
Url: http://svn.apache.org/viewcvs/xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaResourceManager.java?view=diff&rev=111562&p1=xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaResourceManager.java&r1=111561&p2=xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaResourceManager.java&r2=111562
==============================================================================
--- xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaResourceManager.java
(original)
+++ xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaResourceManager.java
Fri Dec 10 17:02:48 2004
@@ -59,6 +59,13 @@
             System.exit(0);
             return;
         }
+
+        if (cl.getOpt("version") != null)
+        {
+            CommandLine.printVersion();
+            System.exit(0);
+            return;
+        }
         
         args = cl.args();
 

Modified: xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/TypeHierarchyPrinter.java
Url: http://svn.apache.org/viewcvs/xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/TypeHierarchyPrinter.java?view=diff&rev=111562&p1=xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/TypeHierarchyPrinter.java&r1=111561&p2=xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/TypeHierarchyPrinter.java&r2=111562
==============================================================================
--- xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/TypeHierarchyPrinter.java
(original)
+++ xmlbeans/branches/1.x/src/xmlcomp/org/apache/xmlbeans/impl/tool/TypeHierarchyPrinter.java
Fri Dec 10 17:02:48 2004
@@ -46,6 +46,14 @@
             System.exit(0);
             return;
         }
+
+        if (cl.getOpt("version") != null)
+        {
+            CommandLine.printVersion();
+            System.exit(0);
+            return;
+        }
+
         if (cl.args().length == 0)
         {
             System.out.println("Prints inheritance hierarchy of types defined in a schema.");

Modified: xmlbeans/branches/1.x/src/xmlpublic/org/apache/xmlbeans/XmlBeans.java
Url: http://svn.apache.org/viewcvs/xmlbeans/branches/1.x/src/xmlpublic/org/apache/xmlbeans/XmlBeans.java?view=diff&rev=111562&p1=xmlbeans/branches/1.x/src/xmlpublic/org/apache/xmlbeans/XmlBeans.java&r1=111561&p2=xmlbeans/branches/1.x/src/xmlpublic/org/apache/xmlbeans/XmlBeans.java&r2=111562
==============================================================================
--- xmlbeans/branches/1.x/src/xmlpublic/org/apache/xmlbeans/XmlBeans.java	(original)
+++ xmlbeans/branches/1.x/src/xmlpublic/org/apache/xmlbeans/XmlBeans.java	Fri Dec 10 17:02:48
2004
@@ -27,6 +27,51 @@
  */
 public final class XmlBeans
 {
+    private static String XMLBEANS_TITLE = "org.apache.xmlbeans";
+    private static String XMLBEANS_VERSION = "1.0.4";
+    private static String XMLBEANS_VENDOR = "Apache Software Foundation";
+
+    static
+    {
+        Package pkg = XmlBeans.class.getPackage();
+        if (pkg != null)
+        {
+            XMLBEANS_TITLE = pkg.getImplementationTitle();
+            XMLBEANS_VERSION = pkg.getImplementationVersion();
+            XMLBEANS_VENDOR = pkg.getImplementationVendor();
+        }
+    }
+
+    /**
+     * Returns the XmlBeans Package title, "org.apache.xmlbeans",
+     * the value of
+     * {@link Package#getImplementationTitle() XmlBeans.class.getPackage().getImplementationTitle()}.
+     */
+    public static final String getTitle()
+    {
+        return XMLBEANS_TITLE;
+    }
+
+    /**
+     * Returns the XmlBeans vendor, "Apache Software Foundation",
+     * the value of
+     * {@link Package#getImplementationVendor() XmlBeans.class.getPackage().getImplementationVendor()}.
+     */
+    public static final String getVendor()
+    {
+        return XMLBEANS_VENDOR;
+    }
+
+    /**
+     * Returns the XmlBeans version, "1.0.4",
+     * the value of
+     * {@link Package#getImplementationVersion() XmlBeans.class.getPackage().getImplementationVersion()}.
+     */
+    public static final String getVersion()
+    {
+        return XMLBEANS_VERSION;
+    }
+
     /**
      * Thread local QName cache for general use
      */

Modified: xmlbeans/trunk/build.xml
Url: http://svn.apache.org/viewcvs/xmlbeans/trunk/build.xml?view=diff&rev=111562&p1=xmlbeans/trunk/build.xml&r1=111561&p2=xmlbeans/trunk/build.xml&r2=111562
==============================================================================
--- xmlbeans/trunk/build.xml	(original)
+++ xmlbeans/trunk/build.xml	Fri Dec 10 17:02:48 2004
@@ -10,7 +10,6 @@
   <!-- manifest entries -->
   <property name="manifest.name" value="org/apache/xmlbeans/"/>
   <property name="manifest.title" value="org.apache.xmlbeans"/>
-  <property name="manifest.version" value="2.0.0"/>
   <property name="manifest.vendor" value="Apache Software Foundation"/>
   <property name="manifest.url" value="http://xmlbeans.apache.org/"/>
   <property name="manifest.comment" value="Apache XmlBeans version ${product.version}"/>
@@ -20,13 +19,13 @@
 
   <target name="usage">
     <echo message="The following ant targets are defined:"/>
-    <echo message="usage    - this help text"/>
-    <echo message="deploy   - builds our implementation jar (xbean.jar)"/>
-    <echo message="clean    - cleans out the xbeans directories"/>
-    <!--
-    <echo message="builddrt - builds, but does not run, the xbean drt"/>
-    <echo message="drt      - runs the xbean drt"/>
-    -->
+    <echo/>
+    <echo message="usage       - this help text"/>
+    <echo message="deploy      - builds our implementation jar (xbean.jar)"/>
+    <echo message="clean       - cleans out the xbeans directories"/>
+    <echo/>
+    <echo message="testbuild   - builds, but does not run, the xbean drt"/>
+    <echo message="checkintest - runs the xbean tests"/>
   </target>
 
   <target name="java_version">
@@ -132,7 +131,6 @@
     <mkdir dir="build/test/output"/>
   </target>
 
-  <!--  <target name="default" depends="deploy, builddrt"/> -->
   <target name="default" depends="deploy"/>
   <target name="redeploy" depends="clean, deploy"/>
 
@@ -332,7 +330,7 @@
         <section name="${manifest.name}">
           <attribute name="Comment" value="${manifest.comment}"/>
           <attribute name="Implementation-Title" value="${manifest.title}"/>
-          <attribute name="Implementation-Version" value="${manifest.version}"/>
+          <attribute name="Implementation-Version" value="${product.version}"/>
           <attribute name="Implementation-Vendor" value="${manifest.vendor}"/>
           <attribute name="Implementation-URL" value="${manifest.url}"/>
         </section>
@@ -379,7 +377,7 @@
         <section name="${manifest.name}">
           <attribute name="Comment" value="${manifest.comment}"/>
           <attribute name="Implementation-Title" value="${manifest.title}"/>
-          <attribute name="Implementation-Version" value="${manifest.version}"/>
+          <attribute name="Implementation-Version" value="${product.version}"/>
           <attribute name="Implementation-Vendor" value="${manifest.vendor}"/>
           <attribute name="Implementation-URL" value="${manifest.url}"/>
         </section>

Modified: xmlbeans/trunk/src/xmlpublic/org/apache/xmlbeans/XmlBeans.java
Url: http://svn.apache.org/viewcvs/xmlbeans/trunk/src/xmlpublic/org/apache/xmlbeans/XmlBeans.java?view=diff&rev=111562&p1=xmlbeans/trunk/src/xmlpublic/org/apache/xmlbeans/XmlBeans.java&r1=111561&p2=xmlbeans/trunk/src/xmlpublic/org/apache/xmlbeans/XmlBeans.java&r2=111562
==============================================================================
--- xmlbeans/trunk/src/xmlpublic/org/apache/xmlbeans/XmlBeans.java	(original)
+++ xmlbeans/trunk/src/xmlpublic/org/apache/xmlbeans/XmlBeans.java	Fri Dec 10 17:02:48 2004
@@ -31,26 +31,18 @@
  */
 public final class XmlBeans
 {
-    private static String XMLBEANS_TITLE;
-    private static String XMLBEANS_VERSION;
-    private static String XMLBEANS_VENDOR;
+    private static String XMLBEANS_TITLE = "org.apache.xmlbeans";
+    private static String XMLBEANS_VERSION = "2.0.0-beta1";
+    private static String XMLBEANS_VENDOR = "Apache Software Foundation";
 
     static
     {
         Package pkg = XmlBeans.class.getPackage();
-        XMLBEANS_TITLE = pkg.getImplementationTitle();
-        XMLBEANS_VERSION = pkg.getImplementationVersion();
-        XMLBEANS_VENDOR = pkg.getImplementationVendor();
-
-        if (XMLBEANS_TITLE == null || XMLBEANS_VERSION == null || XMLBEANS_VENDOR == null)
+        if (pkg != null)
         {
-            try {
-//                 throw new Exception("missing manifest information");
-            }
-            catch (Exception e) {
-                System.err.println("XMLBEANS DEBUG missing manifest information");
-                e.printStackTrace();
-            }
+            XMLBEANS_TITLE = pkg.getImplementationTitle();
+            XMLBEANS_VERSION = pkg.getImplementationVersion();
+            XMLBEANS_VENDOR = pkg.getImplementationVendor();
         }
     }
 

Modified: xmlbeans/trunk/testbuild.xml
Url: http://svn.apache.org/viewcvs/xmlbeans/trunk/testbuild.xml?view=diff&rev=111562&p1=xmlbeans/trunk/testbuild.xml&r1=111561&p2=xmlbeans/trunk/testbuild.xml&r2=111562
==============================================================================
--- xmlbeans/trunk/testbuild.xml	(original)
+++ xmlbeans/trunk/testbuild.xml	Fri Dec 10 17:02:48 2004
@@ -4,6 +4,10 @@
         <echo message="${java.version}"/>
     </target>
 
+    <target name="usage">
+      <echo message="See test/docs/BuildingAndRunningTests.txt"/>
+    </target>
+
     <!-- =============================================================== -->
     <!-- START: Properties Section                                       -->
 

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: commits-help@xmlbeans.apache.org


Mime
View raw message