-
Notifications
You must be signed in to change notification settings - Fork 90
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
Integrate dev mode with the Boost plugin #530
Conversation
liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/DevMojo.java
Outdated
Show resolved
Hide resolved
499c759
to
e214c56
Compare
File pomFile = new File(project.getFile().getAbsolutePath()); | ||
ProjectBuildingResult build = mavenProjectBuilder.build(pomFile, | ||
session.getProjectBuildingRequest().setResolveDependencies(true)); | ||
boostProject = build.getProject(); |
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.
So how/why this is different from the non-Boost path using DevMojo.loadProject(File)
to reload the POM? Is it mainly because we're trying to fluff up objects needed by the mojo executor? Some other reason?
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.
Right - we are passing an actual maven project object to Boost via the mojo executor, so we need that project to have all of its dependency information resolved (i.e. versions when boms are being used). DevMojo.loadProject(File) does not do that, which is ok for that path because it uses an artifact resolver later on to resolve each individual dependency. For our case, we need to use the MavenProjectBuilder which builds a new maven project object with dependency versions correctly resolved.
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.
Looks good.
One thing that stands out to me is that we are using the presence of the Boost plugin in the MavenProject in order to decide whether or not we should run the boost mojos. Does this still work if we are invoking Boost dev mode directly from the command line without defining it in the pom? |
Not sure what you mean by "invoking Boost dev mode directly"... we don't have a 'dev' goal in Boost, only in LMP. |
Appveyor is failing with several compilation errors which seem unrelated to this change. Are these known issues? |
e214c56
to
61ad497
Compare
Haven't looked at past builds but I see:
which, with the fact that it's running on Windows, seems suspiciously like an environmental issue. |
I rebased and the compilation failures are resolved now, but there is one failing test only on OL 19.0.0.3. I don't see this failure locally. Might just be a fluke, but am looking into it. |
A boost user will be able to directly call Liberty dev mode via:
mvn io.openliberty.tools:liberty-maven-plugin:3.1.M1-SNAPSHOT:dev
(for example)If the Boost plugin is defined in the pom, Liberty dev mode will call
boost:package
when changes to the pom are made.