Can't specify Cobertura datafile location for server running under Ant? -


i have ant build script instruments jar files, starts servers using jars files , runs integration test suite of junit tests against them.

i want capture cobertura.ser file each server in separate file.

the servers need have working directory set can pick config files. it's requirement of system classpath must not used pick these files.

setting net.sourceforge.cobertura.datafile system property allows datafile set, , works ok, until "dir" property set on ant java task. once dir set, server starts correctly, test suite runs ok, when server shuts down no data file written.

here's fragment of build.xml:

<parallel>     <daemons>         <java fork="true" dir="src\main\resources\conf\my.server" classname="my.server">             <sysproperty key="net.sourceforge.cobertura.datafile" file="target\cobertura.ser" />             <classpath>             ...             </classpath>             <arg value="-server" />         </java>          ...more servers...          ...run junit tests...      </daemons> </parallel> 

the answer not run servers daemons. doing servers automatically shut down when junit task had completed, in reality, cobertura instrumentation wasn't picking fact servers shutting down , never wrote out various cobertura.ser files.

the solution remove daemons task, , add explicit server shutdown mechanism call ant once tests complete.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -