-
-
Notifications
You must be signed in to change notification settings - Fork 165
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
Fixed & refactored loading pom.properties #727
Fixed & refactored loading pom.properties #727
Conversation
Signed-off-by: Nikemare <102925451+Nikemare@users.noreply.github.com>
@Nikemare Thank you so much for the prompt fix! https://repo1.maven.org/maven2/org/apache/maven/maven-core/3.9.2/maven-core-3.9.2.jar |
Signed-off-by: Nikemare <102925451+Nikemare@users.noreply.github.com>
@prabhu Thanks for the link. Updated the repotest for standalone-jar-files. |
} | ||
} | ||
} | ||
const pomProperties = getPomPropertiesFromMavenDir(mavenDir); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since pomProperties can be an empty object, do we need a condition to skip?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies, it might be right below this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it is an empty object (e.g. wsdl4j-1.6.3.jar) group, name and version will be undefined, but this case is handled later.
const pomPropertiesString = readFileSync(pomPropertiesFile, { | ||
encoding: "utf-8" | ||
}); | ||
pomProperties = parsePomProperties(pomPropertiesString); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need a break or return here since this is inside a loop?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately a return/break does not work with forEach
. But usually the jar should anyway contain one directory on each level inside the META-INF/maven directory. And as I learned optionally the extension.xml
. Therefore I thought we can keep the implementation that way, because there will be no performance loss.
repotest for standalone jar files takes still 2 seconds:
|
@prabhu fixed & refactored loading pom.properties. If you can provide the link to the jar file which included 'META-INF/maven/extension.xml' I can add it to the test as well.