@Michael Osipov <micha...@apache.org> Benjamin sumarrize the point, you can say 'system is for outside" but then how do you handle "inside"? You fake a repo in project/m2 and add a repository? This is the whole point of this questoin and I'm not sure we cover it in the doc properly. Plus the fact the warning is technically wrong for that case so question is what do we do for that regular use case.
Romain Manni-Bucau @rmannibucau <https://twitter.com/rmannibucau> | Blog <https://rmannibucau.metawerx.net/> | Old Blog <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book <https://www.packtpub.com/application-development/java-ee-8-high-performance> Le ven. 24 sept. 2021 à 23:42, Benjamin Marwell <bmarw...@apache.org> a écrit : > Hi Michael! > > Setups like "${project.basedir}/m2/" are a common thing. > > While "system" scope was probably invented to use system > (i.e. jdk-related) jar files, but otoh > it is the only way to pull in artifacts > which are stored next to the project's directory. > > If you don't think "system" scope should be used for this purpose, > a lot of projects will need a new "filesystem" scope. > > Thus, I'd say "+1" to remove the warning if the repo is inside the > project.basedir OR > session.executionRootDirectory OR > maven.multiModuleProjectDirectory. > > - Ben > > > Am Fr., 24. Sept. 2021 um 20:23 Uhr schrieb Michael Osipov > <micha...@apache.org>: > > > > Am 2021-09-24 um 16:42 schrieb Romain Manni-Bucau: > > > Hi all, > > > > > > wonder if there is any reason to see this warning when using a jar in > the > > > project in system scope: > > > > > > > > > [WARNING] > > > [WARNING] Some problems were encountered while building the effective > model > > > for io.yupiik.foo:foo:jar:0.0.1-SNAPSHOT > > > [WARNING] 'dependencies.dependency.systemPath' for foo:bar:jar should > not > > > point at files within the project directory, > > > ${project.basedir}/m2/lib/bar.jar will be unresolvable by dependent > > > projects @ line 71, column 19 > > > [WARNING] > > > [WARNING] It is highly recommended to fix these problems because they > > > threaten the stability of your build. > > > [WARNING] > > > [WARNING] For this reason, future Maven versions might no longer > support > > > building such malformed projects. > > > [WARNING] > > > > > > since the absolute path starts with a "in project" path the build will > be > > > stable, the jar will be resolvable etc so there is no reason for the > > > warnings nor maven to not support it in a future version. > > > > > > Is it just due to fixing the "tools.jar" dependency (where the warning > is > > > relevant) or is there another rational behind that and the warning is > not a > > > bug? > > > If so i'm concerned there is no real alternative until you get a m2 > https > > > server which is not always an option so the last sentence requires us > to > > > work toward a solution (that said it will likely be the same so I'd > prefer > > > to drop the warning if the dpeendency is in the project). > > > > > > I think the purpose of system is to use dependencies *outside* of the > > project! > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > > For additional commands, e-mail: dev-h...@maven.apache.org > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > For additional commands, e-mail: dev-h...@maven.apache.org > >