Get an absolute path in a resource generated by a Maven archetype

Viewed 274

I am trying to get the absolute path of a resource generate by an archetype.

https://github.com/DigitalPebble/storm-crawler/blob/master/external/elasticsearch/archetype/src/main/resources/archetype-resources/es-crawler.flux#L25

I tried to replace the line above with

  • "${project.basedir}"
  • "${project.build.directory}"
  • "${basedir}"
  • "${outputDirectoryFile}"
  • "${outputDirectoryFile}/${artifactId}"
  • "${basedir}/${artifactId}"

but none of these worked. The furthest I got was to get the /${artifactId} part right.

The file is listed as filtered in archetype-metadata.xml

Is there a variable I can use to get the absolute path of the directory generated?

1 Answers
Related