Problems building the project created by the aem-project-archetype-aem-project-archetype-27 | Community
Skip to main content
Level 2
May 19, 2021 5:38 PM UTC
Solved

Problems building the project created by the aem-project-archetype-aem-project-archetype-27

I have downloaded the aem-project-archetype-aem-project-archetype-27 package, completed the mvn clean install process. Then I created the new project using the batch method described in the README.md file. Now I change to the generated folder and run mvn clean install to build that sub project and I receive the following error:

[ERROR] Failed to execute goal org.codehaus.gmaven:groovy-maven-plugin:2.1.1:execute (archetype-pre-package-transformation) on project apple: Execution archetype-pre-package-transformation of goal org.codehaus.gmaven:groovy-maven-plugin:2.1.1:execute failed: startup failed:
[ERROR] script1.groovy: 1: Unexpected input: '\' @ line 1, column 3.
[ERROR] C:\dev\aem-project-archetype-aem-project-archetype-27\apple/src/main/resources/META-INF/archetype-pre-package.groovy
[ERROR] ^
[ERROR]
[ERROR] 1 error
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

 

I have recreated the project several times with different settings and each time, I encounter this error. I have yet to find a solution by searching the web.

The operating system is Windows 10

 

Thanks in advance for your help.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
FuguSailorAccepted solution
Level 2
May 20, 2021 12:13 AM UTC

I think I have the answer. In the root project pom, there is a <parent> section that refers to the online archetype. I commented out that section and it no longer has the issue with the groovy compiler and now builds fine.

11 replies

kchaurasiya
Level 5
Jun 1, 2021 7:23 AM UTC

I have Created a new AEM Project with Archetype 26 and i faced the below issue and resolve it.

1. Setup Java 11(Recommended)
2. Setup AEM 6.5 Instance. Once AEM is setup then installed the "aem-service-pkg-6.5.4.zip" service package.
3. Create a new Project structure using the below command:
mvn -B archetype:generate -D archetypeGroupId=com.adobe.aem -D archetypeArtifactId=aem-project-archetype -D archetypeVersion=26 -D appTitle="My Project" -D appId="myproject" -D groupId="com.myproject.aem" -D artifactId="myproject-aem-project" -D version="0.0.1-SNAPSHOT" -D aemVersion="6.5.4" -D includeDispatcherConfig=n -D includeExamples=n
Whenever run the above command getting below error while creating a project structure with dispatcher modules.

ERROR : Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.1.2:generate (default-cli) on project standalone-pom: java.nio.file.FileSystemException: Project path(Example: /Myproject/): A required privilege is not held by the client. -> [Help 1]
4. To fix the above error i have not included dispatcher modules by adding "includeDispatcherConfig=n" parameter in command, So remove this from command and run.

5. Project structure got created successfully as per the below.

 

Translate
Level 3
Jun 1, 2021 11:50 PM UTC
I was facing similar issue . Looks like groovy scripts in archetype project is trying to resolve groovy dependencies from maven repo(.m2/repository) and failing as it can not find . Ideally it should be looking in groovy repo. However I did a hack to solve this issue. Downloaded the dependency to Maven repo through command line and I was able to successfully build
Translate
FuguSailorAuthorAccepted solution
Level 2
May 20, 2021 12:13 AM UTC

I think I have the answer. In the root project pom, there is a <parent> section that refers to the online archetype. I commented out that section and it no longer has the issue with the groovy compiler and now builds fine.

Translate
Level 3
Jun 1, 2021 3:50 AM UTC
Can point to the specific line . I am facing the issue too
Translate
VeenaVikraman
New Participant
May 19, 2021 6:01 PM UTC

Hi @fugusailor 

 

   I am assuming you are mentioning about creating a project from scratch. I am not sure how you are doing it with the steps you mentioned. May be if you cross check your steps with https://experienceleague.adobe.com/docs/experience-manager-learn/getting-started-wknd-tutorial-develop/project-archetype/project-setup.html?lang=en#project-structure and see if you are following the steps properly , may be that would help. 

 

Thanks

Veena

Translate
Level 2
May 19, 2021 6:04 PM UTC

This is the command line I used to create the new project:
C:\dev\aem-project-archetype-aem-project-archetype-27\apple>mvn -B archetype:generate -D archetypeGroupId=com.adobe.aem -D archetypeArtifactId=aem-project-archetype -D archetypeVersion=27 -D appTitle="Apple Test" -D appId="apple" -D groupId="com.apple" -D enableDynamicMedia=y -D aemVersion=6.5 -D includeDispatcherConfig=n -D frontendModule=general -D includeErrorHandler=y

Translate