You are viewing a plain text version of this content. The canonical link for it is here.
Posted to tsik-dev@ws.apache.org by ha...@apache.org on 2005/09/20 01:29:58 UTC

svn commit: r290308 - in /incubator/tsik/trunk: build.properties build.xml src/org/apache/tsik/plugins/package.html src/org/apache/tsik/wsp/JarVersion.java

Author: hans
Date: Mon Sep 19 16:29:56 2005
New Revision: 290308

URL: http://svn.apache.org/viewcvs?rev=290308&view=rev
Log:
Policy-related classes now build to a separate JAR file. Next step
is to make use of this jar in wss4j.
 

Added:
    incubator/tsik/trunk/src/org/apache/tsik/wsp/JarVersion.java
Modified:
    incubator/tsik/trunk/build.properties
    incubator/tsik/trunk/build.xml
    incubator/tsik/trunk/src/org/apache/tsik/plugins/package.html

Modified: incubator/tsik/trunk/build.properties
URL: http://svn.apache.org/viewcvs/incubator/tsik/trunk/build.properties?rev=290308&r1=290307&r2=290308&view=diff
==============================================================================
--- incubator/tsik/trunk/build.properties (original)
+++ incubator/tsik/trunk/build.properties Mon Sep 19 16:29:56 2005
@@ -36,6 +36,11 @@
 addons_packages=${addons_src}/packages.txt
 tsik_addons_jar=${lib}/tsik_addons.jar
 
+# TSIK policies are forshared with other projects.
+#
+policy_classes=org/apache/tsik/wsp/
+tsik_policy_jar=${lib}/tsik_policy.jar
+
 # test
 #
 test=./test

Modified: incubator/tsik/trunk/build.xml
URL: http://svn.apache.org/viewcvs/incubator/tsik/trunk/build.xml?rev=290308&r1=290307&r2=290308&view=diff
==============================================================================
--- incubator/tsik/trunk/build.xml (original)
+++ incubator/tsik/trunk/build.xml Mon Sep 19 16:29:56 2005
@@ -24,7 +24,7 @@
     <echo>
     Main targets:
 
-    build --> compiles TSIK core library, plugins, addons, and tests
+    build --> compiles TSIK core library, commons, plugins, addons, and tests
     clean --> cleans all built files
     api   --> creates javadocs
     test  --> runs unit tests
@@ -64,7 +64,7 @@
 
 
   <target name="build" 
-   depends="jars,test_jars,plugins_jars,addons_jars,addons_test_jars"/>
+   depends="jars, test_jars, plugins_jars, addons_jars, addons_test_jars"/>
 
   <target name="copy" depends="init">
     <copy file="${src}/org/apache/tsik/common/schemamapper.props" 
@@ -92,7 +92,18 @@
   </target>
   <target name="jars" depends="javac">
     <jar jarfile="${tsik_jar}" manifest="${data}/MANIFEST.MF">
-      <fileset dir="${classes}"/>
+      <fileset dir="${classes}">
+        <exclude name="${policy_classes}"/>
+      </fileset>
+    </jar>
+    <jar jarfile="${tsik_policy_jar}">
+      <fileset dir="${classes}">
+        <include name="${policy_classes}"/>
+        <include name="jar_version.properties"/>
+      </fileset>
+      <manifest>
+        <attribute name="Main-Class" value="org.apache.tsik.wsp.JarVersion"/>
+      </manifest>
     </jar>
   </target>
 
@@ -103,6 +114,7 @@
       <classpath location="${log4j_jar}"/>
       <classpath location="${tsik_jar}"/>
       <classpath location="${junit_jar}"/>
+      <classpath location="${tsik_policy_jar}"/>
     </javac>
   </target>
   <target name="test_jars" depends="test_javac">
@@ -201,7 +213,6 @@
     </javadoc>
   </target>
 
-
   <target name="test" depends="build">
     <junit fork="yes" dir="${test_data}" jvm="${junit_jvm}"
            printsummary="on" showoutput="on">
@@ -229,6 +240,17 @@
       <test name="org.apache.tsik.crl.test.TestCrl" todir="${reports}"/> 
       <test name="org.apache.tsik.wst.test.WstTest" todir="${reports}"/>
       <test name="org.apache.tsik.wss.test.WssTest" todir="${reports}"/>
+    </junit>
+    <junit fork="yes" dir="${test_data}" jvm="${junit_jvm}"
+           printsummary="on" showoutput="on">
+      <classpath>
+        <pathelement location="${log4j_jar}"/>
+        <pathelement location="${tsik_jar}"/>
+        <pathelement location="${lib}/tsik_test.jar"/>
+        <pathelement location="${tsik_plugins_jar}"/>
+        <pathelement location="${tsik_policy_jar}"/>
+      </classpath>
+      <formatter type="xml"/>
       <test name="org.apache.tsik.wsp.test.WspTest" todir="${reports}"/>
       <test name="org.apache.tsik.wsx.test.WsxTest" todir="${reports}"/>
     </junit>

Modified: incubator/tsik/trunk/src/org/apache/tsik/plugins/package.html
URL: http://svn.apache.org/viewcvs/incubator/tsik/trunk/src/org/apache/tsik/plugins/package.html?rev=290308&r1=290307&r2=290308&view=diff
==============================================================================
--- incubator/tsik/trunk/src/org/apache/tsik/plugins/package.html (original)
+++ incubator/tsik/trunk/src/org/apache/tsik/plugins/package.html Mon Sep 19 16:29:56 2005
@@ -4,10 +4,8 @@
 
 Pluggable TSIK functionality.
 
-TSIK plug-ins are a temporary solution to abstracts internal functionality 
-into <em>plug-ins</em> that bridge the needed internal TSIK APIs and external,
-generic components. 
-
+<p>TSIK plug-ins abstract internal functionality into <em>plug-ins</em> that 
+bridge internal TSIK APIs and external generic components.</p>
 
 </body>
 </html>

Added: incubator/tsik/trunk/src/org/apache/tsik/wsp/JarVersion.java
URL: http://svn.apache.org/viewcvs/incubator/tsik/trunk/src/org/apache/tsik/wsp/JarVersion.java?rev=290308&view=auto
==============================================================================
--- incubator/tsik/trunk/src/org/apache/tsik/wsp/JarVersion.java (added)
+++ incubator/tsik/trunk/src/org/apache/tsik/wsp/JarVersion.java Mon Sep 19 16:29:56 2005
@@ -0,0 +1,70 @@
+/* $Id: AbstractDependencyGraph.java 239271 2005-08-22 22:56:05Z hans $ */
+
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); 
+ * you may not use this file except in compliance with the License. 
+ *
+ * You may obtain a copy of the License at 
+ *   http://www.apache.org/licenses/LICENSE-2.0 
+ * 
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ *
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ *
+ */
+
+package org.apache.tsik.wsp;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.MissingResourceException;
+import java.util.Properties;
+
+/**
+ * Prints the version to standard out when invoked as a command line program.
+ * Information comes from the contents of version.properties found at top
+ * level of the jar or at the root of the classes.
+ */
+public class JarVersion
+{
+    private static final String resourceName = "/jar_version.properties";
+    private static final String propertyName = "jar_version";
+
+    /**
+     * A no-argument main entry point to print the version to standard out.
+     * @param argv is not used.
+     */
+    public static void main(String argv[])
+    {
+        System.out.println(getVersion());
+    }
+
+    public static String getVersion() 
+    {
+        return getPropertyResource().getProperty(propertyName);
+    }
+
+    private static Properties getPropertyResource() 
+    {
+        Properties result = new Properties();
+        try {
+            InputStream resourceStream =
+                JarVersion.class.getResourceAsStream(resourceName);
+            if (resourceStream==null) {
+                throw new MissingResourceException(resourceName, null,
+                                                   resourceName);
+            }
+            result.load(resourceStream);
+        } catch (IOException e) {
+	    throw new MissingResourceException(resourceName, null,
+                                               resourceName);
+        }
+	return result;
+    }
+}
+



---------------------------------------------------------------------
To unsubscribe, e-mail: tsik-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tsik-dev-help@ws.apache.org