我正在尝试在同一个项目的新 pom.xml 中运行 build.xml (ant)。但是,无论我在编译 build.xml:104(javac) 时尝试了什么,我总是会收到 NullPointerException。蚂蚁本身的构建成功。
任何有关在具有 javac 目标的 maven 中运行 build.xml 的见解都会有所帮助!
=============== Environment ===============
C:\source\GWTRPCTest>mvn -version
Listening for transport dt_socket at address: 5005
Apache Maven 2.2.1 (r801777; 2009-08-06 14:16:01-0500)
Java version: 1.6.0_31
Java home: c:\Program Files (x86)\Java\jdk6_31\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7" version: "6.1" arch: "amd64" Family: "windows"
=============== Log ===============
C:\source\GWTRPCTest>mvn package
Listening for transport dt_socket at address: 5005
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] task-segment: [package]
[INFO] ------------------------------------------------------------------------
[INFO] [version:setversion {execution: version}]
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\source\GWTRPCTest\src\main\resources
[INFO] skip non existing resourceDirectory C:\source\GWTRPCTest\src\main\resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] No sources to compile
[INFO] [antrun:run {execution: generate-sources}]
[INFO] Executing tasks
init:
[mkdir] Created dir: C:\source\GWTRPCTest\build
[mkdir] Created dir: C:\source\GWTRPCTest\build\classes
[mkdir] Created dir: C:\source\GWTRPCTest\deploy
bootstrap.maven.tasks:
[mkdir] Created dir: C:\source\GWTRPCTest\build\lib
[get] Getting: http://artifactory.bpm.ibm.com:8081/artifactory/simple/ext-release-local/org/apache/maven/maven-artifact-ant/2.1.0/maven-artifact-ant-2.1.0.jar
[get] To: C:\source\GWTRPCTest\build\lib\maven-ant-tasks-2.1.0.jar
init.maven.tasks:
prepare:
[echo]
[echo] *** The file c:/source/lon.war should be from a non-development build...
[echo]
[copy] Copying 5 files to C:\source\GWTRPCTest\build\lib
extractLonAssets:
[unjar] Expanding: c:\source\lon.war into C:\source\GWTRPCTest\build\lon.war.dir
[jar] Building jar: C:\source\GWTRPCTest\build\ibm-web.jar
compile:
[javac] C:\source\GWTRPCTest\build.xml:104: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 5 source files to C:\source\GWTRPCTest\build\classes
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] An Ant BuildException has occured: The following error occurred while executing this line:
C:\source\GWTRPCTest\build.xml:104: java.lang.NullPointerException
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 minutes 22 seconds
[INFO] Finished at: Fri Sep 06 10:53:59 CDT 2013
[INFO] Final Memory: 46M/618M
[INFO] ------------------------------------------------------------------------