cancel
Showing results for 
Search instead for 
Did you mean: 

include JAR as dependency when creating an AMP

carande
Champ in-the-making
Champ in-the-making
Hi,

I'm using the Maven SDK to develop some custom workflows as an AMP.  I've written an Activiti task listener Java class that is to be called during one of the workflow steps.  This task listener class relies on importing some dependancies, which I currently have as a JAR file.  How can I include this JAR file in the Maven project so that the task listener class is able to compile successfully when I package the AMP?  It is currently unable to resolve the import, and I can't figure out if I need to specify the path to the JAR or what.

To be more specific, I would like my task listener to make some simple queries to an Oracle database, and return the results to the workflow as a variable.  Therefore, my class must have access to the OJDBC database drivers, which I found as a JAR here: http://www.oracle.com/technetwork/database/features/jdbc/default-2280470.html

I am able to use the driver and make queries to the database when running as stand-alone java code, but can't figure out how to include the dependency when compiling the AMP.  I'm still pretty new, so if there is a better way to query an external DB from alfresco, I'd be happy to hear of that too.

Thanks!
2 REPLIES 2

douglascrp
World-Class Innovator
World-Class Innovator
You can find your answer here http://stackoverflow.com/a/1074971

But what you are trying to do is not specific to Alfresco SDK, but it's a general Maven subject.

carande
Champ in-the-making
Champ in-the-making
Thank you, this is exactly what I was looking for.  I suspected this was a more general issue, and this helps my understanding a great deal.