Could you raise a issue, we should also support ${project.rootDirectory} I
think.

------------------------
Guillaume Nodet



Le dim. 22 déc. 2024 à 08:37, Andreas Kuhtz <[email protected]> a
écrit :

> Hello,
>
> The ${project.basedir} is accepted but I think this only works in single
> module projects.
> I have a parent pom and multiple modules and if I use ${project.basedir}
> the resolution is always from the current module and it will fail to
> "download" the dependencies from the file url.
> It works when the artefacts are  in the local maven repo but fails to
> "download" the dependencies from the file url. That's why
> ${maven.multiModuleProjectDirectory} was used with maven 3.9.x.
>
> Cheers,
> Andreas
>
>
> Am Sa., 21. Dez. 2024 um 23:32 Uhr schrieb Guillaume Nodet <
> [email protected]>:
>
> > Also note that there is one exception to this rule, ${project.basedir}
> > can be used in the repository url.
> >
> > Le sam. 21 déc. 2024 à 23:02, Tamás Cservenák <[email protected]> a
> > écrit :
> > >
> > > Howdy,
> > >
> > > yes, POM must contain "non-dynamic" URL, this is due build
> > reproducibility.
> > > You can add a repository via settings.xml, and now you can have
> > > "project wide settings" as well.
> > >
> > > Thanks
> > > T
> > >
> > > On Sat, Dec 21, 2024 at 8:48 PM Andreas Kuhtz <[email protected]
> >
> > wrote:
> > > >
> > > > Hello,
> > > >
> > > > With maven 3.9.x it was possible to configure to configure an
> > additional
> > > > repository for artefacts not available in central repo or artefacts
> > that
> > > > are not allowed to be published to central repo with the following
> > file url:
> > > >
> > > > <repositories>
> > > > ...
> > > >         <!--
> > > >         Repository hosting libraries not available through maven.org
> > > >         -->
> > > >         <repository>
> > > >             <id>lib</id>
> > > >             <name>lib</name>
> > > >             <releases>
> > > >                 <enabled>true</enabled>
> > > >                 <checksumPolicy>ignore</checksumPolicy>
> > > >             </releases>
> > > >             <snapshots>
> > > >                 <enabled>true</enabled>
> > > >             </snapshots>
> > > >
> > > > <url>file://${maven.multiModuleProjectDirectory}/maven-repo</url>
> > > >         </repository>
> > > > ...
> > > > </repositories>
> > > >
> > > > With 4.0.0-rc-2 this is no longer possible and the build fails with
> the
> > > > following error:
> > > >
> > > > [INFO]
> > > > [INFO] Some problems were encountered while building the effective
> > settings
> > > > (use -X to see details)
> > > > [INFO]
> > > > [INFO] Scanning for projects...
> > > > [ERROR] Some problems were encountered while processing the POMs
> > > > [ERROR] The build could not read 1 project -> [Help 1]
> > > > [ERROR]
> > > > [ERROR]   The project [inherited]:wizard:pom:[inherited]
> > > > (D:\gitlab\bidibwizard2-distributed\pom.xml) has 2 errors
> > > > [ERROR]     'repositories.repository.[lib].url' contains an
> expression
> > but
> > > > should be a constant. @
> > org.bidib.jbidib:bidibwizard-parent:${revision},
> > > >
> file:///D:/gitlab/bidibwizard2-distributed/bidibwizard-parent/pom.xml,
> > line
> > > > 68, column 13
> > > > [ERROR]     'repositories.repository.[lib].url' contains an
> expression
> > but
> > > > should be a constant. @
> > org.bidib.jbidib:bidibwizard-parent:${revision},
> > > >
> file:///D:/gitlab/bidibwizard2-distributed/bidibwizard-parent/pom.xml,
> > line
> > > > 68, column 13
> > > > [ERROR]
> > > >
> > > > How can this be solved?
> > > >
> > > > Cheers,
> > > > Andreas
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [email protected]
> > > For additional commands, e-mail: [email protected]
> > >
> >
> >
> > --
> > ------------------------
> > Guillaume Nodet
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
> >
>

Reply via email to