How to rename a directory with the artifactId when using a Maven archetype?
Asked Answered
F

2

11

How can I rename a directory in a custom Maven archetype to be the contents of ${artifactId}?

I have a directory named service/App1 that I want to customize to be service/${artifactId}.

This directory is full of a bunch of files and other directories so I can't just create it with the ${artifactId} I need to keep the contents intact and just rename it.

Futtock answered 16/6, 2011 at 21:5 Comment(2)
Are you using modules? Why can't you just rename the directory?Phoney
I want the directory to be parameterized based on the instance that is being created at the time of mvn archetype:generateFuttock
B
17

I was looking into the same thing and found: http://jira.codehaus.org/browse/ARCHETYPE-191

Works like a charm!

Use _____artifactId_____ instead of ${artifactId}

Broncobuster answered 20/6, 2011 at 19:34 Comment(1)
yep, sorry, should have explicitly stated thatBroncobuster
E
0

You should use in the folder name _rootArtifactId_

Erective answered 1/6, 2012 at 15:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.