jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ajaqu...@apache.org
Subject svn commit: r744498 - in /incubator/jspwiki/trunk: ./ etc/ src/WebContent/WEB-INF/ src/java/org/apache/wiki/ tests/etc/ tests/lib/
Date Sat, 14 Feb 2009 13:58:24 GMT
Author: ajaquith
Date: Sat Feb 14 13:58:24 2009
New Revision: 744498

URL: http://svn.apache.org/viewvc?rev=744498&view=rev
Log:
Re-worked build.xml so that nearly all built artifacts, including for tests and webtests,
are now produced in the "build" directory. Minor additional tweaks to prevent test classes
from being included in JSPWiki.jar, which was messing up webapp tests. Added priha.properties
to the WAR. Webtests are still broken, but less so than before. Upgraded Selenium-RC to 1.0b2;
if webtests can be actually made to work, at least we will now be able to use them with Firefox
3.

Added:
    incubator/jspwiki/trunk/etc/priha.properties
    incubator/jspwiki/trunk/tests/lib/selenium-java-client-driver-1.0b2.jar   (with props)
    incubator/jspwiki/trunk/tests/lib/selenium-server-1.0b2.jar   (with props)
Removed:
    incubator/jspwiki/trunk/tests/lib/selenium-java-client-driver-1.0-beta1.jar
    incubator/jspwiki/trunk/tests/lib/selenium-server-1.0-beta1.jar
Modified:
    incubator/jspwiki/trunk/.classpath
    incubator/jspwiki/trunk/ChangeLog
    incubator/jspwiki/trunk/build.xml
    incubator/jspwiki/trunk/etc/jspwiki.properties.tmpl
    incubator/jspwiki/trunk/src/WebContent/WEB-INF/web.xml
    incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java
    incubator/jspwiki/trunk/tests/etc/log4j.properties

Modified: incubator/jspwiki/trunk/.classpath
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/.classpath?rev=744498&r1=744497&r2=744498&view=diff
==============================================================================
--- incubator/jspwiki/trunk/.classpath (original)
+++ incubator/jspwiki/trunk/.classpath Sat Feb 14 13:58:24 2009
@@ -1,16 +1,16 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
 	<classpathentry kind="src" path="src/java"/>
-	<classpathentry kind="src" path="tests/java"/>
+	<classpathentry kind="src" output="build/testclasses" path="tests/java"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache
Tomcat v5.5"/>
 	<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
 	<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
 	<classpathentry kind="lib" path="tests/lib/jetty-plus-5.1.14.jar"/>
 	<classpathentry kind="lib" path="tests/lib/jetty-jmx-5.1.14.jar"/>
-	<classpathentry kind="lib" path="tests/lib/selenium-server-1.0-beta1.jar"/>
+	<classpathentry kind="lib" path="tests/lib/selenium-server-1.0b2.jar"/>
 	<classpathentry kind="lib" path="tests/etc"/>
-	<classpathentry kind="lib" path="tests/build"/>
 	<classpathentry kind="lib" path="tests/lib/hsqldb.jar"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
 	<classpathentry kind="output" path="build/classes"/>
 </classpath>

Modified: incubator/jspwiki/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/ChangeLog?rev=744498&r1=744497&r2=744498&view=diff
==============================================================================
--- incubator/jspwiki/trunk/ChangeLog (original)
+++ incubator/jspwiki/trunk/ChangeLog Sat Feb 14 13:58:24 2009
@@ -1,3 +1,17 @@
+2009-02-14  Andrew Jaquith <ajaquith AT apache DOT org>
+
+        * 3.0.0-svn-67
+        
+        * Re-worked build.xml so that nearly all built artifacts, including
+        for tests and webtests, are now produced in the "build" directory.
+        Minor additional tweaks to prevent test classes from being included
+        in JSPWiki.jar, which was messing up webapp tests. Added priha.properties
+        to the WAR. Webtests are still broken, but less so than before.
+        Upgraded Selenium-RC to 1.0b2; if webtests can be actually made
+        to work, at least we will now be able to use them with Firefox 3.
+        
+        * Happy Valentine's Day! Make sure to hug the one you love today. 
+
 2009-02-14  Harry Metske <metskem@apache.org>
 
         * 3.0.0-svn-66

Modified: incubator/jspwiki/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/build.xml?rev=744498&r1=744497&r2=744498&view=diff
==============================================================================
--- incubator/jspwiki/trunk/build.xml (original)
+++ incubator/jspwiki/trunk/build.xml Sat Feb 14 13:58:24 2009
@@ -78,7 +78,8 @@
 	
   <!-- The class files are actually put in this directory.  It is
        a good habit to keep .class -files separate from the .java -files. -->
-  <property name="code.build" value ="build/classes" />
+  <property name="build" location="build" />
+  <property name="code.build" value ="${build}/classes" />
 
   <!-- The internationalization strings for the core JSPWiki classes -->
   <property name="code.i18n" value="${code.web}/WEB-INF/classes" />
@@ -86,10 +87,7 @@
   <property name="tmplt.i18n.dir" value="i18n_templates" />
 
   <!-- The location for the JAR file for the core JSPWiki classes -->
-  <property name="jarfile" value="${code.build}/${ant.project.name}.jar" />
-
-  <!-- The location of the JAR file for the test classes -->
-  <property name="testjarfile" location="${code.build}/${ant.project.name}-test.jar" />
+  <property name="jarfile" value="${build}/${ant.project.name}.jar" />
 
   <!-- Define a temporary directory, based on the system temporary directory,
        the user name, and the project name (defined above) -->
@@ -101,18 +99,24 @@
 
   <property name="tests" value="tests" />
   <property name="tests.src" value="${tests}/java" />
-  <property name="tests.build" value="${tests}/build" />
-  <property name="tests.reports" value="${tests}/reports" />
+  <property name="tests.build" value="${build}/tests/classes" />
+  <property name="tests.reports" value="${build}/tests/reports" />
   
+  <!-- The location of the JAR file for the test classes -->
+  <property name="testjarfile" location="${build}/${ant.project.name}-tests.jar" />
+
   <!-- WAR properties -->
+  <property name="warfile" value="${build}/${ant.project.name}.war" />
   <condition property="war.compile.jsps">
     <equals arg1="${compile.jsps}" arg2="true" casesensitive="false" trim="true" />
   </condition>
+  <property name="war.build"  value="${build}/war" />
+
   
   <!-- Web unit test properties -->
   <property name="webtests.browser"  value="*firefox" />
-  <property name="webtests.reports"  value="${tests}/reports/selenium" />
-  <property name="webtests.build"    value="${tests}/build/webtests" />
+  <property name="webtests.build"    value="${build}/webtests" />
+  <property name="webtests.reports"  value="${webtests.build}/reports" />
   <property name="webtests.port"     value="10024" />
   <property name="webtests.shutdown" value="19041" />
   <property name="webtests.temp"     value="${java.io.tmpdir}/webtests" />
@@ -156,7 +160,7 @@
   <path id="path.tests">
      <pathelement location="${jarfile}" />
      <pathelement location="${testjarfile}" />
-	<pathelement location="${java.home}/../lib/tools.jar" />
+	   <pathelement location="${java.home}/../lib/tools.jar" />
      <fileset dir="${code.web}/WEB-INF/lib">
         <include name="*.jar" />
      </fileset>
@@ -203,9 +207,8 @@
   <!-- Removes the build directory and the tests build directory -->
   <target name="clean"
           description="Cleans away all generated files.">
+    <delete dir="${build}" />
     <delete dir="${tests.build}" />
-    <delete dir="${code.build}" />
-    <delete dir="${tests.reports}" />
     <delete file="${code.web}/WEB-INF/jspwiki.properties" />
     <delete file="${tests}/etc/jspwiki.properties" />
     <delete file="${tests}/etc/jspwiki_rcs.properties" />
@@ -340,7 +343,7 @@
          <fileset dir="${code.build}" includes="**/*.class" />
          <fileset dir="${code.src}" includes="org/**/*.properties" />
          <!--fileset dir="${code.src}" includes="templates/**/*.properties" /-->
-         <fileset dir="etc" includes="ini/*.xml ini/*.properties" />
+         <fileset dir="etc" includes="ini/*.xml ini/*.properties priha.properties" />
          <metainf dir="${code.web}/WEB-INF" includes="jspwiki.tld" />
       </jar>
   </target>
@@ -376,6 +379,7 @@
    -->
    
   <target name="war-init" depends="installinit">
+    <mkdir dir="${war.build}" />
     <echo>Validating web.xml</echo>
     <schemavalidate file="${code.web}/WEB-INF/web.xml">
       <schema namespace="http://java.sun.com/xml/ns/j2ee"
@@ -383,29 +387,25 @@
     </schemavalidate>
     <!-- Clean up stuff from last time -->
     <delete quiet="true">
-      <fileset dir="${code.build}" includes="JSPWiki-jsp.jar,jasper-runtime-*.jar,commons-el-*.jar"/>
+      <fileset dir="${war.build}" includes="JSPWiki-jsp.jar,jasper-runtime-*.jar,commons-el-*.jar"/>
     </delete>
-    <copy file="${code.web}/WEB-INF/web.xml" toFile="${code.build}/web.xml" overwrite="false"
/>
+    <copy file="${code.web}/WEB-INF/web.xml" toFile="${war.build}/web.xml" overwrite="false"
/>
   </target>
 
   <target name="war" depends="war-init,jar,jar-compiled-jsps,compressedjs"
           description="Builds the WAR file for installation.">
-
-    <property name="warfile" value="${install.fulldir}/${ant.project.name}.war" />
-
     <delete file="${warfile}" />
-
     <war destfile="${warfile}"
-         webxml="${code.build}/web.xml" duplicate="preserve">
+         webxml="${war.build}/web.xml" duplicate="preserve">
       <lib file="${jarfile}" />
-      <lib file="${code.build}/JSPWiki-jsp.jar" />
-      <lib file="${code.build}/jasper-runtime-*.jar" />
-      <lib file="${code.build}/commons-el-*.jar"  />
+      <lib file="${war.build}/JSPWiki-jsp.jar" />
+      <lib file="${war.build}/jasper-runtime-*.jar" />
+      <lib file="${war.build}/commons-el-*.jar"  />
       <fileset dir="${tmpdir}/compress/webdocs/" includes="**/*.js" />
       <fileset dir="${tmpdir}/compress/webdocs/" includes="**/*.css" />
-      <fileset dir="${code.web}" includes="**" excludes="**/servlet-api.jar **/jsp-api.jar
WEB-INF/web.xml" />
+      <fileset dir="${code.web}" includes="**" excludes="**/servlet-api.jar **/jsp-api.jar
WEB-INF/web.xml WEB-INF/jspwiki.tld" />
     </war>
-
+    <copy file="${warfile}" toDir="${install.fulldir}" />
   </target>
 
   <!-- Builds a JAR file that contains pre-compiled JSPs for use
@@ -429,17 +429,17 @@
       </classpath>
     </taskdef>
     <!-- Generate Java source for each JSP -->
-    <mkdir dir="${code.build}/jsp/java" />
+    <mkdir dir="${war.build}/java" />
     <jasper2
       validateXml="false"
       uriroot="${code.web}"
-      outputDir="${code.build}/jsp/java"
+      outputDir="${war.build}/java"
       poolingEnabled="false"
       package="org.apache.wiki.jsp"
-      webXmlFragment="${code.build}/jsp/web-fragment.xml" />
+      webXmlFragment="${war.build}/web-fragment.xml" />
     <!-- Compile the generated Java sources -->
-    <mkdir dir="${code.build}/jsp/classes"/>
-    <javac srcdir="${code.build}/jsp/java" destdir="${code.build}/jsp/classes">
+    <mkdir dir="${war.build}/classes"/>
+    <javac srcdir="${war.build}/java" destdir="${war.build}/classes">
       <classpath>
         <path refid="path.base" />
         <path refid="path.tests" />
@@ -447,18 +447,18 @@
     </javac>
     <!-- Inject JSP mappings into web.xml -->
     <echo message="Adding JSP servlet mappings to web.xml" />
-    <loadfile property="generated-web.xml" srcFile="${code.build}/jsp/web-fragment.xml"/>
-    <copy file="${code.web}/WEB-INF/web.xml" toFile="${code.build}/web.xml" overwrite="true">
+    <loadfile property="generated-web.xml" srcFile="${war.build}/web-fragment.xml"/>
+    <copy file="${code.web}/WEB-INF/web.xml" toFile="${war.build}/web.xml" overwrite="true">
       <filterset begintoken="&lt;!--" endtoken="--&gt;">
         <filter token=" PLACEHOLDER FOR PRE-COMPILED JSP SERVLETS " value="${generated-web.xml}"
/>
       </filterset>
     </copy>
     <!-- Jar up the compiled class files -->
-    <jar jarfile="${code.build}/JSPWiki-jsp.jar" index="true">
-      <fileset dir="${code.build}/jsp/classes" includes="**/*.class" />
+    <jar jarfile="${war.build}/JSPWiki-jsp.jar" index="true">
+      <fileset dir="${war.build}/classes" includes="**/*.class" />
     </jar>
     <!-- Copy the Jasper runtime JAR -->
-    <copy toDir="${code.build}">
+    <copy toDir="${war.build}">
       <fileset dir="${tests}/lib" includes="jasper-runtime-*.jar"/>
       <fileset dir="${tests}/lib" includes="commons-el-*.jar"/>
     </copy>
@@ -503,7 +503,7 @@
 
   <target name="staticzip" depends="war" if="static.user">
     <property name="static.group" value="${static.user}" />
-    <tar destfile="${code.build}/${tar.static}" longfile="fail" compression="gzip">
+    <tar destfile="${build}/${tar.static}" longfile="fail" compression="gzip">
       <tarfileset dir="${war}" defaultexcludes="yes"
         username="${static.user}" group="${static.group}"
         mode="440" dirmode="550">
@@ -923,12 +923,17 @@
       <!-- Copy the classes -->
       <copy toDir="@{context.dir}/webapp/WEB-INF/classes">
         <fileset dir="etc" includes="oscache.properties" />
-        <fileset dir="etc" includes="log4j.properties" />
+      </copy>
+      <copy toDir="@{context.dir}/webapp/WEB-INF/classes">
+        <fileset dir="${tests}/etc" includes="log4j.properties" />
+        <filterset>
+          <filter token="logfile" value="@{context.dir}/jetty.log" />
+        </filterset>
       </copy>
 
       <!-- Copy the libraries -->
       <copy toDir="@{context.dir}/webapp/WEB-INF/lib">
-        <fileset dir="lib" includes="*.jar" excludes="servlet-api.jar jsp-api.jar"/>
+        <fileset dir="${code.web}" includes="**" excludes="**/servlet-api.jar **/jsp-api.jar
WEB-INF/web.xml" />
         <fileset file="${jarfile}"/>
         <fileset file="${jdbc.driver.jar}"/>
       </copy>
@@ -964,11 +969,12 @@
 
       <!-- Start Jetty with our test context -->
       <echo message="Starting Jetty."/>
-      <java classname="org.apache.wiki.web.TestContainer" fork="true" spawn="true">
+      <java classname="org.apache.wiki.web.TestContainer" fork="false" spawn="false">
         <classpath>
            <path refid="path.tests" />
         </classpath>
         <sysproperty key="java.io.tmpdir" value="${webtests.temp}" />
+        <sysproperty key="log4j.configuration" value="log4j.properties" />
         <!--
         <jvmarg value="-Xdebug" />
         <jvmarg value="-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"
/>
@@ -1267,10 +1273,10 @@
 
   <target name="i18n-jar-template" description="Jars a given i18n directory structure">
 	<input message="i18n template code to jar (ie: es_ES):" addproperty="i18n.template" />
-  	<jar jarfile="${code.build}/${ant.project.name}_${i18n.template}.jar" index="true">
+  	<jar jarfile="${build}/${ant.project.name}_${i18n.template}.jar" index="true">
 		<fileset dir="${tmplt.i18n.dir}/${ant.project.name}_${i18n.template}" includes="**/*.properties"
/>
 	</jar>
-	<echo message="Created ${code.build}/${ant.project.name}_${i18n.template}.jar. Drop it
on your web/WEB-INF/lib folder and that should do the i18n trick" />
+	<echo message="Created ${build}/${ant.project.name}_${i18n.template}.jar. Drop it on
your web/WEB-INF/lib folder and that should do the i18n trick" />
 	<echo message="You can also upload the jar to http://jspwiki.org/wiki/ContributedLocalizations
or to any page linked to it to make it available for everyone!" />
   </target>
 

Modified: incubator/jspwiki/trunk/etc/jspwiki.properties.tmpl
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/etc/jspwiki.properties.tmpl?rev=744498&r1=744497&r2=744498&view=diff
==============================================================================
--- incubator/jspwiki/trunk/etc/jspwiki.properties.tmpl (original)
+++ incubator/jspwiki/trunk/etc/jspwiki.properties.tmpl Sat Feb 14 13:58:24 2009
@@ -28,6 +28,13 @@
 jspwiki.baseURL=
 
 #
+#  What Java Content Rrepository should JSPWiki use to store content?
+#  This value will be consulted only if JSPWiki cannot locate 
+#  a container-managed JCR under the JNDI name jcr/repository.
+#  Valid values are 'priha' and 'jackrabbit'.
+jspwiki.repository = priha
+
+#
 #  Which page provider class to use.  Possibilities are:
 #
 #    RCSFileProvider        - for simple RCS-based file storage

Added: incubator/jspwiki/trunk/etc/priha.properties
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/etc/priha.properties?rev=744498&view=auto
==============================================================================
--- incubator/jspwiki/trunk/etc/priha.properties (added)
+++ incubator/jspwiki/trunk/etc/priha.properties Sat Feb 14 13:58:24 2009
@@ -0,0 +1,5 @@
+#
+#  File to give a test configuration for Priha.
+#
+
+priha.provider.defaultProvider.workspaces = default jspwiki

Modified: incubator/jspwiki/trunk/src/WebContent/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/WebContent/WEB-INF/web.xml?rev=744498&r1=744497&r2=744498&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/WebContent/WEB-INF/web.xml (original)
+++ incubator/jspwiki/trunk/src/WebContent/WEB-INF/web.xml Sat Feb 14 13:58:24 2009
@@ -364,6 +364,15 @@
    </resource-ref>
    REMOVE ME TO ENABLE JAVAMAIL  -->
 
+   <!--  REMOVE ME TO ENABLE JCR REPOSITORY
+   <resource-ref>
+     <description>Resource reference to a container-managed JCR repository.</description>
+     <res-ref-name>jcr/repository</res-ref-name>
+     <res-type>javax.jcr.Repository</res-type>
+     <res-auth>Container</res-auth>
+   </resource-ref>
+   REMOVE ME TO ENABLE JCR REPOSITORY  -->
+
    <!--
        CONTAINER-MANAGED AUTHENTICATION & AUTHORIZATION
     

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java?rev=744498&r1=744497&r2=744498&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java Sat Feb 14 13:58:24 2009
@@ -77,7 +77,7 @@
      *  <p>
      *  If the build identifier is empty, it is not added.
      */
-    public static final String     BUILD         = "66";
+    public static final String     BUILD         = "67";
     
     /**
      *  This is the generic version string you should use

Modified: incubator/jspwiki/trunk/tests/etc/log4j.properties
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/tests/etc/log4j.properties?rev=744498&r1=744497&r2=744498&view=diff
==============================================================================
--- incubator/jspwiki/trunk/tests/etc/log4j.properties (original)
+++ incubator/jspwiki/trunk/tests/etc/log4j.properties Sat Feb 14 13:58:24 2009
@@ -1,20 +1,17 @@
-# Default logging settings for Dependency Finder applications
-log4j.rootLogger=ERROR, CONSOLE
+# Default DEBUG logging for all web unit tests
 
-# log4j.logger.com.jeantessier.dependency=DEBUG, CHAINSAW
-# log4j.logger.com.jeantessier.dependency.PackageNode=DEBUG, CHAINSAW
-# log4j.logger.com.jeantessier.metrics.MetricsGatherer=DEBUG, CHAINSAW
+#  Log everything into a file, roll it over every 10 MB, keep
+#  only 14 latest ones.
+#
+log4j.appender.FileLog = org.apache.log4j.RollingFileAppender
+log4j.appender.FileLog.MaxFileSize    = 10MB
+log4j.appender.FileLog.MaxBackupIndex = 14
+log4j.appender.FileLog.File = @logfile@
+log4j.appender.FileLog.layout = org.apache.log4j.PatternLayout
+log4j.appender.FileLog.layout.ConversionPattern=%d [%t] %p %c %x - %m%n
 
-log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
-log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
-log4j.appender.CONSOLE.layout.ConversionPattern=[%d{yyyy/MM/dd HH:mm:ss.SSS}] %c{2} %m%n
+# Default logging setting for everything
+log4j.rootCategory=DEBUG,FileLog
 
-log4j.appender.FILE=org.apache.log4j.FileAppender
-log4j.appender.FILE.File=C:\\language\\Java\\myprojects\\DependencyFinder\\logs\\default.log
-log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
-log4j.appender.FILE.layout.ConversionPattern=[%d{yyyy/MM/dd HH:mm:ss.SSS}] %c{2} %m%n
-
-log4j.appender.CHAINSAW=org.apache.log4j.net.SocketAppender
-log4j.appender.CHAINSAW.RemoteHost=localhost
-log4j.appender.CHAINSAW.Port=4445
-log4j.appender.CHAINSAW.LocationInfo=true
+# Log level for the Stripes framework
+log4j.logger.net.sourceforge.stripes=DEBUG

Added: incubator/jspwiki/trunk/tests/lib/selenium-java-client-driver-1.0b2.jar
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/tests/lib/selenium-java-client-driver-1.0b2.jar?rev=744498&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/jspwiki/trunk/tests/lib/selenium-java-client-driver-1.0b2.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/jspwiki/trunk/tests/lib/selenium-server-1.0b2.jar
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/tests/lib/selenium-server-1.0b2.jar?rev=744498&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/jspwiki/trunk/tests/lib/selenium-server-1.0b2.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream



Mime
View raw message