以下是构建输出,我已经尝试了所有东西,甚至下载CompiereSecureDefault。从Internet上获取属性并粘贴到输出中提到的目录中,但它不起作用。有什么建议吗?
构建文件:C:UsersPublicCompiereCompiereutils_dev build . xml
init:
[echo] =========== Build Compiere - ${env.ENCODING}
[echo] java.home = D:ProgramsandFilesJavajre6
[echo] Java Version = 1.6.0_45 Sun Microsystems Inc.
[exec] Execute failed: java.io.IOException: Cannot run program "svnversion" (in directory "C:UsersPublicCompiereCompiere"): CreateProcess error=2, The system cannot find the file specified
[echo] =========== SVN Revision Core = ${svnoutput}
build:
toolsInit:
[echo] =========== Build Tools ${env.COMPIERE_VERSION}
toolsCompile:
toolsServer:
toolsClient:
toolsAppsServer:
toolsDatabase:
toolsDistribution:
init:
[echo] =========== Build Common
makedir:
compile:
dist:
initAD:
[echo] =========== Build AD
compileAD:
distAD:
printInit:
[echo] =========== Build Print
printMakedir:
printCompile:
printDistribute:
init:
[echo] =========== Build Base
makedir:
compile:
[javac] Compiling 2 source files to C:UsersPublicCompiereCompierebasebuild
dist:
clientInit:
[echo] =========== Build Client
clientMakedir:
clientCompile:
clientDistribute:
[unjar] Expanding: C:UsersPublicCompiereCompierecommonCommon.jar into C:UsersPublicCompiereCompiereclientbuild
[unjar] Expanding: C:UsersPublicCompiereCompiereadAD.jar into C:UsersPublicCompiereCompiereclientbuild
[unjar] Expanding: C:UsersPublicCompiereCompierebaseBase.jar into C:UsersPublicCompiereCompiereclientbuild
[unjar] Expanding: C:UsersPublicCompiereCompiereprintPrint.jar into C:UsersPublicCompiereCompiereclientbuild
[unjar] Expanding: C:UsersPublicCompiereCompiereinterfacesInterfaces.jar into C:UsersPublicCompiereCompiereclientbuild
[delete] Deleting directory C:UsersPublicCompiereCompiereclientbuildMETA-INF
[jar] Building jar: C:UsersPublicCompiereCompierelibCompiere.jar
[jar] Building jar: C:UsersPublicCompiereCompierelibCompiereInstall.jar
compiereRootInit:
[echo] =========== Build Server Root
compiereRootXdoclet:
[echo] XDoclet=../tools
[echo] UpToDate=true
[ejbdoclet] Generating Home interface for 'org.compiere.session.ServerBean'.
[ejbdoclet] Generating Home interface for 'org.compiere.session.StatusBean'.
[ejbdoclet] Generating Local interface for 'org.compiere.session.ServerBean'.
[ejbdoclet] Generating Local interface for 'org.compiere.session.StatusBean'.
[ejbdoclet] Generating Local Home interface for 'org.compiere.session.ServerBean'.
[ejbdoclet] Generating Local Home interface for 'org.compiere.session.StatusBean'.
[ejbdoclet] Generating Remote interface for 'org.compiere.session.ServerBean'.
[ejbdoclet] Generating Remote interface for 'org.compiere.session.StatusBean'.
[ejbdoclet] Generating EJB deployment descriptor (ejb-jar.xml).
compiereRootCompile:
[javac] Compiling 8 source files to C:UsersPublicCompiereCompiereserverRootbuildclasses
compiereRootJar:
[jar] Building jar: C:UsersPublicCompiereCompiereserverRootbuilddeploycompiereRoot.jar
compiereRootWar:
[copy] Copying 1 file to C:UsersPublicCompiereCompiereserverRootsrcweb
[war] Building war: C:UsersPublicCompiereCompiereserverRootbuilddeploycompiereRootBase.war
[delete] Deleting: C:UsersPublicCompiereCompiereserverRootsrcwebcompiere.jnlp
wasCompiereRootWar:
[copy] Copying 1 file to C:UsersPublicCompiereCompiereserverRootsrcweb
[war] Building war: C:UsersPublicCompiereCompiereserverRootbuilddeploycompiereRootBase_was.war
[delete] Deleting: C:UsersPublicCompiereCompiereserverRootsrcwebcompiere.jnlp
compiereRootInterfaces:
[javac] Compiling 8 source files to C:UsersPublicCompiereCompiereinterfacesclasses
[jar] Building jar: C:UsersPublicCompiereCompiereinterfacesInterfaces.jar
compiereRootDeployServer:
[copy] Copying 3 files to C:UsersPublicCompiereCompierelib
main:
serverAppsInit:
[echo] =========== Build Server Application
serverAppsCompile:
serverAppsJar:
[jar] Building jar: C:UsersPublicCompiereCompiereserverAppsbuildjarcompiereApps.jar
serverAppsWar:
[war] Building war: C:UsersPublicCompiereCompiereserverAppsbuilddeploycompiereAppsBase.war
serverAppsDeployServer:
[copy] Copying 2 files to C:UsersPublicCompiereCompierelib
main:
init:
[echo] =========== Build Web Store
war:
[war] Building war: C:UsersPublicCompiereCompierewebStorebuilddeploycompiereWebStoreBase.war
deploy-server:
[copy] Copying 1 file to C:UsersPublicCompiereCompierelib
main:
webCMinit:
[echo] =========== Build webCM
webCMcompile:
webCMwar:
[war] Building war: C:UsersPublicCompiereCompierewebCMdeploycompiereWebCMbase.war
webCMdeployServer:
[copy] Copying 1 file to C:UsersPublicCompiereCompierelib
main:
sqljInit:
[echo] =========== Build SQLJ
sqljCompile:
sqljDist:
[jar] Building jar: C:UsersPublicCompiereCompieresqljsqlj.jar
[jar] Building jar: C:UsersPublicCompiereCompieresqljsqljDB2.jar
init:
[echo] =========== Build Extend
makedir:
compile:
dist:
[jar] Building jar: C:UsersPublicCompiereCompiereextendExtend.jar
[unjar] Expanding: C:UsersPublicCompiereCompierelibCompiere.jar into C:UsersPublicCompiereCompiereextendbuild
[jar] Building jar: C:UsersPublicCompiereCompierelibCompiere.jar
[jar] Warning: selected jar files include a META-INF/INDEX.LIST which will be replaced by a newly generated one.
installInit:
[echo] =========== Build Install - ${env.ENCODING}
installCompile:
[unjar] Expanding: C:UsersPublicCompiereCompieretoolslibant.jar into C:UsersPublicCompiereCompiereinstalllib
[unjar] Expanding: C:UsersPublicCompiereCompieretoolslibant-launcher.jar into C:UsersPublicCompiereCompiereinstalllib
[unjar] Expanding: C:UsersPublicCompiereCompieretoolslibant-commons-net.jar into C:UsersPublicCompiereCompiereinstalllib
[unjar] Expanding: C:UsersPublicCompiereCompieretoolslibcommons-net-1.4.0.jar into C:UsersPublicCompiereCompiereinstalllib
[delete] Deleting: C:UsersPublicCompiereCompiereinstalllibMETA-INFMANIFEST.MF
[jar] Building jar: C:UsersPublicCompiereCompiereinstallCInstall.jar
installUpdate:
installDistribution:
[copy] Copying 9 files to C:UsersPublicCompiereCompiereinstallbuildCompiere2lib
[copy] Copying 1 file to C:UsersPublicCompiereCompiereinstallbuildCompiere2lib
[copy] Copying 1 file to C:UsersPublicCompiereCompiereinstallbuildCompiere2lib
[copy] Copying 1 file to C:UsersPublicCompiereCompiereinstallbuildCompiere2lib
[zip] Building zip: C:UsersPublicCompiereCompiereinstallbuildCompiere_${env.COMPIERE_VERSION_FILE}.zip
[tar] Building tar: C:UsersPublicCompiereCompiereinstallbuildCompiere_${env.COMPIERE_VERSION_FILE}.tar
[gzip] Building: C:UsersPublicCompiereCompiereinstallbuildCompiere_${env.COMPIERE_VERSION_FILE}.tar.gz
[delete] Deleting: C:UsersPublicCompiereCompiereinstallbuildCompiere_${env.COMPIERE_VERSION_FILE}.tar
install:
[echo] =========== Install Compiere
[copy] Copying 4 files to C:UsersPublicCompiereCompiere${env.COMPIERE_INSTALL}
[unzip] Expanding: C:UsersPublicCompiereCompiereinstallbuildCompiere_${env.COMPIERE_VERSION_FILE}.zip into C:UsersPublicCompiereCompiere${env.COMPIERE_ROOT}
setupInit:
[echo] Compiere Server Setup ===================
[echo] COMPIERE_HOME = D:ProgramsandFilesCompiere2
[echo] Environment = CompiereEnv.properties
[echo] Java VM = sun
[echo] Database = oracleXE
[echo] Apps Server = jboss
[echo] AppsDeployment= D:ProgramsandFilesCompiere2jbossservercompieredeploy
[echo] Ant Version = Apache Ant version 1.7.1 compiled on June 27 2008
[echo] Java Home = D:ProgramsandFilesJavajre6
[echo] Java Version = 1.6.0_45 Sun Microsystems Inc.
[echo] Windows=true JBoss=true Tomcat=${isAppsTomcat} WAS=${isIBMWAS}
[echo] BaseJars=
[echo] lib/ext= ${lib.ext.jar.exists}
[echo] data/images= ${data.images.png.exists}
setupCompiere:
secureCopy:
BUILD FAILED
C:UsersPublicCompiereCompiereutils_devbuild.xml:78: The following error occurred while executing this line:
D:ProgramsandFilesCompiere2build.xml:127: Warning: Could not find file D:ProgramsandFilesCompiere2libCompiereSecureDefault.properties to copy.
总时间:8分57秒
很遗憾,你给了我们很多信息,但不是我们真正需要的。错误消息很好(我们不需要整个构建输出),但是我们没有build.xml
的相关部分失败。
我看到错误:
C:UsersPublicCompiereCompiereutils_devbuild.xml:78: The following error occurred while executing this line:
D:ProgramsandFilesCompiere2build.xml:127: Warning: Could not find file
D:ProgramsandFilesCompiere2libCompiereSecureDefault.properties to copy.
看起来像是从一个构建文件调用另一个构建文件。错误报告到utils_dev
中的构建文件,显然调用了Compiere2
中的构建文件。在第二个build.xml
文件的第127行,您正在执行某种<copy/>
任务,并且您以某种方式指定要复制的文件lib/CompiereSecureDefault.properties
,但是这样的文件不存在。
你可以这样做:
- 验证文件
Compiere2libCompiereSecureDefault.properties
是否存在 - 如果它不存在,为什么要复制它?它应该在那里吗?
我猜你在做这样的事情:
<copy todir="${basedir}/blah/blah"
file="${basedir}/lib/CompiereSecureDefault.properties"/>
你可以把它改成这样:
<copy todir="${basedir}/blah/blah">
<fileset dir="${basedir}/lib">
<include name="CompiereSecureDefault.properties"/>
</fileset>
</copy>
如果找不到特定的文件,后一种设置不应该使构建失败。(如果<fileset dir="...">
中的目录不存在,它将失败。)
<标题>附录:
下面是复制。properties文件的正确代码。
<target name="secureCopy"
unless="secure.exists">
<copy file="lib/CompiereSecureDefault.properties"
tofile="lib/CompiereSecure.properties" overwrite="no" />
</target>
你可以加上:
<target name="secureCopy"
unless="secure.exists">
<copy file="lib/CompiereSecureDefault.properties"
failonerror="false"
tofile="lib/CompiereSecure.properties" overwrite="no" />
</target>
然而,还有几个问题。什么是属性secure.exists
,为什么没有设置它?此任务仅在该属性未设置时执行。
还有,这个文件存在吗?这就是失败的原因吗?它应该存在吗?您需要在添加failonerror
参数之前弄清楚这一点。