简体   繁体   中英

Build Fail for build.xml regarding classpath in java

This build.xml is an extract from the tutorial from Java EE Development with Eclipse by Deepak Vohra In which we are attempting to present data on a Jasper Report-4.7.0 Spreadsheet from a Oracle Database 12c using Oracle WebLogic server 12c .

<?xml version="1.0" encoding="UTF-8"?>
<!--
WebLogic build file
-->
<project name="JasperReports" default="deploy" basedir=".">
<property name="web.module" value="${basedir}/WebContent" />
<property name="weblogic.home" value=" C:/Oracle/Middleware/" />
<property name="weblogic.server" value="${weblogic.home}/
wlserver_12.1/server" />
<property name="build.dir" value="${basedir}/build" />
<property name="weblogic.domain.dir"
value="${weblogic.home}/user_projects/domains/base_domain1" />
<property name="deploy.dir"
value="${weblogic.domain.dir}/autodeploy" />
<path id="classpath">
<fileset dir="${weblogic.home}/modules">
<include name="*.jar" />
</fileset>
<fileset dir="${weblogic.server}/lib">
<include name="*.jar" />
</fileset>
<fileset dir="${weblogic.domain.dir}/lib">
<include name="*.jar" />
</fileset>
<pathelement location="${build.dir}" />
</path>
<property name="build.classpath" refid="classpath" />
<target name="prepare">
<mkdir dir="${build.dir}" />
</target>
<target name="war" depends="prepare">
<war warfile="${build.dir}/jasperreports.war">
<fileset dir="WebContent">
<include name="*.jsp" />
</fileset>
<fileset dir="WebContent">
<include name="catalog.xml" />
</fileset>
<fileset dir="WebContent">
<include name="WEB-INF/web.xml" />
</fileset>
<fileset dir="WebContent">
<include name="WEB-INF/lib/*.jar" />
</fileset>
</war>
</target>
<target name="deploy" depends="war">
<copy file="${build.dir}/jasperreports.war" todir="${deploy.dir}"
/>
</target>
<target name="clean">
<delete file="${build.dir}/jasperreports.war" />
</target>
</project>  

Its showing the error

BUILD FAILED C:\\Users\\abc\\workspace\\PDFExcelReports\\WebContent\\build.xml:27: C:\\Users\\abc\\workspace\\PDFExcelReports\\WebContent\\ C:\\Oracle\\Middleware\\modules does not exist.

and showing error on this line

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

tried to replace classpath with the path of jasper report jar file but didn't worked

Do inform if more details required

Your problem is at this location :

<fileset dir="${weblogic.home}/modules">

Firstly, remove the extra space in the path

<property name="weblogic.home" value=" C:/Oracle/Middleware/" />

I don't find it in the code you pasted by I feel somewhere you are prefixing ${basedir} to weblogic.home

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM