Skip to content
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

Error: Missing relative path in pom file preventing parent download #261

Open
gounthar opened this issue Sep 12, 2024 · 4 comments
Open
Labels
bug For changelog: Minor bug. Will be listed after features

Comments

@gounthar
Copy link
Collaborator

Jenkins and plugins versions report

java -jar plugin-modernizer-cli/target/jenkins-plugin-modernizer-999999-SNAPSHOT.jar --dry-run --plugins badge,build-timestamp --recipes AddPluginsBom,AddCodeOwner --export-datatables
Picked up JAVA_TOOL_OPTIONS: -XX:+UseContainerSupport -XX:ActiveProcessorCount=1
Starting Plugin Modernizer 
Picked up JAVA_TOOL_OPTIONS: -XX:+UseContainerSupport -XX:ActiveProcessorCount=1
Skipping forking plugin badge in dry-run mode 
Skipping sync plugin badge in dry-run mode 
Fetching plugin code locally badge... 
Thread[JGit-FileStoreAttributeReader-1,5,main]: got smaller file timestamp on / (/.workspace/mark), /home/gitpod/.cache/jenkins-plugin-modernizer-cli/badge/sources/.git: 2024-09-12T15:00:39Z < 2024-09-12T15:00:39.795861241Z. Aborting measurement at resolution PT0.204138759S. 
Missing relative path in pom file preventing parent download 
Skipping plugin badge due to metadata/precondition errors. Check logs for more details. 
Skipping forking plugin build-timestamp in dry-run mode 
Skipping sync plugin build-timestamp in dry-run mode 
Fetching plugin code locally build-timestamp... 
Missing relative path in pom file preventing parent download 
Skipping plugin build-timestamp due to metadata/precondition errors. Check logs for more details. 
************* 
Plugin: badge 
Error: Missing relative path in pom file preventing parent download 
************* 
************* 
Plugin: build-timestamp 
Error: Missing relative path in pom file preventing parent download 
************* 
Plugin Modernizer finished. 

What Operating System are you using (both controller, and any agents involved in the problem)?

GitPod

Reproduction steps

java -jar plugin-modernizer-cli/target/jenkins-plugin-modernizer-999999-SNAPSHOT.jar --dry-run --plugins badge,build-timestamp --recipes AddPluginsBom,AddCodeOwner --export-datatables
Picked up JAVA_TOOL_OPTIONS: -XX:+UseContainerSupport -XX:ActiveProcessorCount=1
Starting Plugin Modernizer 
Picked up JAVA_TOOL_OPTIONS: -XX:+UseContainerSupport -XX:ActiveProcessorCount=1
Skipping forking plugin badge in dry-run mode 
Skipping sync plugin badge in dry-run mode 
Fetching plugin code locally badge... 
Thread[JGit-FileStoreAttributeReader-1,5,main]: got smaller file timestamp on / (/.workspace/mark), /home/gitpod/.cache/jenkins-plugin-modernizer-cli/badge/sources/.git: 2024-09-12T15:00:39Z < 2024-09-12T15:00:39.795861241Z. Aborting measurement at resolution PT0.204138759S. 
Missing relative path in pom file preventing parent download 
Skipping plugin badge due to metadata/precondition errors. Check logs for more details. 
Skipping forking plugin build-timestamp in dry-run mode 
Skipping sync plugin build-timestamp in dry-run mode 
Fetching plugin code locally build-timestamp... 
Missing relative path in pom file preventing parent download 
Skipping plugin build-timestamp due to metadata/precondition errors. Check logs for more details. 
************* 
Plugin: badge 
Error: Missing relative path in pom file preventing parent download 
************* 
************* 
Plugin: build-timestamp 
Error: Missing relative path in pom file preventing parent download 
************* 
Plugin Modernizer finished. 

Expected Results

logs

Actual Results

error

Anything else?

No response

Are you interested in contributing a fix?

No response

@gounthar gounthar added the bug For changelog: Minor bug. Will be listed after features label Sep 12, 2024
@jonesbusy
Copy link
Collaborator

More a missing feature than a bug

Error: Missing relative path in pom file preventing parent download 

Looks correct according to https://github.com/jenkinsci/badge-plugin/blob/master/pom.xml#L7

I think it work if by chanche you have already the parent pom on your local cache. Which is probably not the case on gitpod

Solution would be to statically extract the parent version and install it via maven invoker

mvn dependency:get -Dartifact=org.jenkins-ci.plugins:plugin:4.87:pom -DremoteRepositories=https://repo.jenkins-ci.org/public/ -Dtransitive=false

Then we can apply the recipe to include the relative path

@gounthar
Copy link
Collaborator Author

Thanks, I will have a look.👍

@gounthar
Copy link
Collaborator Author

The proposed workaround does not work for me. 🤷

Fetching plugin code locally build-timestamp... 
Missing relative path in pom file preventing parent download 
Skipping plugin build-timestamp due to metadata/precondition errors. Check logs for more details. 
************* 
Plugin: badge 
Error: Missing relative path in pom file preventing parent download 
************* 
************* 
Plugin: build-timestamp 
Error: Missing relative path in pom file preventing parent download 
************* 
Plugin Modernizer finished. 

@gounthar
Copy link
Collaborator Author

gounthar commented Oct 4, 2024

It's still the case today. 🤔

@gounthar gounthar changed the title Proposed command fails Error: Missing relative path in pom file preventing parent download Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug For changelog: Minor bug. Will be listed after features
Projects
None yet
Development

No branches or pull requests

2 participants