Community
Participate
Working Groups
I tend to rely on the automated build system, but when it was failing a couple of weeks ago noticed that I can no longer build AspectJ wrom within Eclipse. I can still build it from the command line. Below is the failure message. I spent a little time modifiying build-properties.xml and the other stuff having to do with the version check, but didn't succeed at fixing this. I think that it is important for our build.xml file to work properly with no additional setup when all of AspectJ is checked out, both from within Eclipse and from the command line. version-uptodate: BUILD FAILED: C:\Dev\aspectj-workspace\build\build.xml:61: writing C:\Dev\aspectj-workspace\aj-build\temp\versionUptodate BUILD FAILED: C:\Dev\aspectj-workspace\build\build.xml:358: Following error occured while executing this line C:\Dev\aspectj-workspace\build\build.xml:61: writing C:\Dev\aspectj- workspace\aj-build\temp\versionUptodate Total time: 2 seconds
There seems to be a confusing situation in the build-properties.xml which contains some of the ant tasks. Here is the clean-directories target: <target name="clean-directories" depends="init-directories" unless="clean-directories.done" > <property name="clean-directories.done" value="done"/> <delete quiet="on" dir="${aj.build.dir}" /> <!-- warning if not deleted? --> <antcall target="init-directories"/> <!-- aj.results.dir is not cleaned --> </target> It aims to delete the aj.build.dir which usually points to blahblah/aj-build. Now before it does the delete it depends on init-directories which creates all the sub-directories under aj-build. When init-directories finishes it sets a property init-directories.done so that it doesn't do it again. So prior to the clean-directories target running we have created the aj-build/* directories, we then delete all the directories under aj-build/* and call init-directories again. because init-directories already ran and set the init-directories.done property, we don't rebuild them. This causes us to fail with the error Mik is seeing because it is trying to write the versionuptodate file into the aj-build/temp directory which doesn't exist. The fix seems straightforward. Because init-directories is 'harmless' really, it just does a bunch of mkdirs, I will take the guard off that says do it only if init-directories.done is set. In fact, with the fix in place *I* can build aspectj inside Eclipse, something I've never ever ever been able to do. Mik - can you try it and let me know if it works for you?
Yay, I can build! I can build!
Fix released as part of AspectJ 1.2.1