adobe / adobe/aem-project-archetype
Forms tests fail with "cannot find symbol"
- Dominant language
- JavaScript
- Stars
- 596
- Forks
- 431
- Avg merge
- 10d 6h
- Merged PRs (30d)
- 1
Description
On the current `HEAD` of `develop` [7cceeaf](https://github.com/adobe/aem-project-archetype/commit/7cceeaff02148e74b2f6756ebe795da9e89032fa) this behaviour is observed, however on the release `42` it is working correctly.
### Expected Behaviour
`mvn -B clean integration-test` finishes with no failures.
### Actual Behaviour
Fails with
```
[INFO] [INFO] --- compiler:3.8.1:testCompile (default-testCompile) @ testing-basicforms650.core ---
[INFO] [INFO] Changes detected - recompiling the module!
[INFO] [INFO] Compiling 6 source files to /Users/ramirezc/projects/aem-project-archetype/target/test-classes/projects/forms-basic-6.5.0/project/testing-basicforms650/core/target/test-classes
[INFO] [INFO] -------------------------------------------------------------
[INFO] [ERROR] COMPILATION ERROR :
[INFO] [INFO] -------------------------------------------------------------
[INFO] [ERROR] /Users/alexrrr/projects/aem-project-archetype/target/test-classes/projects/forms-basic-6.5.0/project/testing-basicforms650/core/src/test/java/it/pkg/core/servlets/SimpleServletTest.java:[39,16] cannot find symbol
[INFO] symbol: method build()
[INFO] location: variable context of type io.wcm.testing.mock.aem.junit5.AemContext
[INFO] [INFO] 1 error
```
```
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.2.1:integration-test (default-integration-test) on project aem-project-archetype:
[ERROR] Archetype IT 'forms-basic-6.5.0' failed: Execution failure: exit code = 1
```
### Reproduce Scenario (including but not limited to)
#### Steps to Reproduce
#### Platform and Version
```
# mac OS
$ sw_vers
ProductName: macOS
ProductVersion: 13.3.1
ProductVersionExtra: (a)
BuildVersion: 22E772610a
$ java -version
openjdk 11.0.19 2023-04-18
OpenJDK Runtime Environment Temurin-11.0.19+7 (build 11.0.19+7)
OpenJDK 64-Bit Server VM Temurin-11.0.19+7 (build 11.0.19+7, mixed mode)
$ mvn -version
Apache Maven 3.9.3 (21122926829f1ead511c958d89bd2f672198ae9f)
Maven home: /usr/local/Cellar/maven/3.9.3/libexec
Java version: 11.0.19, vendor: Eclipse Adoptium, runtime: /Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home
Default locale: en_CH, platform encoding: UTF-8
OS name: "mac os x", version: "13.3.1", arch: "x86_64", family: "mac"
$ python -V
Python 3.9.16
```
apparently @barshat7 and @ujjwal5 have observed this behaviour in the past
Contributor guide
Research direction
Run `mvn -B clean integration-test` on the current `develop` revision and inspect the generated forms-basic-6.5.0 project, especially `SimpleServletTest.java`, where `AemContext.build()` fails to compile. Compare the generated test setup with release 42; done means the integration test completes without failures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100