Running Alfresco and Share separately with an AIO project using SDK 1.1.1 to 2.2.0
I am a freelancer, formerly an Alfresco developer and consultant, but now exploring new technologies like Supabase to target budget projects and produce faster.
Search for a command to run...
I am a freelancer, formerly an Alfresco developer and consultant, but now exploring new technologies like Supabase to target budget projects and produce faster.
No comments yet. Be the first to comment.
Sometimes we mix actions and behaviors in Alfresco to automate tasks, and it is hard to have control over their execution order. It is especially true when you mix behaviors and action.Depending on the frequency of the behavior, a behavior might trig...
On september the 30th of 2021, the Let's Encrypt DST Root CA X3 certificate expired . If you are hosting a website on Windows Server with IIS, if you generated your TLS certificates with win-acme and if you don't have the new ISRG Root X1 certificat...
Développeur indépendant depuis quelque temps déjà, j'ai eu connaissance du site codeur.com il y a un peu plus d'un an. A propos de codeur.com Le site met en relation développeurs, webmasters, dba, UX/UI designers ou autres prestataires techniques ave...
Smoobu's API allows third-party systems to insert custom variables in bookings and apartments (currently in beta) , even-though it is not clear since they call these variables "custom placeholders", because these variables can be set as placeholders...
Supabase doesn't yet provide a way to see postgresql logs from the admin interface. But there is a way to see the logs from within PostgreSQL, using SQL. The file_fdw extension The file_fdw extension allows to wrap an external data source into a ta...
When developping with Alfresco SDK with a All-in-one project, rebooting the app (running with mvn install –Prun ) to test a new line of code or a little fix takes a lot of time. Sometimes you just need to restart either Share or Alfresco, but in the cases where the command mvn refresh:share / mvn refresh:repo doesn't work you have to restart the whole server.
If the modification you want to test doesn't require Solr to be running (for SDK 2.X), the solution is to run Share and Alfresco separately, as you would do if your project only had two modules (share and repo) set with the archetypes share-amp and repo-amp, using the maven command mvn integration-test –Pamp-to-war on localhost:8080 for Alfresco and localhost:8081 for Share.
You can use this command in an All-in-one at the cost of some modifications in the files structure and the poms.
For all versions of Alfresco/SDK, add the following property to the share-amp module pom :
<maven.tomcat.port>8081</maven.tomcat.port>
Also create a folder tomcat under the root folder of the modules repo-amp and share-amp and a file named context.xml in the tomcat folders :
Then, depending on the version of Alfresco and of the SDK you are using, do the following :
Content of repo-amp and share-amp context.xml :
<?xml version="1.0" encoding="UTF-8"?>
<Context docBase="${alfresco.client.war.folder}" path="${alfresco.client.contextPath}">
</Context>
Just add the following property to the parent pom :
<alfresco.client.contextPath>/alfresco</alfresco.client.contextPath>
and the following property to the share-amp module pom :
<alfresco.client.contextPath>/share</alfresco.client.contextPath>
The context.xml files already exist and are properly set OOTB.
• Content of repo-amp context.xml :
<?xml version="1.0" encoding="UTF-8"?>
<Context docBase="${app.amp.client.war.folder}" path="${alfresco.client.contextPath}">
<Resources className="org.apache.naming.resources.VirtualDirContext"
extraResourcePaths="/=${project.build.directory}/${project.build.finalName}/web" />
<Loader searchVirtualFirst="true"
className="org.apache.catalina.loader.VirtualWebappLoader"
virtualClasspath="${project.build.outputDirectory};${project.build.directory}/${project.build.finalName}/config;${project.build.testOutputDirectory}" />
<JarScanner scanAllDirectories="true" />
</Context>
• Content of share-amp context.xml :
<?xml version="1.0" encoding="UTF-8"?>
<Context docBase="${app.amp.client.war.folder}" path="${share.client.contextPath}">
<Resources className="org.apache.naming.resources.VirtualDirContext"
extraResourcePaths="/=${project.build.directory}/${project.build.finalName}/web" />
<Loader searchVirtualFirst="true"
className="org.apache.catalina.loader.VirtualWebappLoader" virtualClasspath="${project.build.outputDirectory};${project.build.directory}/${project.build.finalName}/config;${project.build.testOutputDirectory}" />
<JarScanner scanAllDirectories="true" />
</Context>
• Content of repo-amp context.xml :
<?xml version="1.0" encoding="UTF-8"?>
<Context path="${alfresco.client.contextPath}">
<Resources className="org.apache.naming.resources.VirtualDirContext"
extraResourcePaths="/=${project.build.directory}/amp/web,${app.amp.client.war.folder}" />
<Loader searchVirtualFirst="true"
className="org.apache.catalina.loader.VirtualWebappLoader"
virtualClasspath="${project.build.outputDirectory};${project.build.directory}/amp/config;${project.build.testOutputDirectory}" />
<JarScanner scanAllDirectories="true" />
</Context>
• Content of share-amp context.xml :
<?xml version="1.0" encoding="UTF-8"?>
<Context path="${share.client.contextPath}">
<Resources className="org.apache.naming.resources.VirtualDirContext"
extraResourcePaths="/=${project.build.directory}/amp/web,${app.amp.client.war.folder}" />
<Loader searchVirtualFirst="true"
className="org.apache.catalina.loader.VirtualWebappLoader"
virtualClasspath="${project.build.outputDirectory};${project.build.directory}/amp/config;${project.build.testOutputDirectory}" />
<JarScanner scanAllDirectories="true" />
</Context>