Context: I am trying to build a web.xml during compilation. I Use ant scripts to perform this task. The ant script uses properties defined in a properties file to complete this task.
The ant script is called using Maven-ant-plugin.
However, when I do a maven build. it fails with message "An Ant BuildException Could not load definitions from resource project.properties. It could not be found."
the Ant script looks like below:
<project name="xyz" basedir="." default="make_webxml">
<target name="make_webxml">
<taskdef resource="project.properties"/>
<echo file="${webappdir}/web.xml">
<>
<>
</target>
</project>
${webappdir} is the defined in properties file
MAVEN POM:
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>process-resources</phase>
<configuration>
<target>
<ant dir="build/ant/" />
</target>
<tasks>
<ant antfile="build/ant/bld_webxml.xml" target="make_webxml"/>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
Am I doing something wrong?
Thanks in advance