classycle ant tasks could support more fileset types
Brought to you by:
fjelmer
The ant tasks only support a nested FileSet at present. In order to run checks against Jar resources, it needs to support nested ant ResourceCollections. This patch allows for that.
I was unable to get the project to build/run locally, so the unit test in this patch may need tweaking before it will run.
support for zipfileset in ant tasks
Hi Tom
Thanks for the patch. Unfortunately it doesn't work. The first problem is that the new test DependencyCheckingTaskTest.testEmbeddedDefinitionsFromJar() failed. When running the debugger I found that in line 114 of ClassycleTask.java the invocation of getIncludedFiles() returned an empty array. I would have expected it returned all class file paths inside the JAR file. But if it would returned these paths it wouldn't help because in Parser.createClassFiles() it is assumed that the paths are paths in the file system and not in a ZIP or JAR file. Did you forget to add additional source code in the patch?
Regards
Franz-Josef Elmer
I've just released version 1.4.1 with our patch. But I had to modifiy ClassycleTask.java and Parser class in order to be able to work. Also the target testEmbeddedDefinitionsFromJar had an error.
Thanks for working on this, it had slipped off my radar. I realised shortly after submitting the patch that classycle makes assumptions about classes being on the file path, rather than obtaining them through a classloader, which would understand resources in jars and zips. I hope that you didn't have to go to too much effort to get this working.