02-20-2018 02:19 AM
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))
02-21-2018 06:58 AM
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...
02-20-2018 02:45 AM
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.
02-20-2018 05:32 AM
But where I can find the path? I installed alfresco-community and I don't find the location. Can you provide the full path ?
02-20-2018 07:51 AM
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.
02-21-2018 04:21 AM
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?
02-21-2018 06:58 AM
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...
Explore our Alfresco products with the links below. Use labels to filter content by product module.