This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why 'gen-src\primer.po is not found'?

 
erik aimen
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am running JAXB unmarshal_read sample with JWSDP 2.0. And I've got 'gen-src\primer.po is not found' when I execute 'asant build', please see the cmd line below.
-----cmd line start-----
C:\javaeetutorial5\examples\jaxb\unmarshal-read>asant build
Buildfile: build.xml
Overriding previous definition of reference to classpath

build:
[echo] Compiling the schema...
[xjc] C:\javaeetutorial5\examples\jaxb\unmarshal-read\gen-src\primer.po is not found
and thus excluded from the dependency check
[xjc] Compiling file:/C:/javaeetutorial5/examples/jaxb/unmarshal-read/po.xsd
[xjc] Writing output to C:\javaeetutorial5\examples\jaxb\unmarshal-read\gen-src
[echo] Compiling the java source files...
[javac] Compiling 4 source files to C:\javaeetutorial5\examples\jaxb\unmarshal-read\cl
sses

BUILD SUCCESSFUL
Total time: 3 seconds
C:\javaeetutorial5\examples\jaxb\unmarshal-read>xjc po.xsd
parsing a schema...
compiling a schema...
generated\Items.java
generated\ObjectFactory.java
generated\PurchaseOrderType.java
generated\USAddress.java
-----cmd line end-----

The directory 'gen-src\primer.po' is already created.

build.xml as below:

<?xml version="1.0" standalone="yes"?>

<project name="unmarshal-read" default="run" basedir=".">

<property file="build.properties"/>

<import file="../../common/targets.xml" />
<import file="../common/targets.xml" />

<description>
This sample application demonstrates how to unmarshal an instance document
into a Java content tree and access data contained within it.
</description>

<path id="classpath">
<pathelement path="src" />
<pathelement path="classes" />
<pathelement path="schemas" />
<fileset dir="${javaee.home}" includes="lib/javaee.jar" />
<fileset dir="${javaee.home}" includes="lib/appserv-rt.jar" />
<fileset dir="${javaee.home}" includes="lib/appserv-ws.jar" />
</path>

<taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask">
<classpath refid="classpath" />
</taskdef>

<!--compile Java source files-->
<target name="build" description="Compile all Java source files">
<echo message="Compiling the schema..." />
<mkdir dir="gen-src" />
<xjc schema="po.xsd" package="primer.po" target="gen-src">
<produces dir="gen-src/primer.po" includes="**/*.java" />
</xjc>
<echo message="Compiling the java source files..." />
<mkdir dir="classes" />
<javac destdir="classes" debug="on">
<src path="src" />
<src path="gen-src" />
<classpath refid="classpath" />
</javac>
</target>

<target name="run" depends="build" description="Run the sample app">
<echo message="Running the sample application..." />
<java classname="Main" fork="true">
<classpath refid="classpath" />
</java>
</target>

<target name="javadoc" description="Generates javadoc" depends="build">
<echo message="Generating javadoc..." />
<mkdir dir="docs/api" />
<javadoc sourcepath="gen-src" destdir="docs/api" windowtitle="Using unmarshaller (formerly SampleApp1)" useexternalfile="yes">
<fileset dir="." includes="gen-src/**/*.java" excludes="**/impl/**/*.java" />
</javadoc>
</target>

<target name="clean" description="Deletes all the generated artifacts.">
<delete dir="docs/api" />
<delete dir="gen-src" />
<delete dir="schemas" />
<delete dir="classes" />
</target>
</project>

I have Sun Java System Application Server Platform Edition 9 installed.

Why 'gen-src\primer.po is not found'? I appreciate very much if any body could help me out.

Thanks lot.

Erik
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic