You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Marcipicus <ma...@gmail.com> on 2012/07/01 21:33:14 UTC

Where should the jar files for user defined tasks be placed?

Hi, I've recently developed an ant Task and I'm trying to figure out where
the jar file is supposed to be placed.

I went through the tutorial at 
http://ant.apache.org/manual/tutorial-writing-tasks.html and the only
reference I found to installation said to drop the file in the correct
place.

So I assume there's a plugins/tasks directory and I was hoping to find out
where that would be. I'm using Linux Mint 12 as my operating system.

Any help anyone can give me is greatly appreciated.

--
View this message in context: http://ant.1045680.n5.nabble.com/Where-should-the-jar-files-for-user-defined-tasks-be-placed-tp5713363.html
Sent from the Ant - Dev mailing list archive at Nabble.com.

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


Re: Where should the jar files for user defined tasks be placed?

Posted by TM <mo...@gmail.com>.
Hi Marcipicus,

Debian/Ubuntu packages dump jars into `/usr/share/java/`, symlinked from
`/usr/share/ant/lib/`.  I would use `/usr/local/share/ant/` for your task.

`ln -s /path/to/my.jar /usr/share/ant/lib/my.jar`

This is not ideal (see /usr/share/ant/bin/ant):

  # ...Because the launcher is used, libraries linked in
  # ANT_HOME/lib will also be included, but this is discouraged
  # as it is not java-version safe. A user should request optional
  # jars and their dependencies via the OPT_JAR_LIST variable

Chase `$LOCALCLASSPATH` and `$OPT_JAR_LIST` through there.


On 07/01/2012 03:33 PM, Marcipicus wrote:
> Hi, I've recently developed an ant Task and I'm trying to figure out where
> the jar file is supposed to be placed.
> 
> I went through the tutorial at 
> http://ant.apache.org/manual/tutorial-writing-tasks.html and the only
> reference I found to installation said to drop the file in the correct
> place.
> 
> So I assume there's a plugins/tasks directory and I was hoping to find out
> where that would be. I'm using Linux Mint 12 as my operating system.
> 
> Any help anyone can give me is greatly appreciated.
> 
> --
> View this message in context: http://ant.1045680.n5.nabble.com/Where-should-the-jar-files-for-user-defined-tasks-be-placed-tp5713363.html
> Sent from the Ant - Dev mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
> 

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


Re: Where should the jar files for user defined tasks be placed?

Posted by Marcipicus <ma...@gmail.com>.
Sorry about posting this on the wrong list I'll remember the
difference for next time.

Thanks for the help TM and Stefan.

I found out after reading TM's post that you can add user libraries to
ant's classpath in eclipse using the
ExternalToolsConfigurationDialog->Ant configuration->Classpath tab and
clicking on add jar.


--
View this message in context: http://ant.1045680.n5.nabble.com/Where-should-the-jar-files-for-user-defined-tasks-be-placed-tp5713363p5713367.html
Sent from the Ant - Dev mailing list archive at Nabble.com.

Re: Where should the jar files for user defined tasks be placed?

Posted by Stefan Bodewig <bo...@apache.org>.
[actually, this is a user-list question, the dev lists discusses
developing Ant itself]

On 2012-07-01, Marcipicus wrote:

> Hi, I've recently developed an ant Task and I'm trying to figure out where
> the jar file is supposed to be placed.

Depends on who is supposed to use it.  If ot is just yourself then
~/.ant/lib is the place to go, otherwise $ANT_HOME/lib is it.  Note that
things may be different if you are using a version of Ant installed from
an operating system package as they come with modified shell scripts.
If you are using such a modified script then you'll have to consult the
documentation of you package as we can't know all scripts that are
around.

Stefan

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