詹金斯编译问题

时间:2013-10-21 13:58:30

标签: java ant github jenkins build.xml

这个问题很愚蠢,但我在互联网上找不到其他人似乎有同样的问题并且无法自行解决。

这是我的build.xml 我从一个论坛上把它拿走了,改变了我知道要放什么的行。

<project name="RPGEssentials" default="dist" basedir="/var/lib/jenkins/workspace/RPGEssentials">
<description>
    simple example build file
</description>
<!-- set global properties for this build -->
<property name="src" location="src"/>
<property name="build" location="build"/>
<property name="dist"  location="dist"/>

<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
</target>

<target name="compile" depends="init"
    description="compile the source " >
<!-- Compile the java code from ${src} into ${build} -->
<javac includeantruntime="false" srcdir="${src}" destdir="${build}" encoding="iso-
8859-1"> <include name="../APIs/*.jar" /> </javac>
</target>

<target name="dist" depends="compile"
    description="generate the distribution" >
<!-- Create the distribution directory -->
<mkdir dir="${dist}/lib"/>

<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
<jar jarfile="${dist}/lib/RPGEssentials-0.0.1.jar" basedir="${build}"/>
</target>

<target name="clean"
    description="clean up" >
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
</project>

这是构建后的控制台输出:

Started by user G4meM0ment
Building in workspace /var/lib/jenkins/workspace/RPGEssentials
Checkout:RPGEssentials / /var/lib/jenkins/workspace/RPGEssentials - 
hudson.remoting.LocalChannel@389329d0
Using strategy: Default
Last Built Revision: Revision 4b5d8a711c78fbe32efb06f91dd88d8f0660f5c0 (origin/master, 
origin/HEAD)
Fetching changes from 1 remote Git repository
Fetching upstream changes from origin
Seen branch in repository origin/HEAD
Seen branch in repository origin/master
Seen 2 remote branches
Commencing build of Revision 4b5d8a711c78fbe32efb06f91dd88d8f0660f5c0 (origin/master, 
origin/HEAD)
Checking out Revision 4b5d8a711c78fbe32efb06f91dd88d8f0660f5c0 (origin/master, 
origin/HEAD)
Warning : There are multiple branch changesets here
[RPGEssentials] $ ant
Buildfile: /var/lib/jenkins/workspace/RPGEssentials/build.xml    

init:

compile:

dist:

BUILD SUCCESSFUL
Total time: 0 seconds
Archiving artifacts
Finished: SUCCESS

我很确定错误是在build.xml中的,但我不知道会出现什么问题。 生成的jar文件包含一些空目录! http://www.imagebanana.com/view/v68chgps/jarcontains.jpg

感谢您的帮助 〜儒略

0 个答案:

没有答案