Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven deploy to relative directory path

Tags:

maven

I can deploy to an absolute directory:

<distributionManagement>
    <repository>
        <id>absolute directory</id>
        <url>file:///home/tukushan/workspace/omcutil/repo</url>
    </repository>
</distributionManagement>

But how do I deploy to a directory relative to my project's directory?

like image 414
tekumara Avatar asked Sep 23 '12 04:09

tekumara


1 Answers

A relative directory can be specified when using the -DaltDeploymentRepository parameter, e.g.:

mvn deploy -DaltDeploymentRepository=snapshot-repo::default::file:../../my-local-snapshots-dir

The file URL is relative to the directory in which mvn is run.

See here for more info on the altDeploymentRepository parameter.

like image 92
tekumara Avatar answered Oct 15 '22 06:10

tekumara