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

Reply via email to