Question

Is it possible to do something like this to use a jar in a website? I need to add this jar to the classpath.

<property name="server.dir" value="http://xxxxxx/build/ />

<property name="jms.jar.dir" value="${server.dir}\\jms\\jars\\jms-1.3.1_02.jar" />

Then I have this:

<path id="jars.class.path">
     <pathelement location="${jms.jar.dir}" />
</path>

The problem is that the application is built on the server, so I can't have local properties in the build.xml. That's why a need a way to reference the jars in the server.

Was it helpful?

Solution

This is not directly possible to link jars from a web-location. what you can do is to use a Get Task to download jar everytime on a location and refer jar from that location in your build xml

for example:

<get src="http://ant.apache.org/" dest="help/index.html"/>

keep your main task's dependency on this new Get Task in order to execute it everytime you build your project.

Hope this Helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top