Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven Generating Archetype getting package variable as directory format

I'm looking to make an archetype and I'm having difficulty making the created pom.xml have the values I need it to.

I have:

<properties>
    <domain-objects-location> ${groupId}/domain </domain-objects-location>
    ...
</properties>

in my pom.xml template, and I get "com.mycompany.app" where groupID is.

However I want "com/mycompany/app" to be there.

Any suggestions on how to get that? Thanks.

UPDATE:

As I linked below, there is a special property for doing just this.

<domain-objects-location>${packageInPathFormat}/domain</domain-objects-location>

is what gives me the desired output I was looking for. I'm not sure why this doesn't show up on https://maven.apache.org/ref/3.0.3/maven-model/maven.html or somewhere else obvious in the documentation. But it does work.

like image 717
mawalker Avatar asked Jul 19 '26 14:07

mawalker


1 Answers

So I think I messed up the order of replying to show this answered...

But, http://geekofficedog.blogspot.com/2013/08/creating-maven-archetypes-tutorial.html shows

${packageInPathFormat}

As the property value I was looking for to get the 'package in path format'. And it works.

like image 168
mawalker Avatar answered Jul 22 '26 02:07

mawalker