wjgood Posted November 6, 2014 Share Posted November 6, 2014 I've done a lot of searching and I can't find an answer. I'm working on a large Netbeans project that is set to compile JasperReports at the same time that it compiles the project. The problem is we want to set JasperReports to compile with the same version of JavaC selected in Netbeans instead of the JavaC version that is on the OS path. I think it can be solved by modifying build.xml. Here is what I believe is the relevant section of the file. <target name="-post-compile" depends="compile-report"/> <target name="compile-report" depends="init"> <taskdef name="jrc" classname="net.sf.jasperreports.ant.JRAntCompileTask" classpath="${javac.classpath}"/> <mkdir dir="${build.classes.dir}/...proj/reports"/> <jrc tempdir="${build.classes.dir}/...proj/reports" compiler="net.sf.jasperreports.engine.design.JRJavacCompiler" destdir="${build.classes.dir}/...proj/reports"> <src> <fileset dir="${basedir}/reports"> <include name="**/*.jrxml"/> </fileset> </src> <classpath path="${run.classpath}"/> </jrc> <!--copy the styles into the classpath--> <copy todir="${build.classes.dir}/...proj/reports"> <fileset dir="${basedir}/reports"> <include name="**/*.jrtx"/> </fileset> </copy> </target> <target name="-pre-init"> <!--Make sure javac is on the path for the jasperreports--> <echo>Testing that javac is on the path.</echo> <exec executable="javac" > <arg value="-version"/> </exec> </target>[/code] I truncated a couple file paths to be "...proj". Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now