cancel
Showing results for 
Search instead for 
Did you mean: 

how to create a jar instead of a amp using maven

purohitsumit
Champ in-the-making
Champ in-the-making
Hi All,
Sorry if this question is asked before, but i could not find any answer in my internet (i.e. google) search.
I have an alfresco+share deployment. I have been creating many customization and deploying it using ANT based deploy script that creates a jar file which is copied to <ALF_TOMCAT_LOCATION>/webapp/share/WEB-INF/lib directory.

Recently i have been trying to use some plug-ins (Ex. uploader-plus ) but it is only available as AMP.
I can not use AMP for the following reasons.

1. I dont deploy using WAR files everytime i make upate. I have 2 webapps (alfresco and share)  already exploded and all of my existing customization are in WEB-INF/lib directory. I could not find any option to deploy AMP to a webapp folder.

2. I use two different tomcats for alfresco and share, because restarting alfresco is time consuming and most of my customization are share only. I could not find any option to specify different webapp for amp deployment.

So i want to ask is there a way to modify pom.xml of the plugin to generate a .jar file instead of amp that can be copied to individual webapp's WEB-INF/lib directory. I am using alfresco 4.2.c


Here is the link of the original pom.xml
https://github.com/softwareloop/uploader-plus/blob/master/pom.xml


Thanks for your help
Sumit Purohit
2 REPLIES 2

eswbitto
Confirmed Champ
Confirmed Champ
I think you can create a jar file and put it into your shared/lib directory. I believe jeff potts has a tutorial out there on create a jar. It's Friday and I'm too lazy to verify that or not. I have created jar's before and placed them in this directory with success. So good luck. Smiley Happy

Thanks @ESWBitto for your reply. But i still have this issue open,

i tried to change the "packaging" from "amp" to "jar" in pom.xml
and i also copied the ".jar" file created by amp ( which has java source code) to WEB-INF/lib of the alfresco repo webapp. But it still fails to start alfresco successfully.


Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL [jar:file:/opt/alfresco_4.2.c/tomcat/webapps/alfresco/WEB-INF/lib/custom-repo-uploadedplus.jar!/alfresco/module/uploader-plus-repo/module-context.xml]; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'project.artifactId'



Any further help is appriciated.
And i search for Jeff's tutorial. All of them uses AMP as the deployement bundle.


thanks
sumit