kwin commented on code in PR #169:
URL: https://github.com/apache/felix-dev/pull/169#discussion_r925486018
##########
tools/maven-bundle-plugin/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java:
##########
@@ -428,15 +428,27 @@ private boolean isMetadataUpToDate(File outputFile,
MavenProject project)
// generated last?
Path cacheData = getIncrementalDataPath(project);
if(!Files.isRegularFile(cacheData)) {
+ getLog().debug("No cache data file found at '" + cacheData +
"', generating manifest.");
return false;
}
long manifestLastModified = lastModified(cacheData);
while (project != null)
{
- Path pom = project.getFile().toPath();
- if (manifestLastModified < lastModified(pom))
- {
- return false;
+ if (project.getFile() != null) {
+ Path pom = project.getFile().toPath();
+ if (manifestLastModified < lastModified(pom))
+ {
+ getLog().debug("File at '" + pom + "' newer than
cache data file, generating manifest.");
+ return false;
+ }
+ } else {
+ if (project.getVersion().endsWith("-SNAPSHOT")) { // is it
mutable?
+ getLog().debug("pom.xml file not found for SNAPSHOT
project'" + project + "', assume modification.");
+ return false;
+ } else {
+ getLog().debug("pom.xml file not found for
non-SNAPSHOT project'" + project + "', assume no modification.");
+ break;
Review Comment:
If it is a release version all its parents must be non-SNAPSHOTS as well. A
change would require a version change which would propagate down to all
ancestor poms
--
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]