You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2009/03/12 13:12:51 UTC

DO NOT REPLY [Bug 46842] New: Support Classpath Wildcards

https://issues.apache.org/bugzilla/show_bug.cgi?id=46842

           Summary: Support Classpath Wildcards
           Product: Ant
           Version: 1.7.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Core
        AssignedTo: notifications@ant.apache.org
        ReportedBy: mbm@ptc.com


Ant doesn't support Java 1.6's classpath wildcards (eg foo/*) for forked
<java>.
   http://java.sun.com/javase/6/docs/technotes/tools/windows/classpath.html

It happens in the creation of the task's path, in Path.addExisting().

If I change the first line of code in this block:
  
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/Path.java?view=markup

            if (f.exists()){
                setLocation(f);
            } else {
                log("dropping " + f + " from path as it doesn't exist",
                    Project.MSG_VERBOSE);
            }

to this:
            if (f.exists() || (f.getParentFile().exists() &&
"*".equals(f.getName()))) {

I get the behavior I desire.  Maybe this change would create problems for other
usage scenarios, but it would seem unlikely.  If so, maybe an attribute to
enable support for java classpath wildcards could be added.

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

DO NOT REPLY [Bug 46842] Support Classpath Wildcards

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46842

--- Comment #7 from jstevens@pillardata.com 2010-11-19 17:48:32 EST ---
(In reply to comment #6)
> We discussed in this thread
> http://ant.1045680.n5.nabble.com/Bug-fix-for-v1-8-1-in-the-near-future-td3244614.html
> 
> At that time the only blocker is an issue with special environment variables
> whose name start with an equals sign.
> 
> I hope we can release 1.8.2 before the end of the year. Maybe even end of this
> month.

That's excellent news!  Thanks!

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

DO NOT REPLY [Bug 46842] Support Classpath Wildcards

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46842

--- Comment #6 from Antoine Levy-Lambert <an...@apache.org> 2010-11-19 17:32:00 EST ---
We discussed in this thread
http://ant.1045680.n5.nabble.com/Bug-fix-for-v1-8-1-in-the-near-future-td3244614.html

At that time the only blocker is an issue with special environment variables
whose name start with an equals sign.

I hope we can release 1.8.2 before the end of the year. Maybe even end of this
month.

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

DO NOT REPLY [Bug 46842] Support Classpath Wildcards

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46842





--- Comment #1 from Stefan Bodewig <bo...@apache.org>  2009-07-31 07:51:33 PST ---
the classpath-wildcard functionality is provided by using filesets and works
for all tasks and all versions of Java.

I'd be a bit reluctant to change the code since we'd get surprising results
when running on Java 1.4 or Java 5 where people expected foo/* to do something
because it works "on my machine".

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

DO NOT REPLY [Bug 46842] Support Classpath Wildcards

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46842

jstevens@pillardata.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jstevens@pillardata.com

--- Comment #5 from jstevens@pillardata.com 2010-11-19 11:13:00 EST ---
Hi Stefan,

Our team has just run into this issue.  We need to be able to run tests on
Windows and can no longer do so.

I see this defect is marked fixed for 1.8.2.  Any ideas (even rough ones) as to
when 1.8.2 will be released?

Thanks!
Jason

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

DO NOT REPLY [Bug 46842] Support Classpath Wildcards

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46842





--- Comment #2 from Mike Murray <mb...@ptc.com>  2009-07-31 08:11:42 PST ---
(In reply to comment #1)

The reason I'm requesting support for the new Java classpath specification
feature is that we have situations where the classpath on the forked java
exceeds the cmd length allowed by the platform.

I need a solution other than telling users to use subst drives to shorten
paths.  This work around will only work for so long.

If someone develops a script using Java 6 features and expects it to work on an
older version of Java, the verbose output should be sufficient for the (old
Java) user to quickly determine why it does not work as expected.

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

DO NOT REPLY [Bug 46842] Support Classpath Wildcards

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46842

--- Comment #3 from John W. Lewis <Jo...@sas.com> 2010-06-17 11:29:53 EDT ---
I ran into this issue when trying to get over a z/OS classpath limit.   You
cannot have a classpath over 6129 characters.   When the JUnit task forks a
process the paths are turned into fully qualified pathnames.   So, with a lot
of jars, it is not too difficult to exceed 6129 characters.   (Unfortunately,
the VM just truncates the classpath without warning).

The patch that Mike Murray supplied works.

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

DO NOT REPLY [Bug 46842] Support Classpath Wildcards

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46842

Stefan Bodewig <bo...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |1.8.2

--- Comment #4 from Stefan Bodewig <bo...@apache.org> 2010-06-18 05:04:11 EDT ---
Added with a verbose log message that may help people track down problems.

svn revision 955896

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