Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Jan 2004 12:55:02 +0100 (CET)
From:      Herve Quiroz <herve.quiroz@esil.univ-mrs.fr>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   java/61357: Fix port: java/jakarta-commons-cli
Message-ID:  <200401141155.i0EBt2w7008685@andouillette.esil.univ-mrs.fr>
Resent-Message-ID: <200401141200.i0EC0RJD056630@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         61357
>Category:       java
>Synopsis:       Fix port: java/jakarta-commons-cli
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-java
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 14 04:00:26 PST 2004
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200401141155.i0EBt2w7008685>