How to run AQ standalone

View: New views
2 Messages — Rating Filter:   Alert me  

How to run AQ standalone

by Wessel de Roode :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

If I would like to run AQ outside Eclipse, what should I do?
What I need as an end result is a big packed jar file where all the libraries are in so that a simple
java -jar aq.jar org.activequant.....Main would be enough to run the app.

Is there a maven target that does this job?

I've tried maven package
but this only packets the examples classes and misses all the spring, hibernate etc classes

The documentation suggest activequant-applications as a target but that no longer exists.

Any hints here? Many thanks in advance

Wessel

Re: How to run AQ standalone

by Mike Kroutikov-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Here goes the sketch of how to do this (assuming you use maven to develop your app):
 
1. create a maven project for your application.
2. add necessary dependencies on activequant (and, possibly, other) libraries
3. define a section in your pom that specifies Main-Class attribute in the manifest:
 
now when you run maven package goal, you will get your classes packaged in an executable jar file. What is left is to handle the dependencies. Use maven's assembly plugin to package final product. You can either package dependencies as separate jar files, and specify the dependency in the main jar's manifest. If you put all jars into the same folder, then executing the main jar will pick up dependencies via manifest link. Another approach is to unpack dependencies, then pack all of them up together with your main classes into a single jar file. Read assembly plugin docs and examples.
 
Separate thing is teaching maven to run your main class as a maven goal. This is possible using maven's exec plugin http://mojo.codehaus.org/exec-maven-plugin/usage.html .
 
If you need more pointers, do not hesitate to ask.
 
-Mike

On Mon, Aug 25, 2008 at 7:19 AM, Wessel de Roode <jwderoode2@...> wrote:

Hi,

If I would like to run AQ outside Eclipse, what should I do?
What I need as an end result is a big packed jar file where all the
libraries are in so that a simple
java -jar aq.jar org.activequant.....Main would be enough to run the app.

Is there a maven target that does this job?

I've tried maven package
but this only packets the examples classes and misses all the spring,
hibernate etc classes

The documentation suggest activequant-applications as a target but that no
longer exists.

Any hints here? Many thanks in advance

Wessel
--
View this message in context: http://www.nabble.com/How-to-run-AQ-standalone-tp19141979p19141979.html
Sent from the ccapi2 and activeQuant mailing list archive at Nabble.com.

_______________________________________________
ccapi mailing list
ccapi@...
http://activestocks.de/cgi-bin/mailman/listinfo/ccapi


_______________________________________________
ccapi mailing list
ccapi@...
http://activestocks.de/cgi-bin/mailman/listinfo/ccapi
LightInTheBox - Buy quality products at wholesale price!