Bug 5825 - junitreport classpath
Summary: junitreport classpath
Status: RESOLVED DUPLICATE of bug 6606
Alias: None
Product: Ant
Classification: Unclassified
Component: Optional Tasks (show other bugs)
Version: 1.4.1
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-01-12 18:30 UTC by Bobby Nations
Modified: 2008-02-22 12:18 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bobby Nations 2002-01-12 18:30:26 UTC
Please modify the junitreport task so that it will take a nested classpath
element.  Right now, you have to put teh xalan and xerces jar files in your main
classpath, which reaks havoc for some IDE's.  The build file should be
self-referential so that when properly written it would run even if the
CLASSPATH variable had been unset.
Comment 1 Steve Loughran 2002-01-12 21:08:41 UTC
You are correct that putting things in CLASSPATH breaks other things; Ant will 
work with CLASSPATH="" which is how I run. You need to put the dependent jars 
into ANT_HOME/lib and they will be automatically picked up. 

I am not sure if adding a classpath would work, as xerces cannot be in a 
subsiduary classloader from JAXP and be discoverable, (one of the many 
miracles of classpaths), so the task would work without forking a whole new 
instance of ant.

So I am tempted to file this as WONTFIX, but I'll leave that to someone else 
who can confirm the problem.
Comment 2 Bobby Nations 2002-01-12 21:59:48 UTC
Steve, 

Thanks for the quick reply.  Putting xalan.jar and xerces.jar into ANT_HOME/lib
did indeed solve the problem.

How about just shipping the xalan.jar and xerces.jar files with ant?  That way,
someone could download ant and have everything all ready to run right out of the
box.  

If that is too expensive because of their size, maybe the junitreport manual
page could contain some notice or instructions letting end users know to put the
two files into ANT_HOME/lib in order to get it to work.
Comment 3 Stephane Bailliez 2002-01-14 14:38:01 UTC
Bobby,
You are only thinking about your personal case.
Keep in mind that all other optional tasks require some other third party. It 
would be terrible to ship Ant with all dependencies and what about commercial 
products then ?

The Ant installation is described in details in the manual. Section 'Install 
Ant'. See here:
http://jakarta.apache.org/ant/manual/install.html

If it is not clear, feel free to send patches to enhance the manual.
Comment 4 Bobby Nations 2002-01-14 15:01:24 UTC
Stephane,

Thanks for the note.  Here's a patch for the install.html file given in your
link listing the dependencies for junitreports.  I used 'diff -u new_file.html
old_file.html' to generate it.

Cheers

##### PATCH BEGINS #######
--- junitreports_install.html   Mon Jan 14 16:55:11 2002
+++ install.html        Mon Jan 14 16:55:26 2002
@@ -267,15 +267,6 @@
     <td><a href="http://www.junit.org/" target="_top">www.junit.org</a></td>
   </tr>
   <tr>
-    <td>xalan.jar, xerces.jar</td>
-    <td>junitreport tasks</td>
-    <td>
-      <a href="http://xml.apache.org/xalan-j/index.html">
-        http://xml.apache.org/xalan-j/index.html
-      </a>
-    </td>
-  </tr>
-  <tr>
     <td>stylebook.jar</td>
     <td>stylebook task</td>
     <td>CVS repository of <a href="http://xml.apache.org"
target="_top">xml.apache.org</a></td>
##### PATCH ENDS #######
Comment 5 Steve Loughran 2002-02-22 07:12:11 UTC

*** This bug has been marked as a duplicate of 6606 ***