You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Andreas Kuhtz <an...@gmail.com> on 2024/12/21 19:47:19 UTC

maven 4.0.0-rc-2 and repository location with file url

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

Re: maven 4.0.0-rc-2 and repository location with file url

Posted by Andreas Kuhtz <an...@gmail.com>.
Done: https://issues.apache.org/jira/browse/MNG-8465
Thank you.

Cheers,
Andreas

Am So., 22. Dez. 2024 um 09:27 Uhr schrieb Guillaume Nodet <
gnodet@apache.org>:

> 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 <an...@gmail.com> 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 <
> > gnodet@apache.org>:
> >
> > > 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 <ta...@cservenak.net> 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 <
> andreas.kuhtz@gmail.com
> > >
> > > 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: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > >
> > >
> > > --
> > > ------------------------
> > > Guillaume Nodet
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
>

Re: maven 4.0.0-rc-2 and repository location with file url

Posted by Guillaume Nodet <gn...@apache.org>.
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 <an...@gmail.com> 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 <
> gnodet@apache.org>:
>
> > 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 <ta...@cservenak.net> 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 <andreas.kuhtz@gmail.com
> >
> > 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: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> >
> >
> > --
> > ------------------------
> > Guillaume Nodet
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>

Re: maven 4.0.0-rc-2 and repository location with file url

Posted by Andreas Kuhtz <an...@gmail.com>.
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 <
gnodet@apache.org>:

> 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 <ta...@cservenak.net> 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 <an...@gmail.com>
> 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: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
>
>
> --
> ------------------------
> Guillaume Nodet
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: maven 4.0.0-rc-2 and repository location with file url

Posted by Guillaume Nodet <gn...@apache.org>.
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 <ta...@cservenak.net> 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 <an...@gmail.com> 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>


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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: maven 4.0.0-rc-2 and repository location with file url

Posted by Matthias Bünger <ru...@web.de.INVALID>.
Hi Andreas,

you could put it literally everywehre (e.g. the .mvn folder) and
reference it via "-s" parameter to be used. So you could put it into the
projects repo.

Greetings

Matthias

Am 22.12.2024 um 08:43 schrieb Andreas Kuhtz:
> Hello,
> Yes, settings.xml is an option but then I have to let every developer add
> this repo to settings.xml that is used for this project only.
> Can you give me a pointer where to find information about "project wide
> settings"?
>
> Cheers,
> Andreas
>
> Am Sa., 21. Dez. 2024 um 23:02 Uhr schrieb Tamás Cservenák <
> tamas@cservenak.net>:
>
>> 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 <an...@gmail.com>
>> 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: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: maven 4.0.0-rc-2 and repository location with file url

Posted by Andreas Kuhtz <an...@gmail.com>.
Hello,
Yes, settings.xml is an option but then I have to let every developer add
this repo to settings.xml that is used for this project only.
Can you give me a pointer where to find information about "project wide
settings"?

Cheers,
Andreas

Am Sa., 21. Dez. 2024 um 23:02 Uhr schrieb Tamás Cservenák <
tamas@cservenak.net>:

> 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 <an...@gmail.com>
> 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: maven 4.0.0-rc-2 and repository location with file url

Posted by Tamás Cservenák <ta...@cservenak.net>.
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 <an...@gmail.com> 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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org