You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by gm...@apache.org on 2013/06/06 06:36:04 UTC

svn commit: r1490131 - in /incubator/jspwiki/trunk: build.xml jspwiki-war/build.xml

Author: gmazza
Date: Thu Jun  6 04:36:03 2013
New Revision: 1490131

URL: http://svn.apache.org/r1490131
Log:
Removed root build.xml, shunk jspwiki-war/build.xml by removing signjar stuff.

Removed:
    incubator/jspwiki/trunk/build.xml
Modified:
    incubator/jspwiki/trunk/jspwiki-war/build.xml

Modified: incubator/jspwiki/trunk/jspwiki-war/build.xml
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/jspwiki-war/build.xml?rev=1490131&r1=1490130&r2=1490131&view=diff
==============================================================================
--- incubator/jspwiki/trunk/jspwiki-war/build.xml (original)
+++ incubator/jspwiki/trunk/jspwiki-war/build.xml Thu Jun  6 04:36:03 2013
@@ -36,7 +36,7 @@
   <!-- The location for the keystore used to sign the JAR; will be created if it doesn't exist. -->
   <property name="jks.keystore" value="${basedir}/etc/jspwiki.jks" />
 
-  <!-- Define directies for the "ant dist target -->
+  <!-- Define directies for the "ant dist" target -->
   <property name="tmpdir" value="target/ant-dist/tmp" />
   <property name="release.dir" value="target/ant-dist/releases" />
   <property name="install.fulldir" value="${tmpdir}/install" />
@@ -67,47 +67,6 @@
     <mkdir dir="${release.dir}" />
   </target>
 
-  <!--  Signs the JSPWiki JAR file with a self-issued digital certificate.
-        This should only be needed when your JVM starts with a global security
-        policy. By this we mean a standard J2SE policy that is set at JVM startup
-      	using the -Djava.security.policy=/some/policy/file VM argument. If this
-      	global policy file contains references to JSPWiki permission classes
-      	(PagePermission, GroupPermission, etc) **and** you set it before JSPWiki
-      	is loaded, **then** you must do four things:
-      	  0) run this target (signjar)
-      	  1) through 3) see below
-  -->
-
-  <target name="signjar" depends="sign-init" description="Signs jar: for use with global JVM security policies">
-    <sign-jar jar="${jarfile}" />
-    <echo>
-  Congratulations -- you just signed your JAR file. We assume
-  you did this because you want to create a global security
-  policy for your entire JVM. That's fine, but please make
-  sure you configure your JVM (and container) correctly.
-  Normally, this means you should:
-
-    1) Copy ${jarfile} to a place where its classes will be
-       read at startup. (Example: for Tomcat, this is
-       $CATALINA_HOME/common/lib)
-
-    2) Copy the keystore from ${jks.keystore} to the same
-       location as your global policy. (Example: Tomcat's
-       policy is in $CATALINA_HOME/conf/catalina.policy,
-       so you would copy it to $CATALINA_HOME/conf.)
-
-    3) Add a reference to the keystore as the *first* line of
-       the global policy. It should read
-
-       keystore "jspwiki.jks";
-
-       ... or something similar.
-
-  If you have no idea what this is all about, we assume
-  that you ran this target just for fun. In that case, we
-  hope you enjoyed the experience.</echo>
-  </target>
-
   <!--
        Here goes some nice Ant magic...  We build the source
        code archive by directly exporting all code from the SVN
@@ -263,76 +222,4 @@
 
   </target>
 
-  <!-- ============================================================== -->
-
-  <!-- Targets for signing JAR files -->
-
-  <!-- These targets collectively create a Java keystore for signing,
-       and automate the jar-signing process.
-  -->
-  <target name="sign-init" depends="installinit,jks-init,jks-create,jks-password" />
-
-  <target name="jks-init">
-    <property name="jks.alias" value="jspwiki" />
-    <available file="${jks.keystore}" property="jks.exists" />
-  </target>
-
-  <target name="jks-create" unless="jks.exists">
-    <echo>
-JSPWiki needs a digital certificate for code signing its JAR files.
-Since you don't appear to have one, we need to generate a new certificate.
-Once generated, it will be used to sign the JSPWiki.jar file. To create
-the certificate, we need to ask you for your name and a few other things.
-
-The certificate file will be generated at: ${jks.keystore}.
-You should copy this file to your container's configuration directory,
-or wherever your jspwiki.policy file lives.
-
-If something in this process goes wrong, you can simply delete
-${jks.keystore} and execute this target again... no harm done.
-To automate the JAR signing processs, you can add the property
-'jks.password' to your build.properties file.
-    </echo>
-    <input message="Your name (example: Simon Bar Sinister):" addproperty="jks.cn" />
-    <input message="Your organization (example: ecyrd.com):" addproperty="jks.o" />
-    <input message="Your country (example: US, FI, AU):" addproperty="jks.c" />
-    <input message="Keystore password (>6 characters):" addproperty="jks.password" />
-    <exec dir="${basedir}" executable="keytool" failonerror="true">
-      <arg value="-genkey"/>
-      <arg value="-keysize"/>
-      <arg value="1024"/>
-      <arg value="-alias"/>
-      <arg value="${jks.alias}"/>
-      <arg value="-keystore"/>
-      <arg value="${jks.keystore}"/>
-      <arg value="-storepass"/>
-      <arg value="${jks.password}"/>
-      <arg value="-dname"/>
-      <arg value="cn=${jks.cn}, ou=JSPWiki Code Signing Division, o=${jks.o}, c=${jks.c}"/>
-    </exec>
-  </target>
-
-  <target name="jks-password" unless="jks.password">
-    <input message="Keystore password:" addproperty="jks.password" />
-  </target>
-
-  <macrodef name="sign-jar">
-     <attribute name="jar"/>
-     <sequential>
-        <echo message="Signing code with this certificate: ${jks.keystore}" />
-        <exec dir="${basedir}" executable="keytool" failonerror="true">
-           <arg value="-list"/>
-           <arg value="-v"/>
-           <arg value="-alias"/>
-           <arg value="${jks.alias}"/>
-           <arg value="-keystore"/>
-           <arg value="${jks.keystore}"/>
-           <arg value="-storepass"/>
-           <arg value="${jks.password}"/>
-        </exec>
-        <signjar jar="@{jar}" alias="jspwiki" keystore="${jks.keystore}"
-        storepass="${jks.password}" verbose="false"/>
-     </sequential>
-  </macrodef>
-
 </project>