In my pom, I added exec-maven-plugin to call the java class that will generate the file. This class requires that some parameters be passed to the main method, one of which is the location of the input file (outside the project). So far, I have used the relative path for this, which works fine:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>com.laco.projectmaster.util.LanguageGenerator</mainClass>
<arguments>
<argument>../PM-Config/dev/PMLanguage.xls</argument>
<argument>PM4.0</argument>
<argument>${project.build.outputDirectory}/com/laco/projectmaster/props/resources</argument>
<argument>ProjectMaster</argument>
<argument>Created during maven build (POM Version: ${pom.version})</argument>
</arguments>
</configuration>
</plugin>
Now I'm starting to use hudson to install / pack and deploy wars, and I can no longer use this relative path. I just thought I was just passing the location of the input file when calling maven as:
mvn net package -Dlangdir = C: / somedir
and then change the pom as:
<argument>${langdir}/PMLanguage.xls</argument>
. , , null/PMLanguage.xls. maven, antrun. .
, maven, , , pom?
,