Alfresco SDK 3.0 Jar deployment

cancel
Showing results for 
Search instead for 
Did you mean: 
calin_chiper
Active Member

Alfresco SDK 3.0 Jar deployment

Jump to solution

I'm currently using Alfresco SDK 3.0 as a back-end service and Alfresco ADF Angular Components as a front-end. I've set up the integration test and a database connection using PostgreSQL. It works fine when I mvn clean install alfresco:run. My question is how can I deploy the app on a server for example? I know that in target folder it generates a jar file and a war file. Since the tomcat is embedded there no need to copy the jar or war in tomcat/webapps, just to run the app. I ran the app using java -jar alfresco-1.0-SNAPSHOT.jar and I got the following error: no main manifest attribute, in alfresco-1.0-SNAPSHOT.jar. 

target folder

What are the right steps to make the Alfresco SDK app running correctly on server?

P.S.:

 I generated the app using

mvn archetype:generate -Dfilter=org.alfresco:

and selected 

4: remote -> org.alfresco.maven.archetype:alfresco-platform-jar-archetype (Sample project with full support for lifecycle and rapid development of Platform/Repository JARs and AMPs (Alfresco Module Packages))

1 Solution

Accepted Solutions
afaust
Master

Re: Alfresco SDK 3.0 Jar deployment

Jump to solution

In a Maven WAR build project you create for yourself. The pom.xml you find in the deployed application are just documentation for how the application itself was built. They are not meant to be used for anything. Please read the documentation and SDK guides that are easy to find on the net...

View solution in original post

5 Replies
krutik_jayswal
Senior Member II

Re: Alfresco SDK 3.0 Jar deployment

Jump to solution

Jar file which gets generated have a limited amount of file.It does not contains the full alfresco.It only contains the files which are customized/extended.

For making deployments on server, there should be alfresco installed on server.Inside that installation you should copy the jar file inside the WEB-INF/lib or you can copy the war files as well.

calin_chiper
Active Member

Re: Alfresco SDK 3.0 Jar deployment

Jump to solution

But where I can find the path? I installed alfresco-community and I don't find the location. Can you provide the full path ?

afaust
Master

Re: Alfresco SDK 3.0 Jar deployment

Jump to solution

Alternatively, check the documentation for JAR packagin / deployment. WEB-INF/lib is actually not a recommended path since that is not upgrade safe. Whenever you upgrade to a new Alfresco version, that directory should be deleted and you would loose your modules. In a default install, Alfresco already provides two directories for JAR modules.

calin_chiper
Active Member

Re: Alfresco SDK 3.0 Jar deployment

Jump to solution

So the jar can be attached as a dependency in pom.xml? Where can I find this pom.xml? alfresco-community\tomcat\webapps\alfresco\META-INF\maven\org.alfresco\alfresco-platform\pom.xml?

afaust
Master

Re: Alfresco SDK 3.0 Jar deployment

Jump to solution

In a Maven WAR build project you create for yourself. The pom.xml you find in the deployed application are just documentation for how the application itself was built. They are not meant to be used for anything. Please read the documentation and SDK guides that are easy to find on the net...