Changes for page Embedding WOFrameworks
Last modified by Gavin Eadie on 2011/07/29 18:09
From version 58.1
edited by Philippe Rabier
on 2011/07/29 18:09
on 2011/07/29 18:09
Change comment:
Migrated to Confluence 4.0
To version 59.1
edited by Philippe Rabier
on 2011/07/29 18:09
on 2011/07/29 18:09
Change comment:
Migrated to Confluence 5.3
Summary
-
Page properties (3 modified, 0 added, 0 removed)
-
Attachments (0 modified, 5 added, 0 removed)
Details
- Page properties
-
- Parent
-
... ... @@ -1,0 +1,1 @@ 1 +WOProject-Ant - Tags
-
... ... @@ -1,0 +1,1 @@ 1 +favourite - Content
-
... ... @@ -110,7 +110,7 @@ 110 110 This is where Apple's WebObjects frameworks are installed and if your WebObjects version is consistent between your deployment and development platforms, then embedding these is not of much benefit. 111 111 ))) 112 112 113 -{{note title="Remember to..." bgColor="#FFFFCE"}}113 +{{note bgColor="#FFFFCE" title="Remember to..."}} 114 114 If you are working with framework source in your Eclipse workspace (which you should be!), then it is critical that you build and install all frameworks before building the deployment bundles to ensure that the embedded frameworks are the same as the source you have been developing and testing with. See next subsection for one approcah to automating this. 115 115 {{/note}} 116 116
- Folders.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.XWikiGuest - Size
-
... ... @@ -1,0 +1,1 @@ 1 +6.9 KB - Content
- FoldersAfterBuild.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.XWikiGuest - Size
-
... ... @@ -1,0 +1,1 @@ 1 +8.7 KB - Content
- build.xml
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.XWikiGuest - Size
-
... ... @@ -1,0 +1,1 @@ 1 +735 bytes - Content
-
... ... @@ -1,0 +1,23 @@ 1 +<project name="packageandgo" default="build" basedir="."> 2 + 3 + <target name="build" depends="clean"> 4 + <property name="frameworks.dir" value="Frameworks" /> 5 + <mkdir dir="${frameworks.dir}" /> 6 + <property name="applications.dir" value="Applications" /> 7 + <mkdir dir="${applications.dir}" /> 8 + <ant dir="../Foo" antfile="build.xml" target="compileAndBuild"> 9 + <property name="dest.dir" value="../packageandgo/${frameworks.dir}" /> 10 + </ant> 11 + <ant dir="../Uli" antfile="packageandgobuild.xml" target="compileAndBuild"> 12 + <property name="dest.dir" value="../packageandgo/${applications.dir}" /> 13 + </ant> 14 + </target> 15 + 16 + <target name="clean"> 17 + <delete dir="${frameworks.dir}" /> 18 + <delete dir="${applications.dir}" /> 19 + </target> 20 + 21 + 22 +</project> 23 +
- old_packageandgobuild.xml
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.XWikiGuest - Size
-
... ... @@ -1,0 +1,1 @@ 1 +6.8 KB - Content
-
... ... @@ -1,0 +1,186 @@ 1 +<project name="Uli" default="build" basedir="."> 2 + 3 + <!-- main targets --> 4 + <!-- add optional targets to depends list if needed --> 5 + <target name="build" depends="setProps,init.build,build.woapp,war,ssdd"/> 6 + 7 + <target name="compileAndBuild" depends="setProps,init.build,compile,build.woapp,war,ssdd" /> 8 + 9 + <target name="install" depends="setProps,init.install,build.woapp,war,ssdd"/> 10 + 11 + <target name="clean" depends="setProps"> 12 + <delete dir="dist"/> 13 + </target> 14 + 15 + <!-- property determination --> 16 + <target name="setProps"> 17 + <property file="${user.home}${file.separator}build.properties"/> 18 + <property file="build.properties"/> 19 + <property file="${user.home}${file.separator}Library${file.separator}wobuild.properties"/> 20 + <condition property="wo.properties.check.failed"> 21 + <not> 22 + <and> 23 + <isset property="wo.wosystemroot"/> 24 + <isset property="wo.wolocalroot"/> 25 + </and> 26 + </not> 27 + </condition> 28 + <fail message="Could not find ${user.home}${file.separator}Library${file.separator}wobuild.properties." if="wo.properties.check.failed"/> 29 + <property name="install.dir" value="${wo.wolocalroot}/Library/WebObjects/Applications"/> 30 + </target> 31 + 32 + <!-- basic initializations --> 33 + <target name="init.install"> 34 + <tstamp/> 35 + <property name="dest.dir" value="${install.dir}"/> 36 + </target> 37 + 38 + <target name="init.build"> 39 + <tstamp/> 40 + <property name="dest.dir" value="dist"/> 41 + </target> 42 + 43 + <!-- woproject tasks --> 44 + <target name="build.woapp"> 45 + 46 + <taskdef name="woapplication" classname="org.objectstyle.woproject.ant.WOApplication"> 47 + </taskdef> 48 + 49 + <!-- add webXML="true" to generate a web.xml file --> 50 + <woapplication name="${project.name}" stdFrameworks="false" 51 + destDir="${dest.dir}" 52 + customInfoPListContent="${customInfoPListContent}" 53 + principalClass="${principalClass}" 54 + webXML="${webXML}" 55 + webXML_CustomContent="${webXML_CustomContent}"> 56 + <classes dir="${classes.dir}"> 57 + <patternset> 58 + <includesfile name="woproject/classes.include.patternset"/> 59 + <excludesfile name="woproject/classes.exclude.patternset"/> 60 + </patternset> 61 + </classes> 62 + <wsresources dir="."> 63 + <patternset> 64 + <includesfile name="woproject/wsresources.include.patternset"/> 65 + <excludesfile name="woproject/wsresources.exclude.patternset"/> 66 + </patternset> 67 + </wsresources> 68 + <resources dir="."> 69 + <patternset> 70 + <includesfile name="woproject/resources.include.patternset"/> 71 + <excludesfile name="woproject/resources.exclude.patternset"/> 72 + </patternset> 73 + </resources> 74 + <!-- package and go example--> 75 + <frameworks root="../packageandgo/frameworks" embed="true"> 76 + <include name="*.framework"/> 77 + </frameworks> 78 + <frameworks root="${wo.wosystemroot}"> 79 + <patternset> 80 + <includesfile name="woproject/ant.frameworks.wo.wosystemroot"/> 81 + </patternset> 82 + </frameworks> 83 + <frameworks root="${wo.wolocalroot}"> 84 + <patternset> 85 + <includesfile name="woproject/ant.frameworks.wo.wolocalroot"/> 86 + </patternset> 87 + </frameworks> 88 + <frameworks root="${user.home}"> 89 + <patternset> 90 + <includesfile name="woproject/ant.frameworks.user.home"/> 91 + </patternset> 92 + </frameworks> 93 + <otherclasspath root="${wo.wosystemroot}"> 94 + <patternset> 95 + <includesfile name="woproject/ant.classpaths.wo.wosystemroot"/> 96 + </patternset> 97 + </otherclasspath> 98 + <lib dir="."> 99 + <include name="Add .jar's that should be copied in the woa."/> 100 + <exclude name="**/*.woa/**"/> 101 + </lib> 102 + </woapplication> 103 + </target> 104 + 105 + <!-- optional targets --> 106 + 107 + <!-- war target--> 108 + <!-- To use this target remove the if="${never}" statement and create the LICENSE in your project 109 + and create the web.xml file with the woapplication task.--> 110 + <target name="war" if="${never}"> 111 + <war destfile="${dest.dir}/${project.name}.war" 112 + webxml="${dest.dir}/${project.name}.woa/Contents/web.xml"> 113 + <fileset dir="${dest.dir}"> 114 + <include name="${project.name}.woa/**"/> 115 + </fileset> 116 + <fileset dir=".."> 117 + <include name="LICENSE"/> 118 + </fileset> 119 + <lib dir="${wo.wosystemroot}/Library/Frameworks/JavaWOJSPServlet.framework/WebServerResources/Java/"> 120 + <include name="JavaWOJSPServlet_client.jar"/> 121 + </lib> 122 + <zipfileset dir="${wo.wosystemroot}/Library/Frameworks/JavaWOJSPServlet.framework/Resources/" prefix="tlds"> 123 + <include name="WOtaglib_1_0.tld"/> 124 + </zipfileset> 125 + </war> 126 + </target> 127 + 128 + <!-- ssdd target--> 129 + <!-- To use this target remove the if="${never}" statement and create the LICENSE in your project 130 + and create the web.xml file with the woapplication task.--> 131 + <target name="ssdd" if="${never}"> 132 + <mkdir dir="${dest.dir}/${project.name}/WEB-INF/tlds"/> 133 + <copy todir="${dest.dir}/${project.name}/WEB-INF/"> 134 + <fileset dir="${dest.dir}/${project.name}.woa/Contents/"> 135 + <include name="web.xml"/> 136 + </fileset> 137 + </copy> 138 + <copy todir="${dest.dir}/${project.name}/WEB-INF/"> 139 + <fileset dir=".."> 140 + <include name="LICENSE"/> 141 + </fileset> 142 + </copy> 143 + <copy todir="${dest.dir}/${project.name}/WEB-INF/"> 144 + <fileset dir="${dest.dir}"> 145 + <include name="${project.name}.woa/**"/> 146 + </fileset> 147 + </copy> 148 + <copy todir="${dest.dir}/${project.name}/WEB-INF/tlds"> 149 + <fileset dir="${wo.wosystemroot}/Library/Frameworks/JavaWOJSPServlet.framework/Resources/"> 150 + <include name="WOtaglib_1_0.tld"/> 151 + </fileset> 152 + </copy> 153 + </target> 154 + 155 + <!-- copy strings files --> 156 + <target name="copy.strings"> 157 + <copy todir="${dest.dir}/${project.name}.woa/Contents/Resources"> 158 + <fileset dir="." casesensitive="yes"> 159 + <include name="*.strings"/> 160 + <include name="**/*.strings"/> 161 + </fileset> 162 + <mapper type="flatten"/> 163 + </copy> 164 + </target> 165 + 166 + <target name = "compile" depends = "setProps,init.build" > 167 + <mkdir dir = "bin"/> 168 + <javac srcdir = "src" destdir = "bin"> 169 + <classpath> 170 + <!-- package and go example--> 171 + <fileset dir="../packageandgo/frameworks"> 172 + <include name = "**/*.jar"/> 173 + </fileset> 174 + <fileset dir="${wo.dir.user.home.library.frameworks}" includesfile = "woproject/ant.frameworks.user.home"> 175 + <include name = "**/*.jar"/> 176 + </fileset> 177 + <fileset dir="${wo.wolocalroot}" includesfile = "woproject/ant.frameworks.wo.wolocalroot"> 178 + <include name = "**/*.jar"/> 179 + </fileset> 180 + <fileset dir="${wo.wosystemroot}" includesfile = "woproject/ant.frameworks.wo.wosystemroot"> 181 + <include name = "**/*.jar"/> 182 + </fileset> 183 + </classpath> 184 + </javac> 185 + </target> 186 +</project>
- packageandgobuild.xml
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.XWikiGuest - Size
-
... ... @@ -1,0 +1,1 @@ 1 +6.8 KB - Content
-
... ... @@ -1,0 +1,186 @@ 1 +<project name="Uli" default="build" basedir="."> 2 + 3 + <!-- main targets --> 4 + <!-- add optional targets to depends list if needed --> 5 + <target name="build" depends="setProps,init.build,build.woapp,war,ssdd"/> 6 + 7 + <target name="compileAndBuild" depends="setProps,init.build,compile,build.woapp,war,ssdd" /> 8 + 9 + <target name="install" depends="setProps,init.install,build.woapp,war,ssdd"/> 10 + 11 + <target name="clean" depends="setProps"> 12 + <delete dir="dist"/> 13 + </target> 14 + 15 + <!-- property determination --> 16 + <target name="setProps"> 17 + <property file="${user.home}${file.separator}build.properties"/> 18 + <property file="build.properties"/> 19 + <property file="${user.home}${file.separator}Library${file.separator}wobuild.properties"/> 20 + <condition property="wo.properties.check.failed"> 21 + <not> 22 + <and> 23 + <isset property="wo.wosystemroot"/> 24 + <isset property="wo.wolocalroot"/> 25 + </and> 26 + </not> 27 + </condition> 28 + <fail message="Could not find ${user.home}${file.separator}Library${file.separator}wobuild.properties." if="wo.properties.check.failed"/> 29 + <property name="install.dir" value="${wo.wolocalroot}/Library/WebObjects/Applications"/> 30 + </target> 31 + 32 + <!-- basic initializations --> 33 + <target name="init.install"> 34 + <tstamp/> 35 + <property name="dest.dir" value="${install.dir}"/> 36 + </target> 37 + 38 + <target name="init.build"> 39 + <tstamp/> 40 + <property name="dest.dir" value="dist"/> 41 + </target> 42 + 43 + <!-- woproject tasks --> 44 + <target name="build.woapp"> 45 + 46 + <taskdef name="woapplication" classname="org.objectstyle.woproject.ant.WOApplication"> 47 + </taskdef> 48 + 49 + <!-- add webXML="true" to generate a web.xml file --> 50 + <woapplication name="${project.name}" stdFrameworks="false" 51 + destDir="${dest.dir}" 52 + customInfoPListContent="${customInfoPListContent}" 53 + principalClass="${principalClass}" 54 + webXML="${webXML}" 55 + webXML_CustomContent="${webXML_CustomContent}"> 56 + <classes dir="${classes.dir}"> 57 + <patternset> 58 + <includesfile name="woproject/classes.include.patternset"/> 59 + <excludesfile name="woproject/classes.exclude.patternset"/> 60 + </patternset> 61 + </classes> 62 + <wsresources dir="."> 63 + <patternset> 64 + <includesfile name="woproject/wsresources.include.patternset"/> 65 + <excludesfile name="woproject/wsresources.exclude.patternset"/> 66 + </patternset> 67 + </wsresources> 68 + <resources dir="."> 69 + <patternset> 70 + <includesfile name="woproject/resources.include.patternset"/> 71 + <excludesfile name="woproject/resources.exclude.patternset"/> 72 + </patternset> 73 + </resources> 74 + <!-- package and go example--> 75 + <frameworks root="../packageandgo/frameworks" embed="true"> 76 + <include name="*.framework"/> 77 + </frameworks> 78 + <frameworks root="${wo.wolocalroot}"> 79 + <patternset> 80 + <includesfile name="woproject/ant.frameworks.wo.wolocalroot"/> 81 + </patternset> 82 + </frameworks> 83 + <frameworks root="${wo.wosystemroot}"> 84 + <patternset> 85 + <includesfile name="woproject/ant.frameworks.wo.wosystemroot"/> 86 + </patternset> 87 + </frameworks> 88 + <frameworks root="${user.home}"> 89 + <patternset> 90 + <includesfile name="woproject/ant.frameworks.user.home"/> 91 + </patternset> 92 + </frameworks> 93 + <otherclasspath root="${wo.wosystemroot}"> 94 + <patternset> 95 + <includesfile name="woproject/ant.classpaths.wo.wosystemroot"/> 96 + </patternset> 97 + </otherclasspath> 98 + <lib dir="."> 99 + <include name="Add .jar's that should be copied in the woa."/> 100 + <exclude name="**/*.woa/**"/> 101 + </lib> 102 + </woapplication> 103 + </target> 104 + 105 + <!-- optional targets --> 106 + 107 + <!-- war target--> 108 + <!-- To use this target remove the if="${never}" statement and create the LICENSE in your project 109 + and create the web.xml file with the woapplication task.--> 110 + <target name="war" if="${never}"> 111 + <war destfile="${dest.dir}/${project.name}.war" 112 + webxml="${dest.dir}/${project.name}.woa/Contents/web.xml"> 113 + <fileset dir="${dest.dir}"> 114 + <include name="${project.name}.woa/**"/> 115 + </fileset> 116 + <fileset dir=".."> 117 + <include name="LICENSE"/> 118 + </fileset> 119 + <lib dir="${wo.wosystemroot}/Library/Frameworks/JavaWOJSPServlet.framework/WebServerResources/Java/"> 120 + <include name="JavaWOJSPServlet_client.jar"/> 121 + </lib> 122 + <zipfileset dir="${wo.wosystemroot}/Library/Frameworks/JavaWOJSPServlet.framework/Resources/" prefix="tlds"> 123 + <include name="WOtaglib_1_0.tld"/> 124 + </zipfileset> 125 + </war> 126 + </target> 127 + 128 + <!-- ssdd target--> 129 + <!-- To use this target remove the if="${never}" statement and create the LICENSE in your project 130 + and create the web.xml file with the woapplication task.--> 131 + <target name="ssdd" if="${never}"> 132 + <mkdir dir="${dest.dir}/${project.name}/WEB-INF/tlds"/> 133 + <copy todir="${dest.dir}/${project.name}/WEB-INF/"> 134 + <fileset dir="${dest.dir}/${project.name}.woa/Contents/"> 135 + <include name="web.xml"/> 136 + </fileset> 137 + </copy> 138 + <copy todir="${dest.dir}/${project.name}/WEB-INF/"> 139 + <fileset dir=".."> 140 + <include name="LICENSE"/> 141 + </fileset> 142 + </copy> 143 + <copy todir="${dest.dir}/${project.name}/WEB-INF/"> 144 + <fileset dir="${dest.dir}"> 145 + <include name="${project.name}.woa/**"/> 146 + </fileset> 147 + </copy> 148 + <copy todir="${dest.dir}/${project.name}/WEB-INF/tlds"> 149 + <fileset dir="${wo.wosystemroot}/Library/Frameworks/JavaWOJSPServlet.framework/Resources/"> 150 + <include name="WOtaglib_1_0.tld"/> 151 + </fileset> 152 + </copy> 153 + </target> 154 + 155 + <!-- copy strings files --> 156 + <target name="copy.strings"> 157 + <copy todir="${dest.dir}/${project.name}.woa/Contents/Resources"> 158 + <fileset dir="." casesensitive="yes"> 159 + <include name="*.strings"/> 160 + <include name="**/*.strings"/> 161 + </fileset> 162 + <mapper type="flatten"/> 163 + </copy> 164 + </target> 165 + 166 + <target name = "compile" depends = "setProps,init.build" > 167 + <mkdir dir = "bin"/> 168 + <javac srcdir = "src" destdir = "bin"> 169 + <classpath> 170 + <!-- package and go example--> 171 + <fileset dir="../packageandgo/frameworks"> 172 + <include name = "**/*.jar"/> 173 + </fileset> 174 + <fileset dir="${wo.dir.user.home.library.frameworks}" includesfile = "woproject/ant.frameworks.user.home"> 175 + <include name = "**/*.jar"/> 176 + </fileset> 177 + <fileset dir="${wo.wolocalroot}" includesfile = "woproject/ant.frameworks.wo.wolocalroot"> 178 + <include name = "**/*.jar"/> 179 + </fileset> 180 + <fileset dir="${wo.wosystemroot}" includesfile = "woproject/ant.frameworks.wo.wosystemroot"> 181 + <include name = "**/*.jar"/> 182 + </fileset> 183 + </classpath> 184 + </javac> 185 + </target> 186 +</project>