You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2006/09/15 16:29:34 UTC

DO NOT REPLY [Bug 40522] New: - Fix coreloader so that it works

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40522>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40522

           Summary: Fix coreloader so that it works
           Product: Ant
           Version: 1.7Alpha (nightly)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
        AssignedTo: dev@ant.apache.org
        ReportedBy: peterreilly@apache.org


project.setCoreLoader(Classloader x) has been part
of the ant code base for quite a long time, (it
was orignally called project.setSystemLoader(Classloader x)).

Currently it does not do anything usefull, but with a few modifications
it can be made to work again.

1) change antclassloader to use the core loader as a parent
   loader
2) when the coreloader is changed update all the non resolved
   tasks and types that use the coreloader to use the new
   core loader.

Two other changes are also necessary:
1) when the coreloader is set, ensure that it can be used
   to resolve Project correctly.
2) modify oata.taskdefs.Classloader to add types.optional and
   util.optional to its addLoaderPackageRoot list.

When these changes are made, <classloader> works.
<classloader> has been in the ant code since 1.6, but has not
been docuemented.

With these changes one can do the following:
<project ... xmlns:ac="antlib:net.sf.antcontrib">
    <classloader>
      <classpath>
        <pathelement path="c:/apps/jdepend-2.9.1/lib/jdepend-2.9.1.jar"/>
        <pathelement path="${ant.home}/lib/ant-jdepend.jar"/>
        <pathelement path="c:/apps/ant-contrib/build/lib/ant-contrib.jar"/>
     </classpath>
    </classloader>

    <jdepend>
       ..
    </jdepend>

    <ac:for ...
    <ac:for

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 40522] - [Patch] Fix coreloader so that it works

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40522>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40522





------- Additional Comments From peterreilly@apache.org  2006-09-15 16:04 -------
It is more similar to the <addlibpath>
When I introduced that, I said that it
is similar to the coreloader stuff, which
I could not get to work.

The main difference is that the coreloader
code does not need to modify a classloader.

There are a number of things to be done
to make it rock solid, (handling of <antcall>
<ant> etc, easier handling of ant-<optional> jars
etc, modification of <classloader> task to only
handle the coreloader and not other classloaders
(this is done *much* better by 
Rainer's http://jtools.org/ant-classloadertask task).

the <appendprojectpath> task is a simplified copy
of Rainer's task, it only handles the project classpath
and assumes that it is URLClassLoader. The latter assumption
may not be true if ant is used outside of ant[.bat] (say
in a web application).




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 40522] - [Patch] Fix coreloader so that it works

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40522>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40522





------- Additional Comments From gudnabrsam@yahoo.com  2006-09-15 15:19 -------
How does the example below differ from your <appendprojectpath> prototype task?
 Is it that fixing this code that is already "polluting" our released codebase
by being present in a less-than-wholly-working state, that the need for
<appendprojectpath> would be obviated?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 40522] - Fix coreloader so that it works

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40522>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40522


peterreilly@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tseigne@lavastorm-
                   |                            |engineering.com




------- Additional Comments From peterreilly@apache.org  2006-09-15 14:32 -------
*** Bug 21635 has been marked as a duplicate of this bug. ***

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 40522] - [Patch] Fix coreloader so that it works

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40522>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40522


peterreilly@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Fix coreloader so that it   |[Patch] Fix coreloader so
                   |works                       |that it works




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 40522] - Fix coreloader so that it works

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40522>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40522





------- Additional Comments From peterreilly@apache.org  2006-09-15 14:33 -------
Created an attachment (id=18870)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=18870&action=view)
patch of changes to fix coreloader


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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