adobe / aem-spa-project-archetype

Maven Archetype for creating new AEM SPA projects
Apache License 2.0
61 stars 32 forks source link

mvn test fails for newly generated project #88

Closed yakulto closed 4 years ago

yakulto commented 5 years ago

Bug Report

Current Behavior Generated a new project using archetype 1.1.0, running mvn test will fail on the analyze-classes goal:

[ERROR] Failed to execute goal org.apache.jackrabbit:filevault-package-maven-plugin:1.0.1:analyze-classes (default-analyze-classes) on project care.all: Error while analysing imports: C:\src\aem-spa-sample\two\care\core\target\classes (Access is denied) -> [Help 1]

This is actually related to this issue: https://github.com/adobe/aem-project-archetype/issues/161 which is fixed by bumping the filevault-package-maven-plugin to 1.0.3. (would need to be fixed in this archetype I guess)

After updating the version to 1.0.3 the generate-metadata step will now fail. Not sure if this is plugin related or something needs to be set in the configuration for the all module.

[ERROR] Failed to execute goal org.apache.jackrabbit:filevault-package-maven-plugin:1.0.3:generate-metadata (default-generate-metadata) on project care.all: Could not open subpackage 'C:\src\aem-spa-sample\two\care\ui.apps\target\classes' to extract metadata: C:\src\aem-spa-sample\two\care\ui.apps\target\classes (Access is denied) -> [Help 1]

Decided to open here (my first bug report in GitHub anywhere) since the version needs to be updated in this archetype project as well.

Expected behavior/code Executing mvn test will succeed

Environment

Possible Solution Bump version of filevault-package-maven-plugin to 1.0.3 (fixes one part of the problem)

pfauchere commented 5 years ago

Hi,

I currently cannot reproduce the issue. I can currently trigger a mvn clean test command line both with the archetype and with the generated project without errors.

On [0] I read when building without installing the artifacts and I am wondering if I executed the install step beforehand or not... Could you please give us more detail?

I am using:

[0] https://issues.apache.org/jira/browse/JCRVLT-272

yakulto commented 5 years ago

So I tried with another fresh generated project using the following command: mvn archetype:generate -B -DarchetypeCatalog=local -DarchetypeGroupId=com.adobe.cq.spa.archetypes -DarchetypeArtifactId=aem-spa-project-archetype -DarchetypeVersion=1.1.0 -Dpackage=com.yakulto -DgroupId=com.yakulto -DartifactId=yakulto -Dversion=1.0.0-SNAPSHOT -DprojectTitle="yakulto" -DprojectName=yakulto -DcomponentGroup=yakultoGroup -DoptionFrontend=react

Commands I executed in order:

  1. mvn clean install - success
  2. mvn clean test - fail

[ERROR] Failed to execute goal org.apache.jackrabbit:filevault-package-maven-plugin:1.0.1:analyze-classes (default-analyze-classes) on project yakulto.all: Error while analysing imports: C:\src\issue88\yakulto\core\target\classes (Access is denied) -> [Help 1]

  1. edited pom.xml bumped plugin to 1.0.3
  2. mvn clean install - success
  3. mvn test - fail

[ERROR] Failed to execute goal org.apache.jackrabbit:filevault-package-maven-plugin:1.0.3:generate-metadata (default-generate-metadata) on project yakulto.all: Could not open subpackage 'C:\src\issue88\yakulto\ui.apps\target\classes' to extract metadata: C:\src\issue88\yakulto\ui.apps\target\classes (Access is denied) -> [Help 1]

  1. mvn clean test - fail

[ERROR] Failed to execute goal org.apache.jackrabbit:filevault-package-maven-plugin:1.0.3:generate-metadata (default-generate-metadata) on project yakulto.all: Could not open subpackage 'C:\src\issue88\yakulto\ui.apps\target\classes' to extract metadata: C:\src\issue88\yakulto\ui.apps\target\classes (Access is denied) -> [Help 1]

I can send log files if you guys need them

samuelmeuli commented 4 years ago

I've encountered issues with this plugin as well. #112 updates it to the latest version.

samuelmeuli commented 4 years ago

@yakulto I cannot reproduce this issue, would you mind testing if it still occurs with filevault-package-maven-plugin v1.0.4?

samuelmeuli commented 4 years ago

We're gonna go ahead and merge #112 as it should fix your first issue (in analyze-classes) and we cannot reproduce the second one (in generate-metadata). Please let us know if you're still encountering issues with the new version :)