I want to use the maven-dependency-plugin to copy artifacts from all sub-modules of my multi-module project to a directory that is relative to the root directory of the enti
so that: somewhere in properties of some parent Project I've the file which i need to relate later, what's why i need absolute path on it everywhere. So, i get it with help of groovy:
import java.io.File;
String p =project.properties['env-properties-file'];
File f = new File(p);
if (!f.exists())
{
f = new File("../" + p);
if (!f.exists())
{
f = new File("../../" + p);
}
}
// setting path together with file name in variable xyz_format
project.properties['xyz_format'] =f.getAbsolutePath()
+ File.separator
+ "abc_format.xml";
and then:
http://localhost:8081/snapshotshttp://localhost:8081/releasesjdbc:oracle:thin:sonar/sonar@localhost/XEsonar ${xyz_format} <---- here is it!