cancel
Showing results for 
Search instead for 
Did you mean: 

Building SDK & AMPs from Source

ukdavo
Champ in-the-making
Champ in-the-making
Hi there

Can someone please detail how to build the entire Alfresco distribution from Enterprise SVN?

I've got the WARs built using the default build-tomcat task in build.xml but I'm struggling to get the core AMPs and SDK built.

I tried building the SDK using the command "ant -f continuous.xml distribute-sdk". It failed with the following output:

      [zip] Building zip: C:\lib\java\alfresco\alfresco-enterprise\root\build\as
semble\sdk\doc\taglib\alfresco-taglib-doc.zip
    [mkdir] Created dir: C:\lib\java\alfresco\alfresco-enterprise\root\build\ass
emble\sdk\lib
    [mkdir] Created dir: C:\lib\java\alfresco\alfresco-enterprise\root\build\ass
emble\sdk\lib\remote

BUILD FAILED
C:\lib\java\alfresco\alfresco-enterprise\root\continuous.xml:1277: Warning: Coul
d not find file C:\lib\java\alfresco\alfresco-enterprise\root\projects\web-servi
ce-client\build\dist\alfresco-web-service-client-3.4.d.jar to copy.
I then tried building the AMPs with "ant -f build.xml distribute-core-amps" but it failed with the following output.

    [javac] symbol  : class QName
    [javac] location: class org.alfresco.module.vti.handler.alfresco.VtiPathHelp
er
    [javac]     public String getDwsFromDocumentName(String document, final QNam
e spaceType)
    [javac]                                                                 ^
    [javac] C:\lib\java\alfresco\alfresco-enterprise\root\modules\sharepoint\amp
\source\java\org\alfresco\module\vti\handler\alfresco\VtiPathHelper.java:524: ca
nnot find symbol
    [javac] symbol  : class NodeRef
    [javac] location: class org.alfresco.module.vti.handler.alfresco.VtiPathHelp
er
    [javac]     public NodeRef getRootNodeRef()
    [javac]            ^
    [javac] 100 errors

BUILD FAILED
C:\lib\java\alfresco\alfresco-enterprise\root\projects.xml:2173: The following e
rror occurred while executing this line:
C:\lib\java\alfresco\alfresco-enterprise\root\macros.xml:28: Compile failed; see
the compiler error output for details.
Any ideas?
4 REPLIES 4

mrogers
Star Contributor
Star Contributor
Regarding the SDK I think I fixed that in the last couple of months since there were some unbuilt dependencies.   It looks like you still have the old build system.

I also note that the version being looked for is
alfresco-web-service-client-3.4.d.jar which is not an enterprise jar.

ukdavo
Champ in-the-making
Champ in-the-making
Thanks for replying so quickly. I only checked out the Enterprise code last week so I'm not sure what's going on. I'll try a fresh checkout & build anyway just to make sure I'm not doing anything daft.

Regards

Mark

ukdavo
Champ in-the-making
Champ in-the-making
OK - I've checked out from HEAD to a new local directory. The WARs build fine.

I've just tried building the SDK with "ant -f continuous.xml distribute-sdk". It starts off with this..


C:\lib\java\alfresco\enterprise-head\root>ant -f continuous.xml distribute-sdk
Buildfile: continuous.xml

init:
     [echo] user.home = C:\Documents and Settings\mdavidson
     [echo] version.number = 3.4.d

..then fails with..


e\sdk\doc\taglib
      [zip] Building zip: C:\lib\java\alfresco\enterprise-head\root\build\assemb
le\sdk\doc\taglib\alfresco-taglib-doc.zip
    [mkdir] Created dir: C:\lib\java\alfresco\enterprise-head\root\build\assembl
e\sdk\lib
    [mkdir] Created dir: C:\lib\java\alfresco\enterprise-head\root\build\assembl
e\sdk\lib\remote

BUILD FAILED
C:\lib\java\alfresco\enterprise-head\root\continuous.xml:1277: Warning: Could no
t find file C:\lib\java\alfresco\enterprise-head\root\projects\web-service-clien
t\build\dist\alfresco-web-service-client-3.4.d.jar to copy.

I'm guessing that the version number is incorrectly set. Where am I supposed to set it? Is it in one of the properties files or am I supported it set it at the command line?

Regards

Mark

ukdavo
Champ in-the-making
Champ in-the-making
Hmm it gets stranger. It looks like something in the build script has overwritten the root/repository/config/alfresco/version.properties file. It currently contains this..


#
# Alfresco version information
#

# Version label

version.major=3
version.minor=4
version.revision=0
version.label=d

# Edition label

version.edition=Community

# Build number

version.build=r24874

# Schema number

version.schema=4113

This bit from continuous.xml looks suspicious:


   <target name="set-build-devbox-number"
           if="alf.build.number">
      <exec executable="svn">
         <arg line="revert ${dir.project.repository.config}/alfresco/version.properties"/>
      </exec>
      <replace file="${dir.project.repository.config}/alfresco/version.properties"
               token="@build-number@"
               value="${alf.build.number}"
               summary="yes" />
      <replace file="${dir.project.repository.config}/alfresco/version.properties"
               token="version.edition=Community"
               value="version.edition=${file.name.codeline}"
               summary="yes" />
   </target>

I'm still reading through the build script so stay tuned..