Error while building maven project with admin access
Hi,
I am trying to build an archetype49 project using below command
mvn org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate -DarchetypeGroupId=com.adobe.aem -DarchetypeArtifactId=aem-project-archetype -DarchetypeVersion=49 -DappTitle="My Site" -DappId="mysite" -DgroupId="com.mysite"
Initially I was getting below error
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
So, I downloaded the SSL certificate from https://repo.maven.apache.org/ and installed under "C:\Program Files\Java\jdk-11\lib\security\cacerts.file" I used below command
keytool -importcert -file "C:\AEM65\mvncrt.crt" -alias aliasnamessl -keystore "C:\Program Files\Java\jdk-11\lib\security\cacerts.file" -storepass changeit
This seems to be resolving the issue until I encounter another error for dispatcher (I added another parameter includeDispatcherConfig = y )
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate (default-cli) on project standalone-pom: java.nio.file.FileSystemException: C:\AEM65\projects\mysite\dispatcher\src\conf.d\enabled_vhosts\aem_author.vhost: A required privilege is not held by the client.

To resolve this error, I tried running this maven build project command with administrator privilege. But now, I am getting SSL certificate validation failure error.
I have the correct certificate installed and maven project build is successful if I run the command prompt without admin privilege.
Please, help!
Thanks,
Susila