I'm having a question related to the maven properties plugin. My question is somewhat related to How to read an external properties file in Maven
Following that article's advice, I have managed to get it to do most of what I want it to do. My config looks like this :
<dependency>
<groupId>org.kuali.maven.plugins</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0.8</version>
</dependency>
...
<plugin>
<groupId>org.kuali.maven.plugins</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0.8</version>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>${basedir}/${environment}.properties</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
Now, the problem that I have is as follows : I have configured a simple repository to store stuff in, like this :
<distributionManagement>
<repository>
<id>localRep</id>
<url>file:${localRepositoryLocation}</url>
</repository>
</distributionManagement>
When running mvn deploy
, the ${localRepositoryLocation} does NOT get replaced.
[INFO] --- maven-deploy-plugin:2.5:deploy (default-deploy) @ SomeApp ---
Uploading: file:${localRepositoryLocation}/SomeApp/SomeApp/1.0.0/SomeApp-1.0.0.war
Uploaded: file:${localRepositoryLocation}/SomeApp/SomeApp/1.0.0/SomeApp-1.0.0.war (5754 KB at 18322.3 KB/sec)
Uploading: file:${localRepositoryLocation}/SomeApp/SomeApp/1.0.0/SomeApp-1.0.0.pom
Uploaded: file:${localRepositoryLocation}/SomeApp/SomeApp/1.0.0/SomeApp-1.0.0.pom (7 KB at 2051.1 KB/sec)
Also, I should note that I also used that plugin in the mojo version, and it yields the exact same behavior. So if the same plugin from two different providers have the same results, there must be something I'm doing wrong here.
Is anybody able to help ?
Kind regards, Andrei