You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by divine chelladurai <cd...@live.com> on 2023/04/01 04:52:22 UTC

Doubt in `-DarchetypeVersion` in `mvn archetype:generate` command

Hi Team,

i need your help to understand the query posted below

i have a bunch of java projects that have to be migrated to maven projects. I have to automate this process.

I came across `mvn archetype:generate` , I read about it and this would help me in the migration process.

i found the `mvn archetype:generate` command in this website<https://maven.apache.org/archetypes/maven-archetype-archetype/>

i executed the command `mvn archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-archetype -DarchetypeVersion=1.4` in my laptop , it generated the maven archetype project successfully.

-DarchetypeVersion=1.4 --- I want to know if 1.4 is the latest version. Below screenshot shows my generated pom.xml . I don't see version1.4 in the pom.xml , where can I find it in the project which I generated using the `mvn archetype:generate` command ? if i change 1.4 to some other version, then where in the project should i verify if that version is installed correctly?


[cid:a6be4aa1-2613-4bde-a705-27a9516ace42]


Please help me to understand this. Thank you


Regards,
Divine


Re: Doubt in `-DarchetypeVersion` in `mvn archetype:generate` command

Posted by Tomo Suzuki <su...@google.com.INVALID>.
If I were you, I would just use copy command to generate (copy) pom.xml
after preparing your desired pom.xml. The maven-archetype-archetype just
increases complexity in your case and it seems outdated.

Regards,
Tomo

On Sun, Apr 2, 2023 at 02:33 divine chelladurai <cd...@live.com> wrote:

> Hi Team,
>
> i need your help to understand the query posted below
>
> i have a bunch of java projects that have to be migrated to maven
> projects. I have to automate this process.
>
> I came across `mvn archetype:generate` , I read about it and this would
> help me in the migration process.
>
> i found the `mvn archetype:generate` command in this website
> <https://maven.apache.org/archetypes/maven-archetype-archetype/>
>
> i executed the command `mvn archetype:generate -DarchetypeGroupId=org.
> apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-archetype -
> DarchetypeVersion=1.4` in my laptop , it generated the maven archetype
> project successfully.
>
> -DarchetypeVersion=1.4 --- I want to know if 1.4 is the latest version.
> Below screenshot shows my generated pom.xml . I don't see version1.4 in
> the pom.xml , where can I find it in the project which I generated using
> the `mvn archetype:generate` command ? if i change 1.4 to some other
> version, then where in the project should i verify if that version is
> installed correctly?
>
>
>
>
>
> Please help me to understand this. Thank you
>
>
> Regards,
> Divine
>
> --
Regards,
Tomo

Re: Doubt in `-DarchetypeVersion` in `mvn archetype:generate` command

Posted by Herve Boutemy <hb...@apache.org>.
Hi,

It seems that archetype:create-from-project is what you are trying to do by hand:
https://maven.apache.org/archetype/maven-archetype-plugin/advanced-usage.html

There is additional documentation on the plugin documentation to understand its usage.

Regards,

Hervé

On 2023/04/01 04:52:22 divine chelladurai wrote:
> Hi Team,
> 
> i need your help to understand the query posted below
> 
> i have a bunch of java projects that have to be migrated to maven projects. I have to automate this process.
> 
> I came across `mvn archetype:generate` , I read about it and this would help me in the migration process.
> 
> i found the `mvn archetype:generate` command in this website<https://maven.apache.org/archetypes/maven-archetype-archetype/>
> 
> i executed the command `mvn archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-archetype -DarchetypeVersion=1.4` in my laptop , it generated the maven archetype project successfully.
> 
> -DarchetypeVersion=1.4 --- I want to know if 1.4 is the latest version. Below screenshot shows my generated pom.xml . I don't see version1.4 in the pom.xml , where can I find it in the project which I generated using the `mvn archetype:generate` command ? if i change 1.4 to some other version, then where in the project should i verify if that version is installed correctly?
> 
> 
> [cid:a6be4aa1-2613-4bde-a705-27a9516ace42]
> 
> 
> Please help me to understand this. Thank you
> 
> 
> Regards,
> Divine
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org