cancel
Showing results for 
Search instead for 
Did you mean: 

Custom project

manuelgentile
Champ in-the-making
Champ in-the-making
I have to customize both repository and web-client project.
I wonder if it's possible to create a new eclipse project containing these customization (like sdk projects) and have a build.xml that mix base version of alfresco repository and web client with these customization???
Any example?
I see sdk projects but each oh these generate a new .jar
I don't knwow how we can put all togegthe in a new war file.

I have some problem with ant….
🙂
2 REPLIES 2

jmliege
Champ in-the-making
Champ in-the-making
You may just copy your newly generated package(s) into either %TOMCAT_HOME%/shared/lib or either %TOMCAT_HOME%/webapps/alfresco/WEB-INF/lib folder regardings your customization (see wiki http://wiki.alfresco.com/wiki/Packaging_And_Deploying_Extensions ), and then start/stop the alfresco Tomcat service.

Here's some idea of what to do with ant(remember it's just an idea…)

First copy your new stuff…(upon the provided 'package' target !!!)

<!– deploy customization –>
    <target name="deploy" depends="package">
      <!– copy all custom jsp to the webapp jsp/extension folder –>
      <copy todir="${custom.jsp.dir}">
         <fileset dir=".">
            <include name="**/*.jsp" />
         </fileset>
      </copy>
      
      <!– copy generated lib to folder. –>
      <!–
      <copy todir="${alfresco.lib.dir}" file="${package.file}"/> –>
      <copy todir="${tomcat.dir}/shared/lib" file="${package.file}" />
      <!– restart Alfresco web-client –>
      <antcall target="restartTomcatService" />
   </target>

Here's a sample of how to start/stop the Tomcat service.
(Needed to do the previous "antcall" …)


<!– Restart alfresco-tomcat service –>
   <target name="restartTomcatService">
        <echo>shutdown Local tomcat service</echo>
        <exec dir="." executable="cmd">
           <arg line="/c net stop 'alfrescoTomcat'"/>      
        </exec>      
        <echo>startup Local tomcat service</echo>
        <exec dir="." executable="cmd">
           <arg line="/c net start 'alfrescoTomcat'"/>      
        </exec>              
   </target>

Hope this may help you a bit.

For more information on how to use ant: http://ant.apache.org/manual/index.html

JMarc

davidc
Star Contributor
Star Contributor
You can have as many extensions as you like in a single Eclipse project.  Just  create a new Project that depends on the "SDK AlfrescoEmbedded" project for dependent jar files.

Repository extensions can be deployed to an existing Alfresco installation without the need to re-build Alfresco.  Each SDK sample project provides an ant script for packaging your extensions.  As pointed above you can copy the packaged .jar file to Tomcat.

Web Client extensions can be integrated into an existing Alfresco .war using the ant target integrate-extension as found in each of the Web Client SDK sample projects.