You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Patrick Sofin <pa...@yahoo.com> on 2011/08/26 21:37:11 UTC

Apache CXF Sample Build problems

gentlemen:

It would seem to be impossible to follow the readme.txt directions provided with Apache CXF 2.4.2 in the samples directory on Windows 7 Ultimate edition. These instructions are intended to compile all of the sample projects using Ant.

I set up the environment as required. The environment seemed to check out using a command shell window.
I set the working directory to: "C:\Program Files\Apache Software Foundation\apache-cxf-2.4.2\samples"

I tried the command: "ant -buildfile .\common_build.xml war"

I failed with this message:

BUILD FAILED
C:\Program Files\Apache Software Foundation\apache-cxf-2.4.2\samples\common_buil
d.xml:75: Apache CXF requires Java version 1.5 or higher. You are currently usin
g Java version 1.7.

I managed to work around that error by changing "common_build.xml"

I changed this:

    <condition property="is.java.version.15">
        <or>
            <equals arg1="${ant.java.version}" arg2="1.5"/>
            <equals arg1="${ant.java.version}" arg2="1.6"/>
        </or>
    </condition>

    <fail message="Apache CXF requires Java version 1.5 or higher. You are currently using Java version ${ant.java.version}."
        unless="is.java.version.15"/>

to this:

    <condition property="is.java.version.15">
        <or>
            <equals arg1="${ant.java.version}" arg2="1.5"/>
            <equals arg1="${ant.java.version}" arg2="1.6"/>
            <equals arg1="${ant.java.version}" arg2="1.7"/>
     </or>
    </condition>

    <fail message="Apache CXF requires Java version 1.5 or higher. You are currently using Java version ${ant.java.version}."
        unless="is.java.version.15"/>

I then got past the Java Version error message.

I next tried "ant -buildfile .\common_build_PS.xml war"

I failed with this message:

C:\Program Files\Apache Software Foundation\apache-cxf-2.4.2\samples>ant -buildf
ile .\common_build_PS.xml war
Buildfile: C:\Program Files\Apache Software Foundation\apache-cxf-2.4.2\samples\
common_build_PS.xml
 [loadfile] Do not set property srcbuild.classpath as its length is 0.

BUILD FAILED
Target "war" does not exist in the project "cxf  build file".

Total time: 1 second

I examined the buildfile, and verified that indeed there is no "target name" war in this file.

I did some more digging and discovered that the "FULL WAR" build should happen by default since about CXF 2.0.2.

So I tried this command:
"ant -buildfile .\common_build_PS.xml"


I failed with this message:
C:\Program Files\Apache Software Foundation\apache-cxf-2.4.2\samples>ant -buildf
ile .\common_build_PS.xml
Buildfile: C:\Program Files\Apache Software Foundation\apache-cxf-2.4.2\samples\
common_build_PS.xml
 [loadfile] Do not set property srcbuild.classpath as its length is 0.

maybe.generate.code:
 [loadfile] Do not set property srcbuild.classpath as its length is 0.

BUILD FAILED
C:\Program Files\Apache Software Foundation\apache-cxf-2.4.2\samples\common_buil
d_PS.xml:120: The following error occurred while executing this line:
Target "generate.code" does not exist in the project "cxf  build file".

Total time: 1 second

I am running out of ideas here. The buildfiles were almost exactly the same for versions 2.3.6, 2.2.12, and 2.0.10

Also, I cannot find any installation instructions per se.

The 

CXF 2.4.2 Release Notes talk about

Installation Prerequisites ( which I completed)
and 


Building the Samples ( which I cannot do, as seen above)
but do not say anything about performing the actual installation.

Can you help me please?

Thank you,
Patrick Sofin
719-963-4037
pasofin@yahoo.com