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

Consider alternative for missing upstream compile output besides purging from local repository #1569

Closed
scottkurz opened this issue Aug 3, 2022 · 2 comments · Fixed by #1570

Comments

@scottkurz
Copy link
Member

The problem identified in #1201 was fixed in
https://github.com/OpenLiberty/ci.maven/pulls/1207.

As noted in the #1561 discussion (here and in the following comments), the #1207 solution has some negatives.

Liberty dev mode doesn't otherwise do anything with installing artifacts to a local repo. It would be natural for a user to think they could decide when to install or not to install artifacts completely independently from running dev mode.

It is a complicated process by which Maven resolves the artifacts in a scenario like the #1201 scenario, but I think I have a prototype which might solve this problem in a better way.

@maroschutte
Copy link

I was looking at your pull request and found some issues with it:

[INFO] --- liberty-maven-plugin:3.6.2-SNAPSHOT:dev (default-cli) @ guide-maven-multimodules-war ---
[INFO] CWWKM2102I: Using artifact based assembly archive : io.openliberty:openliberty-kernel:null:22.0.0.8:zip.
[INFO] CWWKM2102I: Using installDirectory : C:\Ontwikkel\workspaces\overig\guide-maven-multimodules\finish\war\target\liberty\wlp.
[INFO] CWWKM2102I: Using serverName : defaultServer.
[INFO] CWWKM2102I: Using serverDirectory : C:\Ontwikkel\workspaces\overig\guide-maven-multimodules\finish\war\target\liberty\wlp\usr\servers\defaultServer.
[INFO] Running maven-resources-plugin:resources
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Ontwikkel\workspaces\overig\guide-maven-multimodules\finish\war\src\main\resources
[INFO] Running maven-compiler-plugin:compile on C:\Ontwikkel\workspaces\overig\guide-maven-multimodules\finish\war\pom.xml
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to C:\Ontwikkel\workspaces\overig\guide-maven-multimodules\finish\war\target\classes
[WARNING] /C:/Ontwikkel/workspaces/overig/guide-maven-multimodules/finish/war/src/main/java/io/openliberty/guides/multimodules/web/HeightsBean.java:[50,59] package io.openliberty.guides.multimodules.lib does not exist
[WARNING] /C:/Ontwikkel/workspaces/overig/guide-maven-multimodules/finish/war/src/main/java/io/openliberty/guides/multimodules/web/HeightsBean.java:[61,61] package io.openliberty.guides.multimodules.lib does not exist

These are warnings and not errors because the maven compile mojo is called with failOnError explicitly set to false. Why this would be necessary is not clear to me.

All in all I think you've got an interesting alternative here

@scottkurz
Copy link
Member Author

@maroschutte thanks for taking a look. My apologies since I messed up my rebase before pushing (as well as didn't get around to fixing the tests so couldn't rely on that to catch it). I did fix this if you take a look at the latest; it addresses both of those two bullets.

As far as using the warning vs. failing, the dev mode loop is designed to stay active and give you a chance to fix any compile errors rather than crashing, so that's the idea behind that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants