06-22-2007 03:45 AM
06-22-2007 05:56 AM
+ Project
+ source
+ alfresco
+ extension
- *-context.xml
- …
+ java packages
- …
- build.xml
<?xml version="1.0"?>
<project name="Custom Action Build File" default="deploy" basedir=".">
<property environment="env"/>
<property name="tomcat.dir" value="${env.TOMCAT_HOME}/webapps"/>
<property name="project.dir" value="."/>
<property name="build.dir" value="${project.dir}/build"/>
<property name="web.dir" value="${project.dir}/web" />
<property name="package.file" value="${build.dir}/custom_action.jar"/>
<target name="package-jar">
<delete file="${package.file}" />
<jar destfile="${package.file}">
<fileset dir="${build.dir}"/>
</jar>
</target>
<target name="integrate-extension" depends="package-jar">
<available file="alfresco.war" type="file" property="alfresco.war.present" />
<fail unless="alfresco.war.present"
message="Could not find alfresco.war, please copy it to ${basedir}" />
<zip destfile="alfresco.war" update="true">
<zipfileset file="${package.file}" prefix="WEB-INF/lib" />
<zipfileset dir="${web.dir}" />
</zip>
</target>
<target name="remove-copy-war">
<delete file="${project.dir}/alfresco.war"/>
<copy file="${project.dir}/../alfresco.war" todir="${project.dir}"/>
</target>
<target name="undeploy" depends="remove-copy-war">
<delete dir="${tomcat.dir}/alfresco"/>
<delete file="${tomcat.dir}/alfresco.war"/>
</target>
<target name="deploy" depends="undeploy, integrate-extension">
<copy file="${project.dir}/alfresco.war" todir="${tomcat.dir}"/>
</target>
</project>
06-22-2007 06:54 AM
Basically your project hierarchy should look something like this:Are you talking about the folder within the folder where I unzipped Alfresco SDK V2.0? such as
Code:
+ Project
+ source
+ alfresco
+ extension
- *-context.xml
- …
+ java packages
- …
- build.xml
06-22-2007 11:57 AM
<property name="web.dir" value="${project.dir}/web" />
<zipfileset dir="${web.dir}" />
Hope this helps,06-25-2007 02:06 AM
06-25-2007 07:18 AM
06-28-2007 03:19 AM
06-28-2007 07:20 AM
+ Project
+ config
+ alfresco
+ model
- permissionDefinitions.xml
Then, your build.xml can have a additional lines like so:…
<property name="config.dir" value="${project.dir}/config" />
…
<target name="integrate-extension">
…
<zip destfile="alfresco.war" update="true">
<zipfileset file="${package.file}" prefix="WEB-INF/lib" />
<zipfileset dir="${config.dir}" prefix="WEB-INF/classes" />
</zip>
…
This will inject everything under the config dir into the vanilla alfresco.war. So you're really overwriting the file in the WAR directly but your changes are still considered external, so even if someone corrupts the deployed web app or deletes it you're still safe.06-29-2007 02:50 AM
09-03-2007 10:03 AM
+ workspace
+ Project
- alfresco.war
When the build starts this war file is copied into the Project folder, your customizations are injected in it and the new alfresco.war (with customizations) is copied to webapps.Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.