Creating an Archetype From POM: Property is MissingAre there other default maven archetype propertiesMaven archetype properties with default value artifactIDFilter archetypes in Maven command line with archetype:generatePlugin execution not covered by lifecycle configuration (JBossas 7 EAR archetype)How can change pom.xml property when creating new project from local archetype?Replace Maven Archetype property in JavaScript filemvn archetype:generate -DarchetypeCatalog=local does not list my archetypeMaven - Is `maven-archetype-simple` a valid archetype?Is it possible to give dynamic directory structure in customized maven archetypeHow to generate custom maven archetype with selected dependencies from the pom?
Accidentally cashed a check twice
Singlequote and backslash
What does it mean by "d-ism of Leibniz" and "dotage of Newton" in simple English?
How can a single Member of the House block a Congressional bill?
What are the problems in teaching guitar via Skype?
How crucial is a waifu game storyline?
A word used to describe a fish trying to eat bait bit by bit
When was the word "ambigu" first used with the sense of "meal with all items served at the same time"?
Bringing Food from Hometown for Out-of-Town Interview?
What is the intuition behind uniform continuity?
Looking after a wayward brother in mother's will
Starting VLC from command line always puts the window behind other windows
What is the difference between a game ban and a VAC ban in Steam?
How can I offer a test ride while selling a bike?
Can you please explain this joke: "I'm going bananas is what I tell my bananas before I leave the house"?
arcpy.GetParameterAsText not passing arguments to script?
How do I truncate a csv file?
If Sweden was to magically float away, at what altitude would it be visible from the southern hemisphere?
Different PCB color ( is it different material? )
The term for the person/group a political party aligns themselves with to appear concerned about the general public
Pros and cons of writing a book review?
What does War Machine's "Canopy! Canopy!" line mean in "Avengers: Endgame"?
Opposite of "Squeaky wheel gets the grease"
Creating Fictional Slavic Place Names
Creating an Archetype From POM: Property is Missing
Are there other default maven archetype propertiesMaven archetype properties with default value artifactIDFilter archetypes in Maven command line with archetype:generatePlugin execution not covered by lifecycle configuration (JBossas 7 EAR archetype)How can change pom.xml property when creating new project from local archetype?Replace Maven Archetype property in JavaScript filemvn archetype:generate -DarchetypeCatalog=local does not list my archetypeMaven - Is `maven-archetype-simple` a valid archetype?Is it possible to give dynamic directory structure in customized maven archetypeHow to generate custom maven archetype with selected dependencies from the pom?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I created a Maven archetype and want to create an example project of it in my repository, which seems to be an unusual use-case.
Since I don't want to create the archetype manually, I added the following execution:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-archetype-plugin</artifactId>
<configuration>
<archetypeGroupId>my.company.archetypes</archetypeGroupId>
<archetypeVersion>$project.version</archetypeVersion>
<groupId>org.acme</groupId>
<version>0.1.2-SNAPSHOT</version>
<interactiveMode>false</interactiveMode>
</configuration>
<executions>
<execution>
<id>archetype-one</id>
<goals>
<goal>generate</goal>
</goals>
<phase>package</phase>
<configuration>
<archetypeArtifactId>archetype-one</archetypeArtifactId>
<artifactId>one</artifactId>
<package>org.acme.one</package>
</configuration>
</execution>
</executions>
</plugin>
This leads to the following exception:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (archetype-one) on project examples: Archetype my.company.archetypes:archetype-one:0.9.0-SNAPSHOT is not configured
[ERROR] Property groupId is missing.
[ERROR] Property artifactId is missing.
[ERROR] Property package is missing.
Which is just not true, since I've defined all of these. At least the IDE proposes these tags on that position. Moving the configuration tags around doesn't help either.
So I checked the source code of generate
, and lo and behold, the target GAVs aren't present.
How do I define them when generating an archetype directly from another pom.xml?
maven maven-archetype
add a comment |
I created a Maven archetype and want to create an example project of it in my repository, which seems to be an unusual use-case.
Since I don't want to create the archetype manually, I added the following execution:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-archetype-plugin</artifactId>
<configuration>
<archetypeGroupId>my.company.archetypes</archetypeGroupId>
<archetypeVersion>$project.version</archetypeVersion>
<groupId>org.acme</groupId>
<version>0.1.2-SNAPSHOT</version>
<interactiveMode>false</interactiveMode>
</configuration>
<executions>
<execution>
<id>archetype-one</id>
<goals>
<goal>generate</goal>
</goals>
<phase>package</phase>
<configuration>
<archetypeArtifactId>archetype-one</archetypeArtifactId>
<artifactId>one</artifactId>
<package>org.acme.one</package>
</configuration>
</execution>
</executions>
</plugin>
This leads to the following exception:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (archetype-one) on project examples: Archetype my.company.archetypes:archetype-one:0.9.0-SNAPSHOT is not configured
[ERROR] Property groupId is missing.
[ERROR] Property artifactId is missing.
[ERROR] Property package is missing.
Which is just not true, since I've defined all of these. At least the IDE proposes these tags on that position. Moving the configuration tags around doesn't help either.
So I checked the source code of generate
, and lo and behold, the target GAVs aren't present.
How do I define them when generating an archetype directly from another pom.xml?
maven maven-archetype
Have you tried to define them as<properties>
in your POM?
– JF Meier
Mar 24 at 13:32
@JFMeier I did now. It didn't work either.
– Steffi S.
Mar 24 at 13:36
I haven't digged through the source code deep enough, but I guess they do something like enumerating the set system properties. These are set throuhg-D
in the command line, but outside the surefire plugin, I do not know whether you can set them in the POM. If you use eclipse, you can checkout the plugin, import it as Ecplise project and debug through it.
– JF Meier
Mar 24 at 16:53
add a comment |
I created a Maven archetype and want to create an example project of it in my repository, which seems to be an unusual use-case.
Since I don't want to create the archetype manually, I added the following execution:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-archetype-plugin</artifactId>
<configuration>
<archetypeGroupId>my.company.archetypes</archetypeGroupId>
<archetypeVersion>$project.version</archetypeVersion>
<groupId>org.acme</groupId>
<version>0.1.2-SNAPSHOT</version>
<interactiveMode>false</interactiveMode>
</configuration>
<executions>
<execution>
<id>archetype-one</id>
<goals>
<goal>generate</goal>
</goals>
<phase>package</phase>
<configuration>
<archetypeArtifactId>archetype-one</archetypeArtifactId>
<artifactId>one</artifactId>
<package>org.acme.one</package>
</configuration>
</execution>
</executions>
</plugin>
This leads to the following exception:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (archetype-one) on project examples: Archetype my.company.archetypes:archetype-one:0.9.0-SNAPSHOT is not configured
[ERROR] Property groupId is missing.
[ERROR] Property artifactId is missing.
[ERROR] Property package is missing.
Which is just not true, since I've defined all of these. At least the IDE proposes these tags on that position. Moving the configuration tags around doesn't help either.
So I checked the source code of generate
, and lo and behold, the target GAVs aren't present.
How do I define them when generating an archetype directly from another pom.xml?
maven maven-archetype
I created a Maven archetype and want to create an example project of it in my repository, which seems to be an unusual use-case.
Since I don't want to create the archetype manually, I added the following execution:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-archetype-plugin</artifactId>
<configuration>
<archetypeGroupId>my.company.archetypes</archetypeGroupId>
<archetypeVersion>$project.version</archetypeVersion>
<groupId>org.acme</groupId>
<version>0.1.2-SNAPSHOT</version>
<interactiveMode>false</interactiveMode>
</configuration>
<executions>
<execution>
<id>archetype-one</id>
<goals>
<goal>generate</goal>
</goals>
<phase>package</phase>
<configuration>
<archetypeArtifactId>archetype-one</archetypeArtifactId>
<artifactId>one</artifactId>
<package>org.acme.one</package>
</configuration>
</execution>
</executions>
</plugin>
This leads to the following exception:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (archetype-one) on project examples: Archetype my.company.archetypes:archetype-one:0.9.0-SNAPSHOT is not configured
[ERROR] Property groupId is missing.
[ERROR] Property artifactId is missing.
[ERROR] Property package is missing.
Which is just not true, since I've defined all of these. At least the IDE proposes these tags on that position. Moving the configuration tags around doesn't help either.
So I checked the source code of generate
, and lo and behold, the target GAVs aren't present.
How do I define them when generating an archetype directly from another pom.xml?
maven maven-archetype
maven maven-archetype
asked Mar 24 at 11:00
Steffi S.Steffi S.
1,5902836
1,5902836
Have you tried to define them as<properties>
in your POM?
– JF Meier
Mar 24 at 13:32
@JFMeier I did now. It didn't work either.
– Steffi S.
Mar 24 at 13:36
I haven't digged through the source code deep enough, but I guess they do something like enumerating the set system properties. These are set throuhg-D
in the command line, but outside the surefire plugin, I do not know whether you can set them in the POM. If you use eclipse, you can checkout the plugin, import it as Ecplise project and debug through it.
– JF Meier
Mar 24 at 16:53
add a comment |
Have you tried to define them as<properties>
in your POM?
– JF Meier
Mar 24 at 13:32
@JFMeier I did now. It didn't work either.
– Steffi S.
Mar 24 at 13:36
I haven't digged through the source code deep enough, but I guess they do something like enumerating the set system properties. These are set throuhg-D
in the command line, but outside the surefire plugin, I do not know whether you can set them in the POM. If you use eclipse, you can checkout the plugin, import it as Ecplise project and debug through it.
– JF Meier
Mar 24 at 16:53
Have you tried to define them as
<properties>
in your POM?– JF Meier
Mar 24 at 13:32
Have you tried to define them as
<properties>
in your POM?– JF Meier
Mar 24 at 13:32
@JFMeier I did now. It didn't work either.
– Steffi S.
Mar 24 at 13:36
@JFMeier I did now. It didn't work either.
– Steffi S.
Mar 24 at 13:36
I haven't digged through the source code deep enough, but I guess they do something like enumerating the set system properties. These are set throuhg
-D
in the command line, but outside the surefire plugin, I do not know whether you can set them in the POM. If you use eclipse, you can checkout the plugin, import it as Ecplise project and debug through it.– JF Meier
Mar 24 at 16:53
I haven't digged through the source code deep enough, but I guess they do something like enumerating the set system properties. These are set throuhg
-D
in the command line, but outside the surefire plugin, I do not know whether you can set them in the POM. If you use eclipse, you can checkout the plugin, import it as Ecplise project and debug through it.– JF Meier
Mar 24 at 16:53
add a comment |
1 Answer
1
active
oldest
votes
So I ended up using an entirely different Maven plug-in:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>archetype-one</id>
<goals>
<goal>exec</goal>
</goals>
<phase>package</phase>
<configuration>
<executable>mvn</executable>>
<arguments>
<argument>archetype:generate</argument>
<argument>-DarchetypeGroupId=my.company.archetypes</argument>
<argument>-DarchetypeVersion=$project.version</argument>
<argument>-DgroupId=org.acme</argument>
<argument>-Dversion=0.1.2-SNAPSHOT</argument>
<argument>-DinteractiveMode=false</argument>
<argument>-DarchetypeArtifactId=archetype-one</argument>
<argument>-DartifactId=one</argument>
<argument>-Dpackage=org.acme.one</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
And since I wanted to generate multiple archetypes, I put the first six arguments into a general <configuration>
block, and appended the remaining three with <arguments combine.children="append">
.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55323112%2fcreating-an-archetype-from-pom-property-is-missing%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
So I ended up using an entirely different Maven plug-in:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>archetype-one</id>
<goals>
<goal>exec</goal>
</goals>
<phase>package</phase>
<configuration>
<executable>mvn</executable>>
<arguments>
<argument>archetype:generate</argument>
<argument>-DarchetypeGroupId=my.company.archetypes</argument>
<argument>-DarchetypeVersion=$project.version</argument>
<argument>-DgroupId=org.acme</argument>
<argument>-Dversion=0.1.2-SNAPSHOT</argument>
<argument>-DinteractiveMode=false</argument>
<argument>-DarchetypeArtifactId=archetype-one</argument>
<argument>-DartifactId=one</argument>
<argument>-Dpackage=org.acme.one</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
And since I wanted to generate multiple archetypes, I put the first six arguments into a general <configuration>
block, and appended the remaining three with <arguments combine.children="append">
.
add a comment |
So I ended up using an entirely different Maven plug-in:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>archetype-one</id>
<goals>
<goal>exec</goal>
</goals>
<phase>package</phase>
<configuration>
<executable>mvn</executable>>
<arguments>
<argument>archetype:generate</argument>
<argument>-DarchetypeGroupId=my.company.archetypes</argument>
<argument>-DarchetypeVersion=$project.version</argument>
<argument>-DgroupId=org.acme</argument>
<argument>-Dversion=0.1.2-SNAPSHOT</argument>
<argument>-DinteractiveMode=false</argument>
<argument>-DarchetypeArtifactId=archetype-one</argument>
<argument>-DartifactId=one</argument>
<argument>-Dpackage=org.acme.one</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
And since I wanted to generate multiple archetypes, I put the first six arguments into a general <configuration>
block, and appended the remaining three with <arguments combine.children="append">
.
add a comment |
So I ended up using an entirely different Maven plug-in:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>archetype-one</id>
<goals>
<goal>exec</goal>
</goals>
<phase>package</phase>
<configuration>
<executable>mvn</executable>>
<arguments>
<argument>archetype:generate</argument>
<argument>-DarchetypeGroupId=my.company.archetypes</argument>
<argument>-DarchetypeVersion=$project.version</argument>
<argument>-DgroupId=org.acme</argument>
<argument>-Dversion=0.1.2-SNAPSHOT</argument>
<argument>-DinteractiveMode=false</argument>
<argument>-DarchetypeArtifactId=archetype-one</argument>
<argument>-DartifactId=one</argument>
<argument>-Dpackage=org.acme.one</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
And since I wanted to generate multiple archetypes, I put the first six arguments into a general <configuration>
block, and appended the remaining three with <arguments combine.children="append">
.
So I ended up using an entirely different Maven plug-in:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>archetype-one</id>
<goals>
<goal>exec</goal>
</goals>
<phase>package</phase>
<configuration>
<executable>mvn</executable>>
<arguments>
<argument>archetype:generate</argument>
<argument>-DarchetypeGroupId=my.company.archetypes</argument>
<argument>-DarchetypeVersion=$project.version</argument>
<argument>-DgroupId=org.acme</argument>
<argument>-Dversion=0.1.2-SNAPSHOT</argument>
<argument>-DinteractiveMode=false</argument>
<argument>-DarchetypeArtifactId=archetype-one</argument>
<argument>-DartifactId=one</argument>
<argument>-Dpackage=org.acme.one</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
And since I wanted to generate multiple archetypes, I put the first six arguments into a general <configuration>
block, and appended the remaining three with <arguments combine.children="append">
.
answered Mar 29 at 12:47
Steffi S.Steffi S.
1,5902836
1,5902836
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55323112%2fcreating-an-archetype-from-pom-property-is-missing%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Have you tried to define them as
<properties>
in your POM?– JF Meier
Mar 24 at 13:32
@JFMeier I did now. It didn't work either.
– Steffi S.
Mar 24 at 13:36
I haven't digged through the source code deep enough, but I guess they do something like enumerating the set system properties. These are set throuhg
-D
in the command line, but outside the surefire plugin, I do not know whether you can set them in the POM. If you use eclipse, you can checkout the plugin, import it as Ecplise project and debug through it.– JF Meier
Mar 24 at 16:53