-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WARNING] The POM for org.apache.jmeter:ApacheJMeter_http:jar:5.6.1 is invalid #6041
Comments
|
Frankly speaking, I agree it might look confusing for a pom to miss |
org.apache.jmeter.samplers.SampleListener is in ApacheJMeter_core not _http? |
Works with this pom
|
@milamberspace , try running
Then, if you patch
Apparently, Maven discards ALL transitive dependency in case it detects a single issue. I think it is something to be fixed in Maven. In this case, only |
I've filed an issue for the Maven team: https://issues.apache.org/jira/browse/MNG-7842 |
I would suggest this still needs a fix. Even if Maven does fix this issue it would require all Maven users to upgrade to the latest version of Maven which can be problematic for many corp environments. For the sake of backwards compatibility I think it would make sense to release a 5.6.2 with the version number specified. You can then deprecate old versions of Maven supported in the future if/when Maven changes the behaviour and start not specifying versions at that point. Personally I would suggest it's good practice to specify versions, overall it makes it clearer. |
This only fixes the problem if JMeter is a direct dependency. If it's a transitive dependency you are still getting error messages saying that the POM is invalid and that transitive dependencies will not be available. |
In my case I am unable to compile my project, getting the error:
Appears to be the same problem as mentioned where Maven discards everything - surely fixing the invalid POM error as suggested is the best way forward? |
I also believe versions should always be specified, otherwise it might lead to inconsistencies (which version is it supposed to take then?). |
The version might be taken from a |
Of course, most people manage them centrally doing so. That being said, the effective pom should include dependency version. |
This seems to be resolved in 5.6.2-rc1: <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.example</groupId>
<artifactId>TestBugMaven</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.apache.jmeter</groupId>
<artifactId>ApacheJMeter_http</artifactId>
<version>5.6.2</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>jmeter-5.6.2-rc1</id>
<url>https://repository.apache.org/content/repositories/orgapachejmeter-1087</url>
</repository>
</repositories>
</project> Please try it. |
That version looks good to me, thanks for the quick turnaround. |
Expected behavior
When trying to depend on Apache JMeter http dependency:
Actual behavior
No response
Steps to reproduce the problem
JMeter Version
5.6.1
Java Version
openjdk version "17.0.7" 2023-04-18
OS Version
Ubuntu 22.04 LTS
The text was updated successfully, but these errors were encountered: