Today, I downloaded collectd-4.9.0 source code. However, I couldn't see the jar patch applied as yet. Here is the updated patch with respect to 4.9.0 source code.
Let me know if there are any issues with the patch. Regards Amit On Mon, Sep 14, 2009 at 7:53 PM, Amit Gupta <[email protected]> wrote: > Here is the updated patch. > > > On Mon, Sep 14, 2009 at 7:19 PM, Sebastian Harl <[email protected]> wrote: > >> Hi Amit, >> >> On Mon, Sep 14, 2009 at 07:02:20PM +0530, Amit Gupta wrote: >> > Do find the patch attached. I have also got the jmx java classes to be >> > compiled (as a part of build process) in this patch. Let me know if the >> > patch looks okay. >> >> The patch looks mostly fine to me. See two small comments / nitpicks >> below. >> >> > diff --git a/bindings/java/Makefile.am b/bindings/java/Makefile.am >> > index af5e480..0d9ee74 100644 >> > --- a/bindings/java/Makefile.am >> > +++ b/bindings/java/Makefile.am >> […] >> > +install-exec-local: java-build-stamp jmx-build-stamp >> > + mkdir -p "$(DESTDIR)$(pkgdatadir)/java" >> > + $(JAR) cf java-plugin.jar "org/collectd/api"/*.class >> > + $(JAR) cf jmx.jar "org/collectd/java"/*.class >> > + $(INSTALL) -m 644 java-plugin.jar \ >> > + "$(DESTDIR)$(pkgdatadir)/java" >> > + $(INSTALL) -m 644 jmx.jar \ >> > + "$(DESTDIR)$(pkgdatadir)/java" >> >> What do you think about creating the jar files in .libs/ or something? >> That would avoid problems with locally modified versions … >> > > ok. I now create a .libs dir right in the bindings/java during the install. > >> >> > clean-local: >> […] >> > + rm -f *.jar >> > > Make sense. I now delete the .libs dir containng the jars during clean. > > Regards > Amit > >> >> Removing all jar files in the top level java directory does not sound >> like a good idea to me. Developers might have other jar files around for >> testing purposes or whatever. Unconditionally removing some directory >> .libs/ would be fine for me though. >> >> Hope you'll forgive my nitpickyness ;-) >> > > >> >> Cheers, >> Sebastian >> >> -- >> Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/ >> >> Those who would give up Essential Liberty to purchase a little Temporary >> Safety, deserve neither Liberty nor Safety. -- Benjamin Franklin >> >> >> -----BEGIN PGP SIGNATURE----- >> Version: GnuPG v1.4.9 (GNU/Linux) >> >> iEYEARECAAYFAkquSgMACgkQEFEKc4UBx/xqkACePMpSkHWdgzSBqpfT5qP7yAPH >> T䀊ࠝﴃ攲鳣龞ꄬ딤� >> =rbmf >> -----END PGP SIGNATURE----- >> >> >
diff -ur collectd-4.9.0/configure.in collectd-4.9.0-mine/configure.in --- collectd-4.9.0/configure.in Thu Jan 7 18:36:08 2010 +++ collectd-4.9.0-mine/configure.in Thu Jan 28 13:32:00 2010 @@ -1611,6 +1611,7 @@ with_java_cflags="" with_java_libs="" JAVAC="$JAVAC" +JAR="$JAR" AC_ARG_WITH(java, [AS_HELP_STRING([--with-java@<:@=PREFIX@:>@], [Path to Java home.])], [ if test "x$withval" = "xno" @@ -1671,6 +1672,18 @@ AC_MSG_RESULT([not found]) fi fi + if test "x$JAR" = "x" + then + AC_MSG_CHECKING([for jar]) + TMPDIR=`find "$with_java_home" -name jar -type f | head -n 1` + if test "x$TMPDIR" != "x" + then + JAR="$TMPDIR" + AC_MSG_RESULT([$JAR]) + else + AC_MSG_RESULT([not found]) + fi + fi else if test "x$with_java_home" != "x" then AC_MSG_WARN([JAVA_HOME: No such directory: $with_java_home]) @@ -1707,7 +1720,25 @@ then with_java="no (javac not found)" fi +if test "x$JAR" = "x" +then + with_jar_path="$PATH" + if test "x$with_java_home" != "x" + then + with_jar_path="$with_java_home:with_jar_path" + if test -d "$with_java_home/bin" + then + with_jar_path="$with_jar_home/bin:with_jar_path" + fi + fi + AC_PATH_PROG(JAR, jar, [], "$with_jar_path") +fi +if test "x$JAR" = "x" +then + with_java="no (jar not found)" +fi + SAVE_CPPFLAGS="$CPPFLAGS" SAVE_CFLAGS="$CFLAGS" SAVE_LDFLAGS="$LDFLAGS" diff -ur collectd-4.9.0/bindings/java/Makefile.am collectd-4.9.0-mine/bindings/java/Makefile.am --- collectd-4.9.0/bindings/java/Makefile.am Sun Dec 20 21:06:31 2009 +++ collectd-4.9.0-mine/bindings/java/Makefile.am Thu Jan 28 13:19:33 2010 @@ -32,14 +32,17 @@ all-local: java-build-stamp install-exec-local: java-build-stamp - mkdir -p "$(DESTDIR)$(pkgdatadir)/java/org/collectd/api" - $(INSTALL) -m 644 "org/collectd/api"/*.class \ - "$(DESTDIR)$(pkgdatadir)/java/org/collectd/api/" - mkdir -p "$(DESTDIR)$(pkgdatadir)/java/org/collectd/java" - $(INSTALL) -m 644 "org/collectd/java"/*.class \ - "$(DESTDIR)$(pkgdatadir)/java/org/collectd/java/" + mkdir -p .libs + mkdir -p "$(DESTDIR)$(pkgdatadir)/java" + $(JAR) cf .libs/java-plugin.jar "org/collectd/api"/*.class + $(JAR) cf .libs/jmx.jar "org/collectd/java"/*.class + $(INSTALL) -m 644 .libs/java-plugin.jar \ + "$(DESTDIR)$(pkgdatadir)/java" + $(INSTALL) -m 644 .libs/jmx.jar \ + "$(DESTDIR)$(pkgdatadir)/java" clean-local: rm -f "org/collectd/api"/*.class rm -f "org/collectd/java"/*.class + rm -f .libs rm -f "java-build-stamp" diff -ur collectd-4.9.0/src/collectd.conf.in collectd-4.9.0-mine/src/collectd.conf.in --- collectd-4.9.0/src/collectd.conf.in Sun Dec 20 21:06:31 2009 +++ collectd-4.9.0-mine/src/collectd.conf.in Thu Jan 28 13:22:25 2010 @@ -345,7 +345,7 @@ #<Plugin "java"> # JVMArg "-verbose:jni" -# JVMArg "-djava.class.pa...@prefix@/share/collectd/java" +# JVMArg "-djava.class.pa...@prefix@/share/collectd/java/java-plugin.jar" # # LoadPlugin "org.collectd.java.Foobar" # <Plugin "org.collectd.java.Foobar">
_______________________________________________ collectd mailing list [email protected] http://mailman.verplant.org/listinfo/collectd
