When using system
scope you have to provide an absolute path to the dependency (as opposed to any other dependencies, which are searched in Maven repositories). See System Dependencies in Introduction to the Dependency Mechanism.
Example:
<dependency>
<groupId>javax.sql</groupId>
<artifactId>jdbc-stdext</artifactId>
<version>2.0</version>
<scope>system</scope>
<systemPath>${java.home}/lib/rt.jar</systemPath>
</dependency>
Why don't you just install your third-party artifact in your local/company repository?
EDIT: If you have systemPath
defined but suspect that environment variable is not resolved, you will get the following error (note the presence of variable in the path):
The project ... has 1 error
'dependencies.dependency.systemPath' for weblogic:webservices:jar must specify an absolute path but is ${env.BEA_HOME}/lib/xyz.jar @ line ...
But if Maven discovers the variable and resolves it properly, the error message quoted above will contain already resolved directory (not a placeholder). Tested on Ubuntu/Maven 3.