maven Jahia 7.3 Jahia 8

Issue with the usage of Maven

Question

First issue:

Access to the Studio is not enabled due to this error

maven is not correctly configured, the studio is disabled

 

Second issue:

After creating a module with the Jahia Studio, this one does not appear in the Studio, nor in the module management screen.

Cause

First issue:
The Apache Maven script is mvn.cmd and Digital Factory is looking for a maven script as: mvn.bat
 

Second issue:
This is due to this error in the built process:

[WARNING] Error reading archetype catalog https://devtools.jahia.com/nexus/content/repositories/jahia-releases/archetype-catalog.xml
org.apache.maven.wagon.TransferFailedException: Connect to devtools.jahia.com:443 [devtools.jahia.com/37.187.146.55] failed: Connection refused: connect

Solution

First issue:

Duplicate the mvn.cmd script in mvn.bat and ensure that the mvnPath property is set as below in the jahia.properties file:

mvnPath = mvn

Second issue:

Add the below property in the jahia.properties file to connect to our Maven repository in HTTP:

jahia.mavenArchetypeCatalog=http://devtools.jahia.com/nexus/content/repositories/jahia-releases/archetype-catalog.xml