Windows 7 Ultimate Edition 64 bit, Java SDK v1.7, ant v1.8.2, Apache Tomcat v7.0, Eclipse Indigo v3.7
I set out to build the examples for Apache CXF 2.4.2, the binary distribution. I am using Windows 7 Ultimate 64 bit, Java SDK 1.7, Tomcat 7.0, and Eclipse Indigo 3.7.
I down loaded the Apache CXF 2.4.2 binary distribution for Windows zip file. I uncompressed and copied the expanded directory to:
Apache Ant 1.8.2
'C:Program FilesApache Software Foundationapache-cxf-2.4.2'
I changed directory to the samples directory:
'C:Program FilesApache Software Foundationapache-cxf-2.4.2samples'
I began to follow the directions in the README.txt file in that directory which begins with:
'Basic Setup for Building and Running the Demos.'
CXF; CXF-3772; Apache CXF 2.4.2 samples do not build on Windows 7 Ultimate 64 bit using Java SDK 1.7 and ant 1.8.2. Following the README.txt directions. Create a command called foo.bat and put it in the C: Ant bin directory. All this command has to do is echo 'You've got me!' You simply want to see if you can execute a command located in that directory. So for Windows XP, use C: Progra~1 Java jdk1.x.x jre and for Windows 7, use C: Progra~2 Java jdk1.6.0_26 jre if it’s installed in the Program Files(x86) folder (otherwise use the same as Windows XP). That alone is enough to get Ant to work, but for convenience, it’s a good idea to add the Ant binary path to the PATH variable. This variable. 1.8.2 hasn't been packaged for Natty yet, the most recent packaged version of Ant in the Natty archives is 1.8.1-1. 1.8.2 has been packaged for Oneiric, so you can either wait for Oneiric release, or you could follow the Backport request process and request that the Oneiric packages get backported to Natty.
I had already installed the Java SDK V1.7.
I installed Apache ant v1.8.2.
To install Apache Ant on Windows, you just need to download the Ant’s zip file, and Unzip it, and configure the ANT_HOME Windows environment variables. Visit Apache Ant official website, download the Ant binary zip file, for example: apache-ant-1.9.4-bin.zip, unzip it to the folder you want to.
I opened a cmd tool window and verified that I had set up the environment correctly:
CXF_HOME:
C:Program FilesApache Software Foundationapache-cxf-2.4.2samples>echo %CXF_H OME% C:Program FilesApache Software Foundationapache-cxf-2.4.2
JAVA_HOME:
C:Program FilesApache Software Foundationapache-cxf-2.4.2samples>echo %JAVA_ HOME% C:Program FilesJavajdk1.7.0
ANT_HOME:
C:Program FilesApache Software Foundationapache-cxf-2.4.2samples>echo %ANT_H OME% C:Program FilesApache Software Foundationapache-ant-1.8.2
PATH:
C:Program FilesApache Software Foundationapache-cxf-2.4.2samples>echo %PATH%
C:Program FilesCommon FilesMicrosoft SharedWindows Live;C:Program Files (x8
6)Common FilesMicrosoft SharedWindows Live;C:Windowssystem32;C:Windows;C: WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:Program Fil es (x86)QuickTimeQTSystem;C:Program Files (x86)Common FilesRoxio Shared9. 0DLLShared;C:Program Files (x86)GTK2-Runtimebin;C:Program Files (x86)Wind ows LiveShared;C:Program Files (x86)Apache Software FoundationTomcat 7.0bin ;C:Program FilesJavajdk1.7.0bin;C:Program FilesApache Software Foundation apache-ant-1.8.2bin;C:Program FilesApache Software Foundationapache-maven-3. 0.3bin;C:Program FilesApache Software Foundationapache-cxf-2.4.2bin
CLASSPATH:
C:Program FilesApache Software Foundationapache-cxf-2.4.2samples>echo %CLASS PATH% .;C:Program Files (x86)QuickTimeQTSystemQTJava.zip;C:Program FilesMySQLmy sql-connector-java-5.1.17mysql-connector-java-5.1.17-bin.jar;C:Program FilesA pache Software Foundationapache-cxf-2.4.2libcxf-manifest.jar;.buildclasses
CATALINA_HOME:
C:Program FilesApache Software Foundationapache-cxf-2.4.2samples>echo %CATAL INA_HOME% C:Program Files (x86)Apache Software FoundationTomcat 7.0
I verified that Tomcat 7.0 was running with the Tomcat icon in the system tray.
The REAME.txt now Says:
[Now we have two flavors WAR, one is Full WAR that included all the jars
in the $WAR/WEB-INF/lib folder, the other is minimum WAR, which did not include any jars in the WAR.
1)run 'ant war' to build a Full WAR.
2)run 'ant war -Dwithout.libs=true' to build a minimum WAR.]
I issued the command:
'C:Program FilesApache Software Foundationapache-cxf-2.4.2samples>ant war'
ERROR MESSAGE:
Buildfile: build.xml does not exist! Build failed
I checked in the directory, and indeed there was no file named 'build.xml'. There was a file named 'common_build.xml'.
ant -help said there was a command line option '-buildfile'.
I issued the command:
'C:Program FilesApache Software Foundationapache-cxf-2.4.2samples>ant -buildf ile common_build.xml war
ERROR MESSAGE:
Buildfile: C:Program FilesApache Software Foundationapache-cxf-2.4.2samples common_build.xml [loadfile] Do not set property srcbuild.classpath as its length is 0.
BUILD FAILED
C:Program FilesApache Software Foundationapache-cxf-2.4.2samplescommon_buil d.xml:75: Apache CXF requires Java version 1.5 or higher. You are currently usin g Java version 1.7.
Total time: 1 second
I edited the file common-build.xml. I replaced the section:
<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'/>
with:
<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 issued the command:
'C:Program FilesApache Software Foundationapache-cxf-2.4.2samples>ant -buildf ile common_build.xml war
ERROR MESSAGE:
Buildfile: C:Program FilesApache Software Foundationapache-cxf-2.4.2samples common_build.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 checked 'common_build.xml' and verified that indeed there is no target name line like:
<target name='war'>
There is a line
<antcall target='war'/> but this does not appear to be the same thing.
Some research suggested that the default build option would create the war file.
I issued the command:
C:Program FilesApache Software Foundationapache-cxf-2.4.2samples>ant -buildf ile common_build.xml
ERROR MESAGE:
Buildfile: C:Program FilesApache Software Foundationapache-cxf-2.4.2samples common_build.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 FilesApache Software Foundationapache-cxf-2.4.2samplescommon_buil d.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 decided to give up trying to build all of the Apache CXF 2.4.2 samples at once.
I changed directory to:
'C:Program FilesApache Software Foundationapache-cxf-2.4.2samplesjava_first_jaxws'.
I would now try to build just this one sample.
The README.txt file begins with:
'Java First demo using jax-ws APIs and jsr-181'
The environment was correct, so I proceeded onward!
later in the README.txt file:
'Building and running the demo using ant' From the base directory of this sample (i.e., where this README file is located), the Ant build.xml file can be used to build and run the demo. The server and client targets automatically build the demo.
Using either UNIX or Windows:
ant server (from one command line window)
ant client (from a second command line window)
I issued the command:
C:Program FilesApache Software Foundationapache-cxf-2.4.2samplesjava_first_ jaxws>ant server
ERROR MESSAGE:
Buildfile: C:Program FilesApache Software Foundationapache-cxf-2.4.2samples java_first_jaxwsbuild.xml [loadfile] Do not set property srcbuild.classpath as its length is 0.
Hanc drivers ed final answers. maybe.generate.code:
compile:
[javac] C:Program FilesApache Software Foundationapache-cxf-2.4.2samples common_build.xml:128: warning: 'includeantruntime' was not set, defaulting to b uild.sysclasspath=last; set to false for repeatable builds [javac] Compiling 9 source files to C:Program FilesApache Software Foundat ionapache-cxf-2.4.2samplesjava_first_jaxwsbuildclasses [javac] javac: invalid flag: FilesApache [javac] Usage: javac <options> <source files> [javac] use -help for a list of possible options
BUILD FAILED
C:Program FilesApache Software Foundationapache-cxf-2.4.2samplescommon_buil d.xml:128: Compile failed; see the compiler error output for details.
Total time: 1 second
I issued the command:
C:Program FilesApache Software Foundationapache-cxf-2.4.2samplesjava_first_ jaxws>ant client
ERROR MESSAGE:
Buildfile: C:Program FilesApache Software Foundationapache-cxf-2.4.2samples java_first_jaxwsbuild.xml [loadfile] Do not set property srcbuild.classpath as its length is 0. ![]() Download Apache Ant For Windows
maybe.generate.code:
compile:
[javac] C:Program FilesApache Software Foundationapache-cxf-2.4.2samples common_build.xml:128: warning: 'includeantruntime' was not set, defaulting to b uild.sysclasspath=last; set to false for repeatable builds [javac] Compiling 9 source files to C:Program FilesApache Software Foundat ionapache-cxf-2.4.2samplesjava_first_jaxwsbuildclasses [javac] javac: invalid flag: FilesApache [javac] Usage: javac <options> <source files> [javac] use -help for a list of possible options
BUILD FAILED
C:Program FilesApache Software Foundationapache-cxf-2.4.2samplescommon_buil d.xml:128: Compile failed; see the compiler error output for details.
Total time: 1 second
There would appear to be an issue with the Microsoft passion for putting spaces in the path. I read many warnings about not using quotes for any of the paths in the environment for fear of breaking ant.
I would like to compile, run, and use these samples.
Can anyone out there help me?
Download Apache Ant 1.8 2 For Windows
> I get > > ant -version > Apache Ant version 1.8.1 compiled on April 30 2010 > on linux. > > Peter > > > On Tue, Jun 15, 2010 at 1:58 PM, Alex Foreman > <.[hidden email]<[hidden email]>> > wrote: > > There seems to be a problem with 1.8.1 reporting the correct version. > > > > With Ant 1.8.0 on the classpath: > > > > unix: > >> ant -version > > Apache Ant version 1.8.0 compiled on February 1 2010 > > windows: > > C:> ant -version > > Apache Ant version 1.8.0 compiled on February 1 2010 > > > > With Ant 1.8.1: > > unix: > >> ant -version > > Apache Ant version ${project.version} compiled on ${TODAY} > > windows: > > C:> ant -version > > Apache Ant version 1.8.0 compiled on April 20 2010 > > > > Can this be verified as a bug? Is there an easy way to fix this? > > > > Note these are being loaded from the same place on a drive visable to > > both machines. So they are the same binaries that is being called. > > > > Many thanks, > > > > > > -- > > Alex Foreman > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [hidden email] > > For additional commands, e-mail: [hidden email] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > > Comments are closed.
|
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
November 2020
Categories |