English 中文(简体)
Can t get modificationset to work in CruiseControl on Linux
原标题:

I am trying to setup cruisecontrol in a Linux environment. I have some experience with cc.NET, but this is the first time I have ever tried to use the nix version. This is what I have for my build.xml:

When I run "ant project1", everything seems to work except that it tells me: /opt/cruisecontrol-bin-2.8.3/projects/portal/build.xml:8: Problem: failed to create task or type modificationset Cause: The name is undefined.

I can t seem to find another way to say "only build when a change is checked into svn." I am using CC 2.8.3. Any ideas?

<?xml version="1.0" encoding="UTF-8"?>
<project name="project1" basedir=".">
 <target name="checkout">
    <exec executable="svn" dir="${basedir}/source">
      <arg line="up" />
    </exec>
 </target>
 <modificationset>
    <svn localWorkingCopy="projects/${project.name}/source/"/>
 </modificationset>
 <target name="php-codesniffer">
    <exec executable="phpcs"
          dir="${basedir}/source"
          output="${basedir}/build/logs/checkstyle.xml">
          <arg line="--report=checkstyle
                 --standard=PEAR
                 --ignore=src/autoload src/"/>
    </exec>
 </target>
 <target name="publish">
 </target>
 <target name="build" depends="checkout,php-codesniffer" />
</project>
最佳回答

Hmm... I don t quite follow your setup. The XML file you posted is supposed to be an ANT build file or CruiseControl XML configuration file?

Because these two are different. <target>s usually show up in the ANT file, while <modificationset> is something typical for CruiseControl configuration. By accident they both use <project> element.

So I would suggest you moving the <modificationset> to CC config file. There s an option as well to tell CC to build only when any modifications are found (isn t it the default setting?).

EDIT: And BTW, the issue doesn t seem to have anything in common with Unix per se. I tend to believe you would run into the same problems on Windows.

问题回答

For continuous building I use cronjob and this script:

#!/bin/bash
cd myLocalWorkingCopy
if [[ "`/usr/bin/svn info -r HEAD`" = "`/usr/bin/svn info -r BASE`" ]]; then
  echo "local working copy up to date"
else
  /usr/bin/nant -buildfile:myBuildfile.build -logfile:myLogfile.log
fi

I hope this helps...





相关问题
Signed executables under Linux

For security reasons, it is desirable to check the integrity of code before execution, avoiding tampered software by an attacker. So, my question is How to sign executable code and run only trusted ...

encoding of file shell script

How can I check the file encoding in a shell script? I need to know if a file is encoded in utf-8 or iso-8859-1. Thanks

How to write a Remote DataModule to run on a linux server?

i would like to know if there are any solution to do this. Does anyone? The big picture: I want to access data over the web, using my delphi thin clients. But i´would like to keep my server/service ...

How can I use exit codes to run shell scripts sequentially?

Since cruise control is full of bugs that have wasted my entire week, I have decided the existing shell scripts I have are simpler and thus better. Here is what I have so far svn update /var/www/...

Good, free, easy-to-use C graphics libraries? [closed]

I was wondering if there were any good free graphics libraries for C that are easy to use? It s for plotting 2d and 3d graphs and then saving to a file. It s on a Linux system and there s no gnuplot ...

热门标签