Doug,

    As you can see for rtf I need to do more than just download the jar
file as there is not a precompiled version on the net. I have to
download the source and then run a number of steps to get to the
resulting jar. I'm not sure that the plugin's build.xml is the place to
be doing this as it seems to be called twice. Anyway this is just a
first cut to see what you and the rest of the list think we should do in
this situation. Unit tests won't pass as they are dependant on the file
protocol which is dependant on activation...

--- build.properties
javacc.home=/usr/java/javacc

--- build.xml

<project name="parse-rtf" default="jar">

  <import file="../build-plugin.xml"/>
   
  <mkdir dir="tmp"/>
  <get src="http://www.cobase.cs.ucla.edu/pub/javacc/rtf_parser_src.jar";
          dest="tmp/rtf_parser_src.jar"/>
  <unjar src="tmp/rtf_parser_src.jar"
        dest="tmp"/>
  <javacc target="tmp/rtf/RTFParser.jj"
    javacchome="${javacc.home}">
  </javacc>

  <mkdir dir="tmp/classes"/>
  <javac srcdir="tmp" destdir="tmp/classes"/>
  <jar destfile="lib/rtf-parser.jar" basedir="tmp/classes"/>

  <!-- for junit test -->
  <mkdir dir="${build.test}/data"/>
  <copy file="sample/test.rtf" todir="${build.test}/data"/>
</project>

Doug Cutting wrote:

> Andy Hedges wrote:
>
>>    Was just checking through the mailing list to see how things were
>> going with Nutch. It seems that two of my contributions had to be
>> removed because they aren't compatible with the ASF licenses (rtf and
>> mp3 parsers). So what needs to be done to get them back in? Do
>> alternative libraries need to be written/used that are either BSD or
>> ASF licensed? Could you let me know and I'll try and find sometime to
>> rectify the issue.
>
>
> Right, Apache doesn't permit GPL'd stuff on Apache servers.  One
> possibility is to rewrite them to use different libraries.  Another
> approach is to just get the user to download the required stuff
> themselves.
>
> For example, a plugin's build.xml can download required libraries as
> follows.  First, add a few properties noting where the required jar
> lives on the net, and where it should be stored:
>
> <property name="foo.jar" value="lib/my.jar"/>
> <property name="foo.url" value="http://foo.com/foo.jar"/>
>
> http://ant.apache.org/manual/CoreTasks/available.html
>
> Then define a target to download it as needed:
>
> <available file="${foo.jar}" property="foo.jar.available"/>
>
> <target name="download-foo" unless="foo.jar.available">
>   <get src="${foo.url}" dest="${foo.jar}"/>
> </target>
>
> http://ant.apache.org/manual/CoreTasks/available.html
> http://ant.apache.org/manual/CoreTasks/get.html
>
> and finally, override the init-plugin task to first download it:
>
>   <target name="init-plugin" depends="download-libs"/>
>
> Does this make sense?
>
> Doug
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: 2005 Windows Mobile Application
> Contest
> Submit applications for Windows Mobile(tm)-based Pocket PCs or
> Smartphones
> for the chance to win $25,000 and application distribution. Enter
> today at
> http://ads.osdn.com/?ad_id=6882&alloc_id=15148&op=click
> _______________________________________________
> Nutch-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/nutch-developers




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Nutch-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nutch-developers

Reply via email to