[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.platform] Re: External Plug-in Modification
|
Paul,
I've read up on ant, xml, and the workbench. I've played with the "external
tools" of eclipse but can't seem to figure out anything but creating my own
ant tool. I find no reference to modifying any ant task that exists as the
eclipse ant plugin.
How do I get to the ant task that's associated with ftp?
Thanks,
Bob
"Paul Webster" <pwebster@xxxxxxxxxx> wrote in message
news:ee3pjt$tc3$1@xxxxxxxxxxxxxxxxxxxx
> Bob wrote:
>>
>> The reason I'm looking into this is that our eclipse installation has an
>> ftp client and my target has changed port numbers. I've found the file
>> FTP.java down in a source tree under org.apache.ant_1.5.3 . This file
>> defines the standard port of 21 for the ftp port. I simply desire to
>> change this port number and re-build, create the .jar and put it into my
>> plugins directory under my eclipse installation so that my client will
>> have a different port number. I'm having trouble building this source
>> though.
>
> Why not just set the port in the ant task?
>
>> First off, can this be done with external plugins that come with the
>> installation. I figured that if the source comes with it, then it can be
>> built, but I noticed a line in the PDE guide under the Fragments section
>> that says:
>>
>> "Since external plug-ins cannot be changed inside the workbench, the
>> environment inherently supports the fact that the fragment should be
>> developed without modifying its target plug-in. "
>
> This is talking about plugin jars that are actually in your
> eclipse/plugins directory. Normally you would update certain types of
> resources (like language packs) by adding a fragment to the main plugin.
>
> For most external plugins, you can import the plugin as a source plugin,
> make a change, use File>Export...>Deployable plugins and fragments to
> generate a new .jar file. Then you copy that into your eclipse/plugins
> directory, and restart eclipse with -clean, and you will have a "patched"
> version of eclipse.
>
>
>>
>> When I import the plugin by Import->External Plug-ins and Fragments
>> And then select the ant plugin with added required plugins and choose
>> extract source (because the source in zipped) It build with a ton of
>> errors.
>
>
> The ant plugin is different, since we take an ant distribution and package
> it as a plugin. You would probably have to:
>
> 1) unjar the plugin.
> 2) find the ant jar that contains the Ftp.class file
> 3) replace it with your Ftp.class file (magically generated by you)
> 4) rejar the plugin, and copy it back into eclipse/plugins directory
> (saving the original, of course)
> 5) restart eclipse with -clean
>
>
> I'd really suggest changing the port in the ftp ant task. Use a property
> that can be given the default, 21, so that if somebody just runs it they
> get 21 and if you pass in your -Dftp.property=8001 you'll get your port.
>
> Later,
> PW