From rv@andouillette.esil.univ-mrs.fr  Wed Jan 14 03:55:11 2004
Return-Path: <rv@andouillette.esil.univ-mrs.fr>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 54AB016A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 14 Jan 2004 03:55:11 -0800 (PST)
Received: from andouillette.esil.univ-mrs.fr (andouillette.esil.univ-mrs.fr [139.124.41.109])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 3266F43D45
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 14 Jan 2004 03:55:04 -0800 (PST)
	(envelope-from rv@andouillette.esil.univ-mrs.fr)
Received: from andouillette.esil.univ-mrs.fr (localhost [127.0.0.1])
	by andouillette.esil.univ-mrs.fr (8.12.9p1/8.12.9) with ESMTP id i0EBt3n5008686
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 14 Jan 2004 12:55:03 +0100 (CET)
	(envelope-from rv@andouillette.esil.univ-mrs.fr)
Received: (from rv@localhost)
	by andouillette.esil.univ-mrs.fr (8.12.9p1/8.12.9/Submit) id i0EBt2w7008685;
	Wed, 14 Jan 2004 12:55:02 +0100 (CET)
Message-Id: <200401141155.i0EBt2w7008685@andouillette.esil.univ-mrs.fr>
Date: Wed, 14 Jan 2004 12:55:02 +0100 (CET)
From: Herve Quiroz <herve.quiroz@esil.univ-mrs.fr>
Reply-To: Herve Quiroz <herve.quiroz@esil.univ-mrs.fr>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Fix port: java/jakarta-commons-cli
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         61357
>Category:       java
>Synopsis:       Fix port: java/jakarta-commons-cli
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    znerd
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 14 04:00:26 PST 2004
>Closed-Date:    Tue Apr 20 12:50:18 PDT 2004
>Last-Modified:  Tue Apr 20 12:50:18 PDT 2004
>Originator:     Herve Quiroz <herve.quiroz@esil.univ-mrs.fr>
>Release:        FreeBSD 5.1-RELEASE-p11 i386
>Organization:
>Environment:
System: FreeBSD andouillette.esil.univ-mrs.fr 5.1-RELEASE-p11 FreeBSD 5.1-RELEASE-p11 #1: Mon Jan 5 18:04:15 CET 2004 root@andouillette.esil.univ-mrs.fr:/usr/obj/usr/src/sys/ASSIMILATED i386

>Description:

Short story: java/jakarta-commons-cli won't build as commons-lang is not in the
classpath and there is a problem with dependency fetching (which I suspect is
related to Ant rather than commons-cli).


Now the long story:

When I tried to upgrade my java/jakarta-commons-cli port I had a build error.
So I tried to build it directly with Ant as a normal user and I get errors
while fetching dependencies. I am able to fetch them using wget so I wonder if
someone already experienced such a problem.

Anyway, here is the output just in case:

> Buildfile: build.xml
>
> init:
> 
> get-deps:
>       [get] Getting: http://www.ibiblio.org/maven/commons-logging/jars/commons-logging-1.0.jar
>       [get] Error getting http://www.ibiblio.org/maven/commons-logging/jars/commons-logging-1.0.jar to /export/andouillette/home/rv/src/commons-cli-1.0/lib/commons-logging-1.0.jar
>       [get] Getting: http://www.ibiblio.org/maven/commons-lang/jars/commons-lang-SNAPSHOT.jar
>       [get] Error getting http://www.ibiblio.org/maven/commons-lang/jars/commons-lang-SNAPSHOT.jar to /export/andouillette/home/rv/src/commons-cli-1.0/lib/commons-lang-SNAPSHOT.jar
>       [get] Getting: http://www.ibiblio.org/maven/junit/jars/junit-3.7.jar
>       [get] Error getting http://www.ibiblio.org/maven/junit/jars/junit-3.7.jar to /export/andouillette/home/rv/src/commons-cli-1.0/lib/junit-3.7.jar
> 
> jar:
> 
> BUILD SUCCESSFUL
> Total time: 1 second

But then I realized that the build is successful as user (using jdk-1.4.2) but
not as root while building the port (using 1.4.2 also).  I've just realized
that the problem comes from my classpath that is set to "all JARs in
${JAVAJARDIR}" as user but not as root. The most important point here being
that building commons-cli requires commons-lang...

Now we've got two way of dealing with it:

 - Install from binary version and set commons-lang as RUN_DEPENDS

 - Build from source but then add commons-lang in BUILD_DEPENDS and
   RUN_DEPENDS and add ${JAVAJARDIR}/commons-lang.jar in the classpath
   while building the port.

 - Build from source but fix the dependency fetching. However IMHO fecthing
   additional dependencies at build time is not good. First because of
   redundancy (in this case JUnit and commons-lang may already be installed as
   a port), and then because with this scheme you cannot build a "distfiles"
   distribution CD-ROM so you can build ports while disconnected from the
   network.

I prefer the first one but I'm not the maintainer. And that would resolve the
Javadoc/pkg-plist issue...

I suspect dependency fetching problems may have something to do with the new
version of Ant (1.6.0)... in which case we should probably send another
different PR to work on this particular issue.

>How-To-Repeat:

unset CLASSPATH
cd /usr/ports/java/jakarta-commons-cli
make build

>Fix:

Nothing yet, as we need to know what the opinion of the maintainer. I can
submit a fix in either case however.
>Release-Note:
>Audit-Trail:

From: Herve Quiroz <herve.quiroz@esil.univ-mrs.fr>
To: FreeBSD-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: java/61357: Fix port: java/jakarta-commons-cli
Date: Mon, 19 Jan 2004 14:32:09 +0100

 Okay, I have a fix with PORTDOCS macro (for Javadoc issues) and Ant
 classpath issues. Unfortunately, I'm too late to submit the patch right
 now. I'll commit tomorrow (hopefuly).
 
 Herve

From: Herve Quiroz <herve.quiroz@esil.univ-mrs.fr>
To: FreeBSD-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: java/61357: Fix port: java/jakarta-commons-cli
Date: Tue, 20 Jan 2004 15:17:42 +0100

 --17pEHd4RhPHOinZp
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 Here is the patch.
 
 What it changes:
 
   - use the PORTDOCS macro to build dynamically pkg-plist (no more
 	Javadoc 1.3/1.4 issues hopefully, and pkg-plist is now one line
 	long)
   - define the ANT_INCLUDE_SHARED_JARS variable so Ant now correctly
 	gets JARs from ${JAVAJARDIR}
 
 No need for a binary port after all.
 
 Herve
 
 --17pEHd4RhPHOinZp
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="port-commons-cli-PORTDOCS.diff"
 
 diff -ur jakarta-commons-cli.original/Makefile jakarta-commons-cli/Makefile
 --- jakarta-commons-cli.original/Makefile	Mon Jan 19 01:25:07 2004
 +++ jakarta-commons-cli/Makefile	Mon Jan 19 01:36:43 2004
 @@ -35,9 +35,13 @@
  JARFILE=	${PORTNAME}-${PORTVERSION}-beta-2-dev.jar
  DESTJARFILE=	${PORTNAME}.jar
  
 +.if !defined(NOPORTDOCS)
 +PORTDOCS=	${WRKSRC}/target/docs/apidocs
 +.endif
 +
  do-build:
  	@${MKDIR} ${WRKSRC}/lib
 -	@cd ${WRKSRC} && ${ANT} ${ANT_TARGET}
 +	@cd ${WRKSRC} && ${SETENV} ANT_INCLUDE_SHARED_JARS=YES ${ANT} ${ANT_TARGET}
  
  do-install:
  	@${ECHO} -n ">> Installing JAR as ${JARDIR}/${DESTJARFILE}..."
 diff -ur jakarta-commons-cli.original/pkg-plist jakarta-commons-cli/pkg-plist
 --- jakarta-commons-cli.original/pkg-plist	Mon Jan 19 01:25:07 2004
 +++ jakarta-commons-cli/pkg-plist	Mon Jan 19 01:37:01 2004
 @@ -1,59 +1 @@
 -share/doc/commons-cli/org/apache/commons/cli/class-use/MissingOptionException.html
 -share/doc/commons-cli/org/apache/commons/cli/class-use/OptionGroup.html
 -share/doc/commons-cli/org/apache/commons/cli/class-use/Parser.html
 -share/doc/commons-cli/org/apache/commons/cli/class-use/BasicParser.html
 -share/doc/commons-cli/org/apache/commons/cli/class-use/ParseException.html
 -share/doc/commons-cli/org/apache/commons/cli/class-use/UnrecognizedOptionException.html
 -share/doc/commons-cli/org/apache/commons/cli/class-use/HelpFormatter.html
 -share/doc/commons-cli/org/apache/commons/cli/class-use/HelpFormatter.StringBufferComparator.html
 -share/doc/commons-cli/org/apache/commons/cli/class-use/OptionBuilder.html
 -share/doc/commons-cli/org/apache/commons/cli/class-use/AlreadySelectedException.html
 -share/doc/commons-cli/org/apache/commons/cli/class-use/MissingArgumentException.html
 -share/doc/commons-cli/org/apache/commons/cli/class-use/GnuParser.html
 -share/doc/commons-cli/org/apache/commons/cli/class-use/Options.html
 -share/doc/commons-cli/org/apache/commons/cli/class-use/PosixParser.html
 -share/doc/commons-cli/org/apache/commons/cli/class-use/Option.html
 -share/doc/commons-cli/org/apache/commons/cli/class-use/CommandLine.html
 -share/doc/commons-cli/org/apache/commons/cli/class-use/PatternOptionBuilder.html
 -share/doc/commons-cli/org/apache/commons/cli/class-use/CommandLineParser.html
 -share/doc/commons-cli/org/apache/commons/cli/class-use/TypeHandler.html
 -share/doc/commons-cli/org/apache/commons/cli/package-use.html
 -share/doc/commons-cli/org/apache/commons/cli/package-summary.html
 -share/doc/commons-cli/org/apache/commons/cli/package-tree.html
 -share/doc/commons-cli/org/apache/commons/cli/package-frame.html
 -share/doc/commons-cli/org/apache/commons/cli/CommandLineParser.html
 -share/doc/commons-cli/org/apache/commons/cli/BasicParser.html
 -share/doc/commons-cli/org/apache/commons/cli/CommandLine.html
 -share/doc/commons-cli/org/apache/commons/cli/GnuParser.html
 -share/doc/commons-cli/org/apache/commons/cli/HelpFormatter.html
 -share/doc/commons-cli/org/apache/commons/cli/HelpFormatter.StringBufferComparator.html
 -share/doc/commons-cli/org/apache/commons/cli/Option.html
 -share/doc/commons-cli/org/apache/commons/cli/OptionBuilder.html
 -share/doc/commons-cli/org/apache/commons/cli/OptionGroup.html
 -share/doc/commons-cli/org/apache/commons/cli/Options.html
 -share/doc/commons-cli/org/apache/commons/cli/Parser.html
 -share/doc/commons-cli/org/apache/commons/cli/PatternOptionBuilder.html
 -share/doc/commons-cli/org/apache/commons/cli/PosixParser.html
 -share/doc/commons-cli/org/apache/commons/cli/TypeHandler.html
 -share/doc/commons-cli/org/apache/commons/cli/AlreadySelectedException.html
 -share/doc/commons-cli/org/apache/commons/cli/MissingArgumentException.html
 -share/doc/commons-cli/org/apache/commons/cli/MissingOptionException.html
 -share/doc/commons-cli/org/apache/commons/cli/ParseException.html
 -share/doc/commons-cli/org/apache/commons/cli/UnrecognizedOptionException.html
 -share/doc/commons-cli/serialized-form.html
 -share/doc/commons-cli/packages.html
 -share/doc/commons-cli/package-list
 -share/doc/commons-cli/overview-tree.html
 -share/doc/commons-cli/index.html
 -share/doc/commons-cli/index-all.html
 -share/doc/commons-cli/help-doc.html
 -share/doc/commons-cli/deprecated-list.html
 -share/doc/commons-cli/stylesheet.css
 -share/doc/commons-cli/allclasses-frame.html
  share/java/classes/commons-cli.jar
 -@dirrm share/doc/commons-cli/org/apache/commons/cli/class-use
 -@dirrm share/doc/commons-cli/org/apache/commons/cli
 -@dirrm share/doc/commons-cli/org/apache/commons
 -@dirrm share/doc/commons-cli/org/apache
 -@dirrm share/doc/commons-cli/org
 -@dirrm share/doc/commons-cli
 
 --17pEHd4RhPHOinZp--
Responsible-Changed-From-To: freebsd-java->znerd 
Responsible-Changed-By: glewis 
Responsible-Changed-When: Tue Jan 20 09:44:24 PST 2004 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=61357 
State-Changed-From-To: open->feedback 
State-Changed-By: linimon 
State-Changed-When: Sun Apr 4 11:42:04 PDT 2004 
State-Changed-Why:  
Does the maintainer approve of the changes in this PR? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=61357 
State-Changed-From-To: feedback->closed 
State-Changed-By: znerd 
State-Changed-When: Thu Apr 15 14:14:01 PDT 2004 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=61357 

From: Oliver Eikemeier <eikemeier@fillmore-labs.com>
To: freebsd-gnats-submit@FreeBSD.org,
	Herve Quiroz <herve.quiroz@esil.univ-mrs.fr>,
	Ernst de Haan <znerd@FreeBSD.org>
Cc:  
Subject: Re: java/61357: Fix port: java/jakarta-commons-cli
Date: Fri, 16 Apr 2004 04:40:42 +0200

 PORTDOCS must be relative to DOCSDIR.
 
 -Oliver

From: Herve Quiroz <herve.quiroz@esil.univ-mrs.fr>
To: Oliver Eikemeier <eikemeier@fillmore-labs.com>
Cc: freebsd-gnats-submit@FreeBSD.org,
	Ernst de Haan <znerd@FreeBSD.org>
Subject: Re: java/61357: Fix port: java/jakarta-commons-cli
Date: Fri, 16 Apr 2004 09:03:33 +0200

 On Fri, Apr 16, 2004 at 04:40:42AM +0200, Oliver Eikemeier wrote:
 > PORTDOCS must be relative to DOCSDIR.
 > 
 > -Oliver
 
 Indeed.
 
 Here is a patch:
 
 - Fix PORTDOCS
 - bsd.java.mk 2.0 compliant
 - Removed pkg-plist
 - Done some cleanning (PLIST_SUB statement)
 
 Herve
 
 
 diff -ur jakarta-commons-cli.original/Makefile jakarta-commons-cli/Makefile
 --- jakarta-commons-cli.original/Makefile	Fri Apr 16 08:50:05 2004
 +++ jakarta-commons-cli/Makefile	Fri Apr 16 08:56:10 2004
 @@ -20,10 +20,10 @@
  BUILD_DEPENDS=	${ANT}:${PORTSDIR}/devel/apache-ant \
  		${LOCALBASE}/share/java/classes/commons-lang.jar:${PORTSDIR}/java/jakarta-commons-lang
  
 -USE_JAVA=	1.2+
 +USE_JAVA=	yes
 +JAVA_VERSION=	1.2+
  WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
  
 -PLIST_SUB+=	T=${TARGET_DIR:S/^${PREFIX}\///}
  ANT?=		${LOCALBASE}/bin/ant
  .if defined(NOPORTDOCS)
  ANT_TARGET=	jar -Dnoget
 @@ -34,9 +34,10 @@
  JARDIR=		${JAVASHAREDIR}/classes
  JARFILE=	${PORTNAME}-${PORTVERSION}-beta-2-dev.jar
  DESTJARFILE=	${PORTNAME}.jar
 +PLIST_FILES+=   ${JAVAJARDIR:S,^${PREFIX}/,,}/${DESTJARFILE}
  
  .if !defined(NOPORTDOCS)
 -PORTDOCS=	${WRKSRC}/target/docs/apidocs
 +PORTDOCS=	apidocs LICENSE.txt
  .endif
  
  do-build:
 @@ -51,7 +52,8 @@
  .if !defined(NOPORTDOCS)
  	@${ECHO} -n ">> Installing documentation in ${DOCSDIR}..."
  	@${MKDIR} ${DOCSDIR}
 -	@${CP} -r ${WRKSRC}/target/docs/apidocs/* ${DOCSDIR}
 +	@${CP} -r ${WRKSRC}/target/docs/apidocs ${DOCSDIR}/
 +	@${CP} -r ${WRKSRC}/LICENSE.txt ${DOCSDIR}/
  	@${ECHO} " [ DONE ]"
  .endif
  
 Only in jakarta-commons-cli.original: pkg-plist
State-Changed-From-To: closed->open 
State-Changed-By: znerd 
State-Changed-When: Fri Apr 16 02:00:41 PDT 2004 
State-Changed-Why:  
Re-opened. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=61357 
State-Changed-From-To: open->closed 
State-Changed-By: znerd 
State-Changed-When: Tue Apr 20 12:47:48 PDT 2004 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=61357 
>Unformatted:
