ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sam Ruby" <ru...@us.ibm.com>
Subject Re: [BUG?] Java Task adds Ant Classpath when forking
Date Tue, 09 Jan 2001 15:39:36 GMT
[ copying Daniel as I'm not sure he follows Ant-dev, in any case, I haven't
seem him recently here; Daniel the full text of Conor's reply is below ]

Daniel, the change was identional, with the rationalle (and consensus with
only Peter Donald essentially abstaining) that the previous behavior of
ignoring the user's classpath was a bug.  Peter's concern was that this
change was not backwards compatible, and the fact that this change has
affected you to the point that you found it worth reporting as a potential
bug certainly adds validity to this concern.  I would be very interested in
your opinion after you have read this note.

The behavior of how the system and build classpaths are to be combined can
now be controlled via a property: build.sysclasspath.  It's permissable
values are first (the default), last, ignore (Ant's 1.2 behavior), and
only.  If we decide the default is incorrect, a one line fix to
ant/types/Path.java will be all that is necessary.  The reason why this
support is necessary is that while we all agree that precise control over
the classpath is necessary, we differ at times and depending on the
situation as to who can be trusted to make that decision.

An example of a use case where the wishes of the person running the build
should take precidence can be found at:

   http://oss.software.ibm.com/developerworks/opensource/jakarta/proto/index.html

Conor, as much as possible I would like tasks like <available> and <java>
to interpret the classpath when specified in the same manner.  It seems
much more error prone to expect each user of the class loader to act in a
precisely similar manner than it is to embedd this logic inside of the
class loader, but I recognize that opinions may vary.  In any case, adding
the system class path in accordance to the value of the property is only a
single method call, so the code bloat is managable.

- Sam Ruby

P.S.  I owe the project an updating of the docs/index.html to document this
new behavior.


"Conor MacNeill" <conor@cognet.com.au> on 01/09/2001 09:35:11 AM

Please respond to ant-dev@jakarta.apache.org

To:   <ant-dev@jakarta.apache.org>
cc:
Subject:  Re: [BUG?] Java Task adds Ant Classpath when forking



Daniel,

This change has come about because Sam has changed the AntClassLoader

-        this.classpath = classpath;
+        this.classpath = classpath.concatSystemClasspath();

I don't think that is right. I haven't followed Sam's buildpath changes too
closely but I think it would be better to change the code that creates/uses
the class loader rather than change the classloader itself. I'm going back
to read the whole thread now in detail, but perhaps Sam can jump in here.

Conor

----- Original Message -----
From: "Daniel Hoppe" <hoppe@sitewaerts.de>
To: <ant-user@jakarta.apache.org>
Sent: Wednesday, January 10, 2001 12:58 AM
Subject: [BUG?] Java Task adds Ant Classpath when forking


> Hi Ants,
>
> in the Ant Distribution I got from the CVS I think I might have
discovered a
> bug in the java task. In the nightly build I was using before (24th of
> December), the classpath passed to java when forking was the one
specified
> in the classpathref. The new build additionally prepends the complete Ant
> classpath to the specified classpathref. Was this behaviour introduced
> intentionally? Please find the vebose messages and buildfile snippets
below.
>
> Best Regards,
>
> Daniel
>
> ---------
>
> Buildfile Snippets:
> <path id="weblogic.class.path">
> <pathelement path="../../weblogic/lib/weblogic510sp8.jar"/>
> <pathelement path="../../application/fbs/classfiles"/>
> <pathelement path="../../lib/activation.jar"/>
> <pathelement path="../../lib/jakarta-regexp-1.1.jar"/>
> <pathelement path="../../lib/jaxp.jar"/>
> <pathelement path="../../lib/mail.jar"/>
> <pathelement path="../../lib/pop3.jar"/>
> <pathelement path="../../lib/xerces.jar"/>
> <pathelement path="../../lib/classes12.zip"/>
> <pathelement path="../../weblogic/license"/>
> <pathelement path="../../weblogic/classes"/>
> <pathelement path="../../weblogic/lib/weblogicaux.jar"/>
> </path>
> <property name="weblogic.class.path" refid="weblogic.class.path"/>
> <path id="weblogic.system.path">
> <pathelement path="../../weblogic/lib/weblogic510sp8boot.jar"/>
> <pathelement path="../../weblogic/classes/boot"/>
> </path>
>
> <snip/>
>
> <java classname="weblogic.Server" classpathref="weblogic.system.path"
> fork="true" maxmemory="128m">
> <jvmarg value="-Dweblogic.class.path=${weblogic.class.path}"/>
> <jvmarg
> value="-Dfutuna.logstream=de.sitewaerts.futuna.util.WLLogStream"/>
> <jvmarg value="-Dweblogic.home=c:\dev\fbs\weblogic\"/>
> <jvmarg value="-Dweblogic.system.name=fbs"/>
> <jvmarg value="-Dweblogic.system.home=c:\dev\fbs\application\"/>
> <jvmarg value="-Djava.security.manager"/>
> <jvmarg
> value="-Djava.security.policy==c:\dev\fbs\application\weblogic.policy"/>
> <jvmarg
>
value="-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.Do
c
> umentBuilderFactoryImpl"/>
> <jvmarg value="-Dfutuna.recipient=${user}@sitewaerts.de"/>
> <jvmarg
>
value="-Dfutuna.rdbmsrealm.properties=c:/dev/fbs/application/fbs/rdbmsrealm
.
> properties"/>
> <jvmarg value="-Dweblogic.cluster.enable=false"/>
> </java>
>
>
> ant - verbose, build from the CVS sources, 9th of January:
>
>      [java] Forking java
> -Dweblogic.class.path=
> C:\dev\fbs\weblogic\lib\weblogic510sp8.jar;
> C:\dev\fbs\application\fbs\classfiles;
> C:\dev\fbs\lib\activation.jar;
> C:\dev\fbs\lib\jakarta-regexp-1.1.jar;
> C:\dev\fbs\lib\jaxp.jar;
> C:\dev\fbs\lib\mail.jar;
> C:\dev\fbs\lib\pop3.jar;
> C:\dev\fbs\lib\xerces.jar;
> C:\dev\fbs\lib\classes12.zip;
> C:\dev\fbs\weblogic\license;
> C:\dev\fbs\weblogic\classes;
> C:\dev\fbs\weblogic\lib\weblogicaux.jar
> -Dfutuna.logstream=de.sitewaerts.futuna.util.WLLogStream
> -Dweblogic.home=c:\dev\fbs\weblogic\
> -Dweblogic.system.name=fbs
> -Dweblogic.system.home=c:\dev\fbs\application\
> -Djava.security.manager
> -Djava.security.policy==c:\dev\fbs\application\weblogic.policy
> -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.Documen
> tBuilderFactoryImpl
> -Dfutuna.recipient=hoppe@sitewaerts.de
> -Dfutuna.rdbmsrealm.properties=c:/dev/fbs/application/fbs/rdbmsrealm.prop
> erties
> -Dweblogic.cluster.enable=false
> -Xmx128m
> -classpath
> C:\Programme\jdk1.3\lib\tools.jar;
> C:\dev\fbs\build\jakarta-ant\lib\core\parser.jar;
> C:\dev\fbs\build\jakarta-ant\lib\core\junit.jar;
> C:\dev\fbs\build\jakarta-ant\lib\core\jaxp.jar;
> C:\dev\fbs\build\jakarta-ant\lib\optional.jar;
> C:\dev\fbs\build\jakarta-ant\lib\ant.jar;
> C:\dev\fbs\weblogic\lib\weblogic510sp8boot.jar;
> C:\dev\fbs\weblogic\classes\boot
> weblogic.Server
>
> ant -verbose, build from 24th of December:
>
>      [java] Forking java
> -Dweblogic.class.path=
> C:\dev\fbs\weblogic\lib\weblogic510sp8.jar;
> C:\dev\fbs\application\fbs\classfiles;
> C:\dev\fbs\lib\activation.jar;
> C:\dev\fbs\lib\jakarta-regexp-1.1.jar;
> C:\dev\fbs\lib\jaxp.jar;
> C:\dev\fbs\lib\mail.jar;
> C:\dev\fbs\lib\pop3.jar;
> C:\dev\fbs\lib\xerces.jar;
> C:\dev\fbs\lib\classes12.zip;
> C:\dev\fbs\weblogic\license;
> C:\dev\fbs\weblogic\classes;
> C:\dev\fbs\weblogic\lib\weblogicaux.jar
> -Dfutuna.logstream=de.sitewaerts.futuna.util.WLLogStream
> -Dweblogic.home=c:\dev\fbs\weblogic\
> -Dweblogic.system.name=fbs
> -Dweblogic.system.home=c:\dev\fbs\application\
> -Djava.security.manager
> -Djava.security.policy==c:\dev\fbs\application\weblogic.policy
> -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.Documen
> tBuilderFactoryImpl
> -Dfutuna.recipient=hoppe@sitewaerts.de
> -Dfutuna.rdbmsrealm.properties=c:/dev/fbs/application/fbs/rdbmsrealm.prop
> erties
> -Dweblogic.cluster.enable=false
> -Xmx128m
> -classpath
> C:\dev\fbs\weblogic\lib\weblogic510sp8boot.jar;
> C:\dev\fbs\weblogic\classes\boot
> weblogic.Server
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: ant-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: ant-dev-help@jakarta.apache.org




Mime
View raw message