Jump to content
JasperReports Library 7.0 is now available ×

Why is CardReport.java removed ?


2005 IR Help

Recommended Posts

By: John Zoetebier - johnzoet

Why is CardReport.java removed ?

2004-01-13 23:33

I have copied one of the programs from demo/sample to my project for testing purposes to see if enviroment is working well.

For some reason each time I run Ant task "compile" file CardReport.java is removed.

I have stripped the build file from everything except the compile target, but still file CardReport.javais removed.

Files in folder are:

CardReport.xml

TestCardReport.java

CardReport.java

build.xml

 

When I run program TestCardReport.java directly using the same parameters as the build file CardReport.java is NOT removed.

 

Does anybody have an explanation for this weird behaviour ?

 

My build file is below:

==>

<project name="JasperReports" default="javac" basedir=".">

 

<property name="program.name" value="report.TestCardReport"/>

<property name="report.name" value="CardReport"/>

 

<property name="base.dir" value="../../"/>

<property name="src.dir" value="${base.dir}/src"/>

<property name="classes.dir" value="${base.dir}/classes"/>

<property name="lib.dir" value="${base.dir}/lib"/>

 

<!-- Build classpath -->

<path id="classpath.refid">

<pathelement location="${classes.dir}"/>

<fileset dir="${lib.dir}">

<include name="**/*.jar"/>

</fileset>

</path>

 

<property name="classpath" refid="classpath.refid"/>

 

<!--

echo properties for debugging purposes

-->

<target name="echo">

<echoproperties/>

</target>

 

<!--

Compiles the XML report design

and produces the .jasper file.

-->

<target name="compile" description="Compiles the XML report design and produces the .jasper file. ">

<java classname="${program.name}" fork="true">

<arg value="-Tcompile"/>

<arg value="-F${report.name}.xml"/>

<classpath path="${classpath}"/>

</java>

</target>

</project>

==>

 

 

 

 

 

By: Vinod Kumar Singh - vinodsingh

RE: Why is CardReport.java removed ?

2004-01-15 22:28

look at here

 

http://sourceforge.net/forum/message.php?msg_id=2348133

 

 

 

 

By: John Zoetebier - johnzoet

RE: Why is CardReport.java removed ?

2004-01-17 02:13

Thanks Vinod,

 

This explains why CardReport.java is removed when running the Ant build file.

The reason the java file is removed using the Ant file is because the Ant file makes the directory with the xml file the current directory.

When I run the program via the Eclipse IDE it must be an other directory.

Bit of a scary thought though becuase I have no idea which folder is actually used to create the intermediate java file needed for creating the jasper file ?

 

 

 

 

 

By: Teodor Danciu - teodord

RE: Why is CardReport.java removed ?

2004-01-24 12:52

 

Hi,

 

Set the "jasper.reports.compile.temp" system property like explained here:

 

http://jasperreports.sourceforge.net/quick.how.to.html#compile

 

I hope this helps.

Teodor

 

 

 

 

 

By: John Zoetebier - johnzoet

RE: Why is CardReport.java removed ?

2004-01-24 17:10

As said by Theodor I set system property:

System.setProperty("jasper.reports.compile.temp", "/home/temp");

 

And this solved the .java override problem

An other solution is to put the xml report in a resource folder outside the source folder.

Or name the java file different from the report, like:

CardReport.xml

CardReporter.java

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...