Maven supports any Java System property as part of the default properties , so you can use the following property:
java.io.tmpdir Default temporary file path
As an example:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
<executions>
<execution>
<id>unpack</id>
<phase>package</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<outputDirectory>${java.io.tmpdir}/libs</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
Pay attention to the element outputDirectoryand its meaning.
, target Maven , .
Linux Windows?
, Java, , .