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))
Solved! Go 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...
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.
But where I can find the path? I installed alfresco-community and I don't find the location. Can you provide the full path ?
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.
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?
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...
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.