You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Alexander Broekhuis <a....@gmail.com> on 2021/07/28 19:32:01 UTC
Archetype create-from-project filename issue
Hi all,
I have a project from which I create an archetype using the
create-from-project goal. This all works great, and I can make it work
without a need to change anything in the generated files.
However, now I am running into a problem where a file which has the same
name as a module (it is a multi-module project) is not created when using
the archetype. Looking in the generated-sources, I can see that file as
"__artifactId__.ext". I expected this file to show up in the created
project as "submodule.ext".
Is there something I am missing, and how can I fix this?
TiA!
--
Met vriendelijke groet,
Alexander Broekhuis
Re: Archetype create-from-project filename issue
Posted by Alexander Broekhuis <a....@gmail.com>.
To answer part of my own question..
In the generated archetype-metadata.xml, the problematic file is added with
its original name. So if it is "templateProjectModule.ext" in the project
on which the create-from-project is used, the file is added as
"__artifactId__.ext" in the generated-sources, but still named
"templateProjectModule.ext" in the metadata.
Changing the metadata to "__artifactId__.ext" makes it work as expected,
however, this requires a change to the generated output, which I was hoping
to prevent.
Is this a bug, or is this intentional, or am I simply doing something wrong?
Op wo 28 jul. 2021 om 21:32 schreef Alexander Broekhuis <
a.broekhuis@gmail.com>:
> Hi all,
>
> I have a project from which I create an archetype using the
> create-from-project goal. This all works great, and I can make it work
> without a need to change anything in the generated files.
>
> However, now I am running into a problem where a file which has the same
> name as a module (it is a multi-module project) is not created when using
> the archetype. Looking in the generated-sources, I can see that file as
> "__artifactId__.ext". I expected this file to show up in the created
> project as "submodule.ext".
>
> Is there something I am missing, and how can I fix this?
>
> TiA!
>
> --
> Met vriendelijke groet,
>
> Alexander Broekhuis
>
--
Met vriendelijke groet,
Alexander Broekhuis