cancel
Showing results for 
Search instead for 
Did you mean: 

compiling workflow project

sami88
Champ in-the-making
Champ in-the-making
I'm tring to work with Someco Workflow Project.
In the moment of compiling using ANT an error appear(
build.xml:59: C:\lib\server does not exist.
)
and warning:
 [javac] C:\Workspace\workflow-article-repo\build.xml:59: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds


I have the following build.xml file:


<?xml version="1.0" encoding="UTF-8"?>
<project name="ecmarchitect.com Alfresco Advanced Workflows Repo" default="compile" basedir=".">


<property name="project.dir" value="." />
<property name="project.name" value="alfresco-workflow-tutorial-repo" />
<property name="src.dir" value="${project.dir}/src" />
<property name="web.dir" value="${src.dir}/web" />
<property name="build.dir" value="${project.dir}/build" />   
<property name="bin.dir" value="${project.dir}/bin" />
<property name="package.repo.zip" value="${build.dir}/${project.name}.zip" />
<property name="package.repo.jar" value="${build.dir}/${project.name}.jar" />
<property name="project.file.zip" value="${build.dir}/${project.name}-project.zip" />
<property name="config.dir" value="/config" />
<property name="repo.extension.dir" value="/alfresco/extension" />
<property name="jar.file" value="${build.dir}/lib/alfresco-sdk-custom-wokflow.jar"/>

   <target name="clean" description="removes all generated files">
      <delete dir="${build.dir}" />
      <delete dir="${bin.dir}" />      
   </target>

   <target name="setup">
      <mkdir dir="${build.dir}" />
        <mkdir dir="${build.dir}/dist" />
        <mkdir dir="${build.dir}/lib" />
   </target>

   <target name="package-extension" depends="setup, package-jar">
      <delete file="${package.repo.zip}" />
      <zip destfile="${package.repo.zip}">
         <zipfileset dir="${project.dir}${config.dir}${repo.extension.dir}" prefix="WEB-INF/classes${repo.extension.dir}" />
         <zipfileset file="${package.repo.jar}" prefix="WEB-INF/lib" />
         <zipfileset dir="${web.dir}" />
      </zip>
   </target>

   <target name="deploy" depends="package-extension">
      <unzip src="${package.repo.zip}" dest="${alfresco.webapp.dir}" />
   </target>

   <target name="zip-project" depends="setup">
      <delete file="${project.file.zip}" />
      <zip destfile="${project.file.zip}">
         <zipfileset dir="${project.dir}" excludes="build/** bin/**" prefix="content-article" />
      </zip>
   </target>   

    <path id="class.path">
        <dirset dir="${build.dir}" />
        <fileset dir="../../lib/server" includes="**/*.jar"/>
    </path>
   
    <target name="compile">
        <mkdir dir="${build.dir}/classes" />
        <javac classpathref="class.path" srcdir="${project.dir}/src/java" destdir="${build.dir}/classes" />
    </target>

   <target name="package-jar" depends="setup, compile"
      description="Jars up the compiled classes and ${web.dir}/META-INF into ${package.repo.jar}">
         <delete file="${package.repo.jar}" />
         <jar destfile="${package.repo.jar}">
            <!–<fileset dir="${bin.dir}" includes="com/**" />  –>
            <fileset dir="${build.dir}/classes" excludes="**/custom*,**/*Test*" includes="**/*.class" />
         </jar>
   </target>
     <target name="package-amp" depends="setup, package-jar" description="Package the Module" >
           <zip destfile="${amp.file}" >
               <fileset dir="${project.dir}/build" includes="lib/*.jar" />
               <fileset dir="${project.dir}" includes="config/**/*.*" excludes="**/module.properties" />
               <fileset dir="${project.dir}/config/alfresco/module/sdkDemoAmp" includes="module.properties" />
           </zip>
       </target>
   
</project>



build.properties file:


alfresco.sdk.dir=C\:\\Alfresco\\sdkFinal
alfresco.webapp.dir=C\:\\Alfresco\\tomcat\\webapps\\alfresco



can someone help me ?
1 REPLY 1

jpotts
World-Class Innovator
World-Class Innovator
It looks to me like your class.path fileset is wrong. You are telling it to look in two directories up from the current directory for a directory called /lib/server that does not exist. That /lib/server directory can be found in the SDK after you unzip it.

That build XML looks slightly different from the latest version of that source for 4.2.c which is here: https://github.com/jpotts/alfresco-developer-series/tree/4.2.c/workflow/alfresco-workflow-tutorial-r...

Jeff