Skip to content

Fixes #12#13

Open
Riduidel wants to merge 3 commits intoandirady:mainfrom
Riduidel:feat/12_update_parent_pom
Open

Fixes #12#13
Riduidel wants to merge 3 commits intoandirady:mainfrom
Riduidel:feat/12_update_parent_pom

Conversation

@Riduidel
Copy link

@Riduidel Riduidel commented Aug 9, 2024

Simple implementation. I only think the standalone flag may not be correctly handled.
However, all the tests are good, so I guess it's good.

@Riduidel
Copy link
Author

I've tested it extensively, and it now seems to perfectly work.

Copy link
Owner

@andirady andirady left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR. I added some comments, please have a look.

}

var pomWriter = new DefaultModelWriter();
if(addModule) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should use spaces for indentation, and add space after if. 😅

var pomWriter = new DefaultModelWriter();
if(addModule) {
if(standalone) {
LOG.info(() ->
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we need to be verbose. Maybe lower the log lever to fine?

if(!parentPomRelativePath.endsWith(".xml")) {
parentPomRelativePath += "/pom.xml";
}
LOG.info(
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use fine instead of info.

File canonicalPomParentFile = canonicalPomFile.getParentFile();
Path canonicalPomParentPath = canonicalPomParentFile.toPath();
Path parentPomPath = canonicalPomParentPath.resolve(parentPomRelativePath).normalize();
LOG.info(
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably should use spec.commandLine().getOut()

@andirady andirady added the enhancement New feature or request label Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants