You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wookie.apache.org by ps...@apache.org on 2011/02/03 13:58:57 UTC
svn commit: r1066800 - in /incubator/wookie/branches/0.9.x: ./ ant/
etc/release/ etc/release/standalone/ etc/release/war/
Author: psharples
Date: Thu Feb 3 12:58:57 2011
New Revision: 1066800
URL: http://svn.apache.org/viewvc?rev=1066800&view=rev
Log:
Adding resources to allow ant tasks for building a source release, a war release and a standalone release
Added:
incubator/wookie/branches/0.9.x/ant/ivy-release-common.xml (with props)
incubator/wookie/branches/0.9.x/etc/release/
incubator/wookie/branches/0.9.x/etc/release/standalone/
incubator/wookie/branches/0.9.x/etc/release/standalone/README
incubator/wookie/branches/0.9.x/etc/release/standalone/shutdown.bat
incubator/wookie/branches/0.9.x/etc/release/standalone/shutdown.sh
incubator/wookie/branches/0.9.x/etc/release/standalone/startup.bat
incubator/wookie/branches/0.9.x/etc/release/standalone/startup.sh
incubator/wookie/branches/0.9.x/etc/release/war/
incubator/wookie/branches/0.9.x/etc/release/war/README
Modified:
incubator/wookie/branches/0.9.x/build.properties
incubator/wookie/branches/0.9.x/build.xml
incubator/wookie/branches/0.9.x/ivy.xml
Added: incubator/wookie/branches/0.9.x/ant/ivy-release-common.xml
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/0.9.x/ant/ivy-release-common.xml?rev=1066800&view=auto
==============================================================================
--- incubator/wookie/branches/0.9.x/ant/ivy-release-common.xml (added)
+++ incubator/wookie/branches/0.9.x/ant/ivy-release-common.xml Thu Feb 3 12:58:57 2011
@@ -0,0 +1,182 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+ -->
+<project xmlns:ivy="antlib:org.apache.ivy.ant">
+
+ <import file="ivy-java-common.xml" />
+ <import file="ivy-webapp-common.xml" />
+
+ <tstamp />
+ <property name="wookie.source.folder.name" value="wookie-source" />
+ <property name="wookie.war.folder.name" value="wookie-war" />
+ <property name="wookie.standalone.folder.name" value="wookie-standalone" />
+ <property name="wookie.source.zip.name"
+ value="org.apache.incubator.wookie-source-${version}-${DSTAMP}" />
+ <property name="wookie.standalone.zip.name"
+ value="org.apache.incubator.wookie-standalone-${version}-${DSTAMP}" />
+ <property name="wookie.war.name"
+ value="org.apache.incubator.wookie-war-${version}-${DSTAMP}" />
+
+
+ <target name="build-release-all"
+ depends="build-release-src, build-release-standalone, build-release-war">
+ <echo>Building all releases</echo>
+ </target>
+
+ <target name="build-release-src" depends="">
+ <echo>Building source release</echo>
+ <mkdir dir="${wookie.release.dir}/" />
+
+ <zip destfile="${wookie.release.dir}/${wookie.source.zip.name}.zip"
+ basedir="."
+ includes=".settings/,
+ ant/,
+ connector/,
+ docs/,
+ etc/,
+ features/,
+ licenses/,
+ parser/,
+ project_admin/,
+ schemas/,
+ scripts/,
+ shindig/,
+ src/,
+ src-tests/,
+ tutorials/,
+ WebContent/,
+ widgets/,
+ .classpath,
+ .project,
+ build.properties,
+ build.xml,
+ ivy.xml,
+ LICENSE,
+ NOTICE,
+ readme.txt"
+ />
+
+ <!-- tar -->
+ <tar destfile="${wookie.release.dir}/${wookie.source.zip.name}.tar.gz"
+ compression="gzip">
+ <zipfileset src="${wookie.release.dir}/${wookie.source.zip.name}.zip" />
+ </tar>
+
+ </target>
+
+ <target name="build-release-war" depends="compile-core, deploy-webapp, post-deploy-webapp">
+ <echo>Building war release</echo>
+ <delete dir="${wookie.release.dir}/${wookie.war.folder.name}" />
+ <mkdir dir="${wookie.release.dir}/${wookie.war.folder.name}/build/scripts/" />
+
+ <!-- build war file -->
+ <war
+ destfile="${wookie.release.dir}/${wookie.war.folder.name}/build/wookie.war"
+ webxml="${build.dir}/webapp/wookie/WEB-INF/web.xml">
+ <lib dir="${build.dir}/webapp/wookie/WEB-INF/lib" />
+ <classes dir="${build.dir}/webapp/wookie/WEB-INF/classes" />
+ <fileset dir="${build.dir}/webapp/wookie/">
+ <exclude name="WEB-INF/classes/" />
+ <exclude name="WEB-INF/lib/" />
+ </fileset>
+ </war>
+
+ <!-- copy sql scripts across -->
+ <copy todir="${wookie.release.dir}/${wookie.war.folder.name}/build/scripts/">
+ <fileset dir="${build.dir}/classes/org/apache/wookie/beans/jpa/">
+ <include name="*.sql" />
+ </fileset>
+ </copy>
+
+ <!-- copy readme, licenses, etc -->
+ <copy file="etc/release/war/README"
+ tofile="${wookie.release.dir}/${wookie.war.folder.name}/build/README"
+ overwrite="yes" />
+ <copy file="NOTICE"
+ tofile="${wookie.release.dir}/${wookie.war.folder.name}/build/NOTICE"
+ overwrite="yes" />
+ <copy file="LICENSE"
+ tofile="${wookie.release.dir}/${wookie.war.folder.name}/build/LICENSE"
+ overwrite="yes" />
+
+ <copy file="${etc.dir}/tomcat/conf/jpa-context.xml" tofile="${wookie.release.dir}/${wookie.war.folder.name}/build/${ant.project.name}.xml" overwrite="true">
+ <filterset>
+ <filter token="DATABASE_USER" value="java" />
+ <filter token="DATABASE_PASSWORD" value="java" />
+ <filter token="DATABASE_DRIVER" value="com.mysql.jdbc.Driver" />
+ <filter token="DATABASE_URI" value="jdbc:mysql://localhost:3306/widgetdb" />
+ </filterset>
+ </copy>
+
+ <!-- zip -->
+ <zip destfile="${wookie.release.dir}/${wookie.war.name}.zip" basedir="${wookie.release.dir}/${wookie.war.folder.name}/build/" update="true" />
+
+ <!-- tar -->
+ <tar destfile="${wookie.release.dir}/${wookie.war.name}.tar.gz"
+ compression="gzip">
+ <zipfileset src="${wookie.release.dir}/${wookie.war.name}.zip" />
+ </tar>
+
+ <!-- clean up -->
+ <delete dir="${wookie.release.dir}/${wookie.war.folder.name}" />
+
+ </target>
+
+ <target name="build-release-standalone" depends="compile-core, deploy-webapp, post-deploy-webapp">
+
+ <echo>Building standalone release</echo>
+ <delete dir="${wookie.release.dir}/${wookie.standalone.folder.name}" />
+ <mkdir dir="${wookie.release.dir}/${wookie.standalone.folder.name}/build/" />
+ <mkdir dir="${wookie.release.dir}/${wookie.standalone.folder.name}/lib/" />
+ <mkdir dir="${wookie.release.dir}/${wookie.standalone.folder.name}/etc/" />
+
+ <copy todir="${wookie.release.dir}/${wookie.standalone.folder.name}/build/">
+ <fileset dir="${build.dir}/">
+ <exclude name="classes/" />
+ <exclude name="widgets/" />
+ <exclude name="**/*.java" />
+ </fileset>
+ </copy>
+
+ <copy todir="${wookie.release.dir}/${wookie.standalone.folder.name}/">
+ <fileset dir="etc/release/standalone/" />
+ </copy>
+
+ <copy file="./etc/jetty-realm.properties"
+ tofile="${wookie.release.dir}/${wookie.standalone.folder.name}/etc/jetty-realm.properties" />
+ <copy file="NOTICE"
+ tofile="${wookie.release.dir}/${wookie.standalone.folder.name}/NOTICE"
+ overwrite="yes" />
+ <copy file="LICENSE"
+ tofile="${wookie.release.dir}/${wookie.standalone.folder.name}/LICENSE"
+ overwrite="yes" />
+
+ <ivy:retrieve conf="runtime"
+ pattern="${wookie.release.dir}/${wookie.standalone.folder.name}/lib/[artifact]-[revision].[ext]" />
+
+ <zip destfile="${wookie.release.dir}/${wookie.standalone.zip.name}.zip"
+ basedir="${wookie.release.dir}/" includes="${wookie.standalone.folder.name}/"
+ update="true" />
+
+ <tar destfile="${wookie.release.dir}/${wookie.standalone.zip.name}.tar.gz"
+ compression="gzip">
+ <zipfileset src="${wookie.release.dir}/${wookie.standalone.zip.name}.zip" />
+ </tar>
+
+ <delete dir="${wookie.release.dir}/${wookie.standalone.folder.name}" />
+ </target>
+
+</project>
\ No newline at end of file
Propchange: incubator/wookie/branches/0.9.x/ant/ivy-release-common.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: incubator/wookie/branches/0.9.x/build.properties
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/0.9.x/build.properties?rev=1066800&r1=1066799&r2=1066800&view=diff
==============================================================================
--- incubator/wookie/branches/0.9.x/build.properties (original)
+++ incubator/wookie/branches/0.9.x/build.properties Thu Feb 3 12:58:57 2011
@@ -53,6 +53,9 @@ servletEngine.webapp.dir=build/webapp
build.dir=build
ivy.repository.dir=ant
+# Wookie release properties
+wookie.release.dir=release
+
# Wookie connector framework properties
wookie.connector.dir=connector
Modified: incubator/wookie/branches/0.9.x/build.xml
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/0.9.x/build.xml?rev=1066800&r1=1066799&r2=1066800&view=diff
==============================================================================
--- incubator/wookie/branches/0.9.x/build.xml (original)
+++ incubator/wookie/branches/0.9.x/build.xml Thu Feb 3 12:58:57 2011
@@ -32,6 +32,7 @@
<property name="compilerargs" value="-Aopenjpa.metamodel=true" />
<import file="ant/ivy-webapp-common.xml"/>
+ <import file="ant/ivy-release-common.xml"/>
<property file="${project.core.src.dir}/widgetserver.properties"/>
<property name="servletEngine.repository.dir" location="${servletEngine.webapp.dir}/../repository"/>
Added: incubator/wookie/branches/0.9.x/etc/release/standalone/README
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/0.9.x/etc/release/standalone/README?rev=1066800&view=auto
==============================================================================
--- incubator/wookie/branches/0.9.x/etc/release/standalone/README (added)
+++ incubator/wookie/branches/0.9.x/etc/release/standalone/README Thu Feb 3 12:58:57 2011
@@ -0,0 +1,26 @@
+Wookie standalone instructions
+==============================
+This folder should contain...
+
+lib
+etc
+build
+startup.sh
+startup.bat
+shutdown.sh
+shutdown.bat
+NOTICE
+LICENSE
+README (this file!)
+
+This installation of wookie is not meant for full deployment purposes,
+rather it is intended as an easy and simple way to quickly see what wookie
+is about without the need to configure various databases and servers.
+As such it uses a preconfigured Jetty server and Derby database.
+
+Starting and stopping the server
+================================
+To start the server on windows run the startup.bat script
+To start the server on *nix systems run the startup.sh script
+To stop the server on windows run the shutdown.bat script
+To stop the server on *nix systems run the shutdown.sh script
\ No newline at end of file
Added: incubator/wookie/branches/0.9.x/etc/release/standalone/shutdown.bat
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/0.9.x/etc/release/standalone/shutdown.bat?rev=1066800&view=auto
==============================================================================
--- incubator/wookie/branches/0.9.x/etc/release/standalone/shutdown.bat (added)
+++ incubator/wookie/branches/0.9.x/etc/release/standalone/shutdown.bat Thu Feb 3 12:58:57 2011
@@ -0,0 +1 @@
+java -classpath ./lib/*;./build/webapp/wookie/WEB-INF/lib/*;./build/webapp/wookie/WEB-INF/classes org.apache.wookie.server.Stop
Added: incubator/wookie/branches/0.9.x/etc/release/standalone/shutdown.sh
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/0.9.x/etc/release/standalone/shutdown.sh?rev=1066800&view=auto
==============================================================================
--- incubator/wookie/branches/0.9.x/etc/release/standalone/shutdown.sh (added)
+++ incubator/wookie/branches/0.9.x/etc/release/standalone/shutdown.sh Thu Feb 3 12:58:57 2011
@@ -0,0 +1 @@
+java -classpath build/webapp/wookie/WEB-INF/lib/*:build/webapp/wookie/WEB-INF/classes:lib/* org.apache.wookie.server.Stop
Added: incubator/wookie/branches/0.9.x/etc/release/standalone/startup.bat
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/0.9.x/etc/release/standalone/startup.bat?rev=1066800&view=auto
==============================================================================
--- incubator/wookie/branches/0.9.x/etc/release/standalone/startup.bat (added)
+++ incubator/wookie/branches/0.9.x/etc/release/standalone/startup.bat Thu Feb 3 12:58:57 2011
@@ -0,0 +1,7 @@
+@echo off
+set DIRNAME=.\
+set PROGARGS=
+if exist %DIRNAME%\widgetDatabase (
+ set PROGARGS="initDB=false"
+)
+java -classpath ./lib/*;./build/webapp/wookie/WEB-INF/lib/*;./build/webapp/wookie/WEB-INF/classes org.apache.wookie.server.Start %PROGARGS%
\ No newline at end of file
Added: incubator/wookie/branches/0.9.x/etc/release/standalone/startup.sh
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/0.9.x/etc/release/standalone/startup.sh?rev=1066800&view=auto
==============================================================================
--- incubator/wookie/branches/0.9.x/etc/release/standalone/startup.sh (added)
+++ incubator/wookie/branches/0.9.x/etc/release/standalone/startup.sh Thu Feb 3 12:58:57 2011
@@ -0,0 +1,5 @@
+PROGARGS=
+if [ -d ./widgetDatabase ]; then
+ PROGARGS=`initDB=false`
+fi
+java -classpath lib/*:build/webapp/wookie/WEB-INF/lib/*:build/webapp/wookie/WEB-INF/classes org.apache.wookie.server.Start $PROGARGS
Added: incubator/wookie/branches/0.9.x/etc/release/war/README
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/0.9.x/etc/release/war/README?rev=1066800&view=auto
==============================================================================
--- incubator/wookie/branches/0.9.x/etc/release/war/README (added)
+++ incubator/wookie/branches/0.9.x/etc/release/war/README Thu Feb 3 12:58:57 2011
@@ -0,0 +1,66 @@
+WAR archive standalone manual configuration
+===========================================
+This folder should contain...
+
+wookie.xml
+wookie.war
+scripts
+widgets
+NOTICE
+LICENSE
+README (this file!)
+
+In order to deploy wookie onto your application server, you must...
+
+(1) Install a suitable database driver for wookie on your server (if you haven't already)
+(2) Create a user with the group/rolename as "widgetadmin" on your server installation
+ - and give this user the credentials username=java password=java
+(3) Create a database called 'widgetDB' in your database
+(4) Create a user 'java' with the password 'java' in your database and give this user suitable permissions on the above database
+(5) Run one of the sql scripts found under the scripts folder to create the wookie database structure
+(6) Create/configure a context.xml file under your server for wookie
+(7) Copy the wookie.war to your webapps or deploy directory
+(8) Start your server
+(9) Open your browser and goto 'http://YOURSERVERADDRESS:8080/wookie' (i.e. http://localhost:8080/wookie)
+
+The following text describes this process specifically for tomcat and mysql...
+
+
+Running Wookie with Tomcat and MySQL manual configuration
+=========================================================
+
+(1) Obtain a JDBC driver jar file for the database.
+ (for example the mysql driver can be downloaded from http://www.mysql.com/downloads/connector/j/)
+ The downloaded zip file should contain a jar file, something similar to mysql-connector-java-5.1.*-bin.jar
+
+(2) Place the mysql-connector-java-5.1.*-bin.jar file into tomcats lib folder so it is founnd on the classpath at runtime
+ (for example in tomcat 5.5.* place this file into /tomcat-root/common/lib)
+ (for example in tomcat 6.0.* place this file into /tomcat-root/lib)
+
+(3) You will need to create a user with the role "widgetadmin" in your tomcat installation.
+ For example, add the following line to the file /tomcat-root/conf/tomcat-users.xml:
+
+ <role rolename="widgetadmin"/><user username="java" password="java" roles="widgetadmin"/>
+
+(4) Create a database in mysql called 'widgetdb'.
+
+(5) Create a user in mysql 'java' with the password 'java' and give them suitable permisions on the widgetDB
+
+(6) Copy the file wookie.xml to your tomcat-root/conf/catalina/servername folder
+ (for example in tomcat 5.5.* & 6.0.* place this file into /tomcat-root/conf/Catalina/localhost)
+
+(7) Locate the 'mysql-wookie-schema.sql' file found under 'scripts' and run this to populate the 'widgetDB' database you created
+ - NOTE: the first time you run this script, you may have to remove the drop foreign key statements found at the top of the script
+
+ i.e. the statements that look similar to these..
+
+ ALTER TABLE tablename
+ DROP FOREIGN KEY FKWidgetTablename;
+
+ ... as the first time they won't exist.
+
+(8) Copy the 'wookie.war' file to your deployment folder '/tomcat-root/webapps'
+
+(9) Start your server
+
+(10) Open your browser and goto 'http://YOURSERVERADDRESS:8080/wookie' (i.e. http://localhost:8080/wookie)
Modified: incubator/wookie/branches/0.9.x/ivy.xml
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/0.9.x/ivy.xml?rev=1066800&r1=1066799&r2=1066800&view=diff
==============================================================================
--- incubator/wookie/branches/0.9.x/ivy.xml (original)
+++ incubator/wookie/branches/0.9.x/ivy.xml Thu Feb 3 12:58:57 2011
@@ -19,7 +19,8 @@
<configurations>
<conf name="deploy" description="Provide the necessary files and libraries to deploy in a production environment"/>
- <conf name="dev" extends="deploy" description="Provide the necessary files and libraries to run in standalone (development) mode"/>
+ <conf name="runtime" description="Provide the libraries to run in standalone without the deploy libraries"/>
+ <conf name="dev" extends="deploy, runtime" description="Provide the necessary files and libraries to run in standalone (development) mode"/>
<conf name="test" extends="dev" visibility="private" description="for our testing frameowrk"/>
<conf name="ddlutils" visibility="private" description="Provide the necessary libraries to invoke DDLUtils schema generation"/>
</configurations>
@@ -79,23 +80,23 @@
</dependency>
<!-- Libraries used in a development/test environment but not in deployment -->
- <dependency org="javax.servlet" name="servlet-api" rev="2.5" conf="dev->default">
+ <dependency org="javax.servlet" name="servlet-api" rev="2.5" conf="runtime->default">
</dependency>
- <dependency org="org.mortbay.jetty" name="jetty" rev="6.1.3" conf="dev->default">
+ <dependency org="org.mortbay.jetty" name="jetty" rev="6.1.3" conf="runtime->default">
</dependency>
- <dependency org="org.mortbay.jetty" name="jetty-util" rev="6.1.3" conf="dev->default">
+ <dependency org="org.mortbay.jetty" name="jetty-util" rev="6.1.3" conf="runtime->default">
</dependency>
- <dependency org="org.mortbay.jetty" name="jetty-plus" rev="6.1.3" conf="dev->default">
+ <dependency org="org.mortbay.jetty" name="jetty-plus" rev="6.1.3" conf="runtime->default">
</dependency>
- <dependency org="org.mortbay.jetty" name="jetty-naming" rev="6.1.3" conf="dev->default">
+ <dependency org="org.mortbay.jetty" name="jetty-naming" rev="6.1.3" conf="runtime->default">
</dependency>
- <dependency org="org.mortbay.jetty" name="jsp-2.1" rev="6.1.3" conf="dev->default">
+ <dependency org="org.mortbay.jetty" name="jsp-2.1" rev="6.1.3" conf="runtime->default">
</dependency>
- <dependency org="org.mortbay.jetty" name="jsp-api-2.1" rev="6.1.3" conf="dev->default">
+ <dependency org="org.mortbay.jetty" name="jsp-api-2.1" rev="6.1.3" conf="runtime->default">
</dependency>
- <dependency org="org.apache.derby" name="derby" rev="10.4.2.0" conf="dev->default">
+ <dependency org="org.apache.derby" name="derby" rev="10.4.2.0" conf="runtime->default">
</dependency>
- <dependency org="commons-dbcp" name="commons-dbcp" rev="1.2.2" conf="dev->default">
+ <dependency org="commons-dbcp" name="commons-dbcp" rev="1.2.2" conf="runtime->default">
</dependency>
<!-- Libraries used in testing -->