gnodet-bot commented on PR #13921:
URL: https://github.com/apache/maven/pull/13921#issuecomment-6742657155
<!-- hermes-review-bot -->
**IT test compilation failures on `maven-4.0.x`** — the production-code
changes are correct, but `MavenITgh13761ConsumerPomProfilePropertiesTest` was
ported verbatim from master and uses three API calls that do not exist on
`maven-4.0.x`.
---
**Three compilation errors:**
**1. `extractResources` returns `File`, not `Path`** (lines 248, 268)
On `maven-4.0.x`:
```java
protected File extractResources(String resourceName)
```
The test assigns to `Path basedir` → type mismatch.
**2. `newVerifier` accepts `String`, not `Path`** (lines 250, 270)
On `maven-4.0.x`:
```java
protected Verifier newVerifier(String basedir)
```
The test passes `Path basedir` directly → type mismatch.
**3. `getArtifactPath` returns `String`, not `Path`** (lines 255, 276)
On `maven-4.0.x`:
```java
public String getArtifactPath(String groupId, ...)
```
Result is passed to `read(Path pomFile)` → type mismatch.
---
**Required adaptations:**
```java
// 1 & 2: use File + getAbsolutePath()
File testDir = extractResources("gh-13761-consumer-pom-profile-properties");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
// 3: wrap with Paths.get()
Model consumerPom = read(Paths.get(verifier.getArtifactPath(GROUP_ID,
"profile-properties", "1.0", "pom")));
```
Also add the explicit constructor with an appropriate version gate:
```java
MavenITgh13761ConsumerPomProfilePropertiesTest() {
super("(4.0.0-rc-6,)");
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]