Date: Thu, 22 Aug 2002 04:43:18 -0400 From: Dylan Carlson <absinthe@pobox.com> To: Calvin Varney <calvin@varney.org> Cc: freebsd-java@FreeBSD.ORG Subject: Port/package guidelines (WAS: Please review: new Java Project docs) Message-ID: <200208220443.18447.absinthe@pobox.com> In-Reply-To: <86it25uka2.fsf@ubana.varney2.org> References: <200208170958.14422.absinthe@pobox.com> <200208190506.44212.absinthe@pobox.com> <86it25uka2.fsf@ubana.varney2.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday 20 August 2002 08:29pm, Calvin Varney wrote: As a prelude to continuing this conversation, I believe we probably should start figuring out how to use Ant in all the Java ports to resolve dependencies, build jars, do versioning and so on. I would like Ernst to comment on this, since he does the majority of the Java-related ports (including Ant). It's definitely a more sane way of building and packaging Java (particularly generating javadocs from code that has it) ... but I also think it would be an improved way of doing version checking and upgrades. Take a lot of the work out of the Makefile and into the build.xml's. My $.02... > > I would have thought the latest minor version of a library > libname.majorver.minorver linked to libname.majorver Thats assuming > library interfaces don't change between minor versions. (how safe is > that?) In theory, there shouldn't be an interface change on a library on a minor release, but... anyway it's probably safe to do it that way for now. I think long-term we need to pursue something more evolved with a tool like Ant. That way we won't have to deal with filenames, we deal with internal version numbers of JARs and classes. FYI, the standard bsd.port.mk/java.mk files don't deal with major/minor versioning. All you get is ${PORTVERSION}. Most developers I know have a canned development directory tree somewhere (not in ${PREFIX). I don't think the target audience for a java library port is a developer... it's probably just to resolve a dependency for an application. By that reasoning think it's probably a good idea to write wrapper scripts for applications to set the CLASSPATH as needed, where it has not already been done. > Ok, the SDK API docs must remain a separate port. I was concerned > about the API documentation produced by javadoc for other ports > (libraries and applications) ending up somewhere other than $DOCSDIR. > No, I agree about that. $DOCSDIR is good by me. > Great, for consistency ${PREFIX}/lib/java has my vote. Interesting to > note the likes of perl and php libraries aren't located under > ${PREFIX}/share as architecture-independent files though. Agree. > > Agree with third, and I'd like to suggest that the proposal gets amended > > to require that libraries with multiple classes get built into a JAR file > > at install time. That's a good idea, because we can do a lot more with > > versioning if all the classes are wrapped up in a JAR. I'm not sure that > > any of the Makefiles do JAR version checking but if not we should > > probably work in that direction. > > I'd support this. *nod* OK, so I want some next steps on revising the proposal, final comments and whatever. To to be clear where we're currently at... I have just tried to phrase this a little differently than we discussed but basically keeping the final results the same. VARIABLES: remove ${JAVAPREFIX} ${JAVALIBDIR} = ${PREFIX}/lib/java ${JAVAPORTNAME} = %portname%-%majorversion% ${PORTNAME} = %portname%-%fullversion% (as usual) LIBRARIES: 1. preferably in .JAR format: ${JAVALIBDIR}/${JAVAPORTNAME}.jar 2. or in a subdirectory: ${JAVALIBDIR}/${JAVAPORTNAME}/ no symlinks DOCS, including Javadoc generated: ${DOCSDIR}/${JAVAPORTNAME} EXAMPLES: ${EXAMPLESDIR}/java/${JAVAPORTNAME} > > Would also like to here form those with more porting experience. I've > just started trying to port a couple of java apps and have found it > tough going trying to nut out what goes where and how to handle common > libraries. > Ernst is The Man. He can probably answer all of those questions. Being that he has his name on most of the ports at present (correct me if I'm wrong about this), I think he's got the the most weight on this final proposal. What has been discussed here is reasonable I think, unless Ernst has some rationale for things we've overlooked or just plain don't understand. Folks, let me know what your final thoughts are on the above and maybe we can get something codified. Cheers, -- Dylan Carlson [absinthe@pobox.com] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208220443.18447.absinthe>