My Maven project has a dependency on a non-Maven library, which is coded as a system dependency:
<dependency>
<groupId>com.example</groupId>
<artifactId>foo</artifactId>
<version>${foo.version}</version>
<scope>system</scope>
<systemPath>${foo.jar}</systemPath>
</dependency>
where the location of the library can be controlled via local properties:
<properties>
<foo.version>2.1.1</foo.version>
<foo.basedir>/usr/local</foo.basedir>
<foo.libdir>${foo.basedir}/lib</foo.libdir>
<foo.jar>${foo.basedir}/java/foo-${foo.version}.jar</foo.jar>
</properties>
Recently, the library switched from version 2.1.1 to version 2.2.0, so I changed the foo.version
property, but Maven seems to be stuck on the old version:
...
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
Missing:
----------
1) com.example:foo:jar:2.1.1
...
I have run mvn dependency:purge-local-repository
(many times, actually). The string 2.1.1
does not appear anywhere in my POM, profiles.xml
, or settings.xml
. Still, every time I try to build my project, Maven fails with the above error.
What's going on here? Where is Maven storing the dependency version information and how can I update it?