Hello FindBugs folks,
I found that master branch is not ready to build by Maven. Attached patch includes following solutions to solve this problem.
'parent.relativePath' points at com.google.code.findbugs:findbugs-project instead of org.sonatype.oss:oss-parent).gitignorePlease check this patch and merge it to master.
BTW, I think you need to add new milestone for version 3.0.
And version in pom.xml is still 2.0.3-SNAPSHOT, maybe you need to change it. I recommend you to use maven-release-plugin which increment version automatically.
Trunk started using ASM5, so I have modified pom.xml. See attachment.
But now there are compilation errors (ex. no CONSTANT_InvokeDynamic in org.apache.bcel.Constants), maybe we need to update bcel from 2.0.1 to latest.
I have updated
pom.xmlto supportBCEL 6.0-SNAPSHOT, please use attachment.And here is an article which explains how to build by Maven.
Thanks for patch.
Few comments:
1) We've moved to git, please create patch against latest source. "1.7" is level already there.
2) Not sure if we would accept 3rd party repository (http://eller86.github.io/jaxen-repository/) for jaxen. Isn't there official way to get "mavenized" jaxen?
3) For what reason ".DS_store" is needed in .ignore? Maven too?
I've regenerated a patch for the latest master. See attached file.
install:install-filelike bcel6,0-SNAPSHOT, but I don't think that it is good way..DS_Storeis temporary file which is generated by MacOSX, likeThumbs.dbwhich is generated by Windows (Explorer).Thanks again,
I've committed your last patch without unofficial jaxen repository.
I personally can not accept not official builds/repositories of 3rd party libraries, simply because of security reasons (FB is used in many companies which do not allow such things).
An acceptable solution would be to build FB with maven by using your solution for ASM/BCEL also for jaxen.
$ mvn install:install-file -Dfile=lib/bcel-6.0-SNAPSHOT.jar -DgroupId=com.google.code.findbugs -DartifactId=bcel -Dversion=6.0-SNAPSHOT -Dpackaging=jar
$ mvn install:install-file -Dfile=lib/asm-debug-all-5.0_BETA.jar -DgroupId=org.ow2.asm -DartifactId=asm-debug-all -Dversion=5.0_BETA -Dpackaging=jar
$ mvn install:install-file -Dfile=lib/jaxen-1.1.6.jar -DgroupId=com.google.code.findbugs -DartifactId=jaxen -Dversion=1.1.6 -Dpackaging=jar
What do you think?
BTW have you asked / ping'd jaxen folks regarding maven?
Regards,
Andrey
I understand, my company is one of these companies. Thank you.
Could you add this solution to document like
README.txt? I think other Maven users also need this solution. Note that I replaced groupId of jaxen (com.google.code.findbugs) with 'jaxen', which we are using inpom.xml.And currently I haven't pinged them, because their tracker looks inactive. I'll try.
Regards,
Kengo TODA
I've put runMaven script into the project root. Maven should work now "out of the box".
Thanks!
Thank you, Kengo. You and your patches are welcome :-)
I've moved find bugs back to using jaxen 1.1.4; I don't think we need any of the newer features, and it should make it easier to build with maven.
Andy, where is the runMaven script?
Its inside findbugs directory.
From the git root:
$findbugs/runMaven
Bill, looks like ant task is broken after the switch to jaxen 1.1.4.
Can you please look at it?
What part of the ant task is broken for you? It seems to be working for me.
Bill
On Dec 12, 2013, at 6:36 PM, Andrey Loskutov andyandy@users.sf.net wrote:
Related
Bugs:
#1229I simply "cd" to the FB repository root and run ant there. The FB ant build file tries to execute "findbugscheck" tasks and all of them reproducibly fail with NoClassDefFoundError like below.
Switching to the commit "965f92d" (just before the jaxen lib changes) fixes the issue again.
[findbugs] Executing findbugs FindBugsTask from ant task
[findbugs] Running FindBugs...
[findbugs] Exception in thread "main" java.lang.NoClassDefFoundError: org/jaxen/JaxenException
[findbugs] at org.dom4j.DocumentFactory.createXPath(DocumentFactory.java:230)
[findbugs] at org.dom4j.tree.AbstractNode.createXPath(AbstractNode.java:207)
[findbugs] at org.dom4j.tree.AbstractNode.valueOf(AbstractNode.java:189)
[findbugs] at edu.umd.cs.findbugs.PluginLoader.constructMinimalPlugin(PluginLoader.java:1029)
[findbugs] at edu.umd.cs.findbugs.PluginLoader.init(PluginLoader.java:639)
[findbugs] at edu.umd.cs.findbugs.PluginLoader.<init>(PluginLoader.java:397)
[findbugs] at edu.umd.cs.findbugs.PluginLoader.loadCorePlugin(PluginLoader.java:1433)
[findbugs] at edu.umd.cs.findbugs.PluginLoader.loadInitialPlugins(PluginLoader.java:1387)
[findbugs] at edu.umd.cs.findbugs.PluginLoader.<clinit>(PluginLoader.java:154)
[findbugs] at edu.umd.cs.findbugs.DetectorFactoryCollection.getCoreResource(DetectorFactoryCollection.java:362)
[findbugs] at edu.umd.cs.findbugs.SystemProperties.loadPropertiesFromConfigFile(SystemProperties.java:77)
[findbugs] at edu.umd.cs.findbugs.SystemProperties.<clinit>(SystemProperties.java:60)
[findbugs] at edu.umd.cs.findbugs.FindBugs2.<clinit>(FindBugs2.java:87)
[findbugs] Caused by: java.lang.ClassNotFoundException: org.jaxen.JaxenException
[findbugs] at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
[findbugs] at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
[findbugs] at java.security.AccessController.doPrivileged(Native Method)
[findbugs] at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
[findbugs] at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
[findbugs] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
[findbugs] at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
[findbugs] ... 13 more
[findbugs] Java Result: 1</clinit></clinit></clinit></init>
I found the problem (MANIFEST-findbugs.MF), will fix immediately.
What is about *.jnlp files? They also need to be updated, or do they stay with FB 2.x?