Jump to content

Recommended Posts

Posted

If you are using TortoiseSVN + Ant build and you get errors it is a pain to resolve them without having logs. Here is a patch that will solve the problem:

Index: build.xml
===================================================================
--- build.xml	(revision 1475)
+++ build.xml	(working copy)
@@ -43,7 +43,6 @@
        	<include name="trove-2.1.0.jar"/>
        </fileset>
    </path>
-
	<target name="verifyRequirements" 
		description="Checks if the necessary requirements for building L2J are fulfilled">

@@ -56,6 +55,16 @@
    	depends="clean, verifyRequirements"
        description="Create the output directories.">

+	<tstamp>
+	    <format property="timestamp" pattern="yyyy-MM-dd_HH-mm-ss"/>
+	  </tstamp>
+	  <property name="build.log.dir" location="${basedir}/buildlogs"/>
+	  <mkdir dir="${build.log.dir}"/>
+	  <property name="build.log.filename" value="build_${timestamp}.log"/>
+	  <record name="${build.log.dir}/${build.log.filename}"
+	    loglevel="verbose" append="false"/>
+	  <echo message="Build logged to ${build.log.filename}"/>
+
        <mkdir dir="${build}"/>
        <mkdir dir="${build.classes}"/>
        <mkdir dir="${build.dist}" />

 

You can also open your build.xml with an editor (like Notepad), find <target name="init" and insert the following lines after description="Create the output directories.">:

	<tstamp>
    <format property="timestamp" pattern="yyyy-MM-dd_HH-mm-ss"/>
  </tstamp>
  <property name="build.log.dir" location="${basedir}/buildlogs"/>
  <mkdir dir="${build.log.dir}"/>
  <property name="build.log.filename" value="build_${timestamp}.log"/>
  <record name="${build.log.dir}/${build.log.filename}"
    loglevel="verbose" append="false"/>
  <echo message="Build logged to ${build.log.filename}"/>

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..