1

Getting below warning while build.

I am using in pom.xml

<systemPath>${project.basedir}/lib/....jar</systemPath>

[WARNING] 'dependencies.dependency.systemPath' for ...:jar should not point at files within the project directory, ${project.basedir}/lib/....jar will be unresolvable by dependent projects @ line 25, column 30

Its resolved now by using <systemPath>${pom.basedir}/lib/....jar in pom.xml

Anyone please explain, What is difference between ${pom.basedir} vs ${project.basedir} in pom.xml?

Jens
  • 67,715
  • 15
  • 98
  • 113
Rajalingam
  • 21
  • 3
  • 1
    Do not use systemPath at all... Use a repository manager ...You should not use any property like `${pom.*} anymore ... – khmarbaise Aug 19 '22 at 10:25
  • @khmarbaise I am planning to use local repository only, But my doubt is how its working without warning by using ${pom.basedir} not in {project.basedir}. – Rajalingam Aug 19 '22 at 10:59
  • Use local repository only? With system path? – Thorbjørn Ravn Andersen Aug 19 '22 at 11:31
  • Local repository only? How to get artifacts into that? – khmarbaise Aug 19 '22 at 11:33
  • @khmarbaise My question is not relevant to repository manager.. My actual question is earlier when I am using System path as ${project.basedir} I got warning message (Please refer above),. but I didn't see any warning after using System path as ${pom.basedir}.. So What is different here project.basedir vs pom.basedir? – Rajalingam Aug 19 '22 at 11:50
  • It is relevatn related to repository manager because if you would use one you don't have to use systemPath... – khmarbaise Aug 19 '22 at 13:10
  • @khmarbaise You understood wrongly, My question is before implementing repository manager. – Rajalingam Aug 19 '22 at 14:19
  • 1. `pom.basedir` is deprecated and should not be used anymore. 2. Systempath should be avoided if at all possible. – J Fabian Meier Aug 19 '22 at 14:46

1 Answers1

2

${basedir}, ${project.basedir} and ${pom.basedir} are synonyms (you may also check that using something like mvn help:evaluate -Dexpression=pom.basedir), your Q just reveals that person who was fixing MNG-4953 didn't know about that.

Andrey B. Panfilov
  • 4,324
  • 2
  • 12
  • 18