Questions tagged [maven-archetype]

1

votes
1

answer
160

Views

Use create-from-project for maven archetype: Include empty directories

If I use create-from-project to create an archetype from a Maven project, how can I include empty directories? I want to include a directory like src/main/java even if it is empty.
JF Meier
1

votes
1

answer
73

Views

Create maven archetype with custom params using requiredProps and fileSets

I need to create a new maven archetype where project files contains some custom params that I would like to provide for mvn archetype:generate. Only -DgroupId, -DartifactId and version works fine. But I cannot provide e.g. -Dparam1=value1 . I tried using requiredProperties and fileSets, but it does...
john
1

votes
0

answer
51

Views

Sign and Publish Maven Archetype

I'm trying to create some archetypes for my project FlexFX and I would like to build and publish these at the same as the main project itself. The issue I am facing is how to correctly structure the POMs so that the generated archetypes are signed and published and NOT the 'template project' from wi...
Kerry
1

votes
1

answer
30

Views

Why is a profile mandatory for acquiring archetypes in non-Central repositories?

I use Maven 3.2.1 and maven-archetype-plugin 3.0.1 on Windows 10. I deployed archetype to my repository and defined it in settings.xml, but archetype could not be found. archetype https://mydomain/repos The execution result is as follows. DOS> mvn archetype:generate \ -DarchetypeGroupId=my.sample \...
nikai
1

votes
0

answer
31

Views

How to change the default project name generated by maven archetype

Is there a way to change the default Project Name in Maven archetype? in this case it defaults to artifactId I want to set the Project Name = __artifactId__-system. I'm creating the new project with this command: mvn archetype:generate -DarchetypeGroupId=some.group.name -DarchetypeArtifactId=project...
Wolver1ne
1

votes
0

answer
157

Views

How to escape special characters in maven properties

I am using an archetype to generate a project, and as part of this I need to dynamically generate a property within the pom file. The problem is that the name of a property in maven does not allow the dollar sign ($), and this sign is needed to denote a property defined in the archetype generation s...
James
1

votes
0

answer
159

Views

Maven archetype for simple Java Servlet 4 application

Basically the same as this Question, Maven archetype for simple Servlet application, but for the current generation of the Java Servlet 4 standard. Looking for a very simple project appropriate to quickly writing a demo Servlet or for starting a simple web app for real work. Needs to be able to pack...
Basil Bourque
1

votes
0

answer
33

Views

Maven remote archetype from Nexus offers all snapshots instead of only the last one

I have generated a Maven archetype which has been uploaded to a Nexus repository (mvn deploy). This archetype is still a SNAPSHOT. When I try to generate a project mvn archetype:generate -DarchetypeCatalog=remote -U I am offered every uploaded SNAPSHOT, when I am only interested in the last one: 1:...
codependent
1

votes
1

answer
83

Views

How to generate custom maven archetype with selected dependencies from the pom?

I am generating a custom archetype using maven. Currently I have three dependencies defined in the pom.xml (dependency 1, dependency 2 and dependency 3). This is my archetype-metadata.xml file where I have defined the required properties for the archetype generation. Here I have a property called pr...
Sameera Manorathna
1

votes
0

answer
37

Views

Generate maven archetype from project and variable replacement

I'm trying to generate an archetype from a project, but I have some issues to solve. First of all, I've a file like this: apiVersion: extensions/v1beta1 kind: Deployment metadata: name: ${artifactId} .... Then, I use the command: mvn clean archetype:create-from-project -Darchetype.filteredExtentions...
user2520969
1

votes
1

answer
93

Views

maven custom archetype publishing to repository

I have created a custom maven archetype. Now I want to push this to a private repository so that it can be used by other project members as well. At the same time I need this to be listed in eclipse/other IDE. Could you please advise how this can be achieved. Any help greatly appreciated.
vipin ev
1

votes
1

answer
49

Views

Custom maven archetype doesn't generate sources defined in archtype.xml

I'm trying to create a custom archetype which defines a substantial pom.xml and includes a couple of source files. None of the sources I define in my archetype.xml are included when generate a project using this archetype (the pom.xml is generated as expected). My archetype.xml is located in src/mai...
Rowan
1

votes
0

answer
44

Views

Post-generate-script for Maven archetype is not working in Eclipse

Hello Everyone i got a strange error while generating a project from archetype . There is a postscript groovy file archetype-post-generate.groovy(in archetype project) which is supposed to runs after any project gets created from that archetype . This works fine if i am creating a project from cmd u...
Sourav Purohit
1

votes
3

answer
2.8k

Views

create grails project from Maven archetype

When I try to create a Mavenized Grails 1.3.6 project using the archetype: mvn archetype:generate -DarchetypeGroupId=org.grails -DarchetypeArtifactId=grails-maven-archetype -DarchetypeVersion=1.3.6 -DgroupId=example -DartifactId=my-app -DarchetypeRepository=http://repo1.maven.org/maven2 I get the...
Dónal
1

votes
1

answer
1.4k

Views

maven failure to resolve archetype ear-jee5

I am trying to create an EAR maven module project (in eclipse) with ear-jee5 as the archetype. It fails with the following error. Could not resolve archetype org.codehaus.mojo.archetypes:ear-jee5:1.3 from any of the configured repositories. Could not resolve artifact Missing org.codehaus.mojo.arche...
Kiran Mohan
1

votes
2

answer
3k

Views

mvn archetype:generate BUILD FAILURE

I am following the tutorial: http://persistentdesigns.com/wp/jersey-spring-and-jpa/ Here it says, run the command mvn archetype:generate -DarchetypeCatalog=http://download.java.net/maven/2 After that give the groupId, ArtifactId, etc. I ran the above command. But before asking for groupId, it asked...
kajarigd
1

votes
1

answer
1.2k

Views

Android Maven archtype project layout doesn't show correct on ADT Graphical Editor

I created an Android-Maven archetype project using command line (http://stand.spree.de/wiki_details_maven_archetypes). When I imported this project to ADT (so that I can take some advantage of the graphical editor), I found the graphical editor doesn't show the view correctly. For the auto generate...
Allan Jiang
1

votes
3

answer
7.4k

Views

How to use maven archetype in intellij idea, such as spring-mvc-quickstart-archetype?

I'm a newbie of maven. These day, I want to create a spring mvc project, so I find spring-mvc-quickstart-archetype, but how to use it in Intellij IDEA?
noodles
1

votes
1

answer
167

Views

Eclipse not using the lastest snapshot in maven archetype project creation

The title pretty much sums it up, when I create a new project from a maven archetype it gets an old version of the archetype when I use snapshots. Is there any way to force the updating of the snapshots or at least specify which snapshot I actually want?
Hoffmann
1

votes
1

answer
119

Views

Not able to find simple-weather project in sonatype repo

I have learning Maven by going through Maven By Example. In the 4th chapter its asks to generate a Maven project using archetype plugin (Find it here). I have been trying to download the project using Mvn archetype:generate and then choosing 16, as they say in the tutorial but no 16 doesnt refer to...
Vivin
1

votes
1

answer
1.6k

Views

How to install tomcat maven plugin?

I'm trying to run the basic CXF maven archetype. I've just tried to install tomcat7-maven-plugin-2.2.jar manually using : mvn -X install:install-file -Dfile=/tmp/path/tomcat7-maven-plugin-2.2.jar -DgroupId=org.apache.tomcat.maven -DartifactId=tomcat7-maven-plugin -Dversion=2.2 -Dpackaging=jar which...
Tristan
1

votes
3

answer
232

Views

Custom maven-archetype

I am creating a custom maven archetype. I have defined the archetype.xml file under the src/main/resources/META-INF/maven. I also have included the default Java classes under the src/main/resources/archetype-resources/src/main/java. However I am not sure as to how can I parameterize the package name...
mithrandir
1

votes
1

answer
308

Views

Maven central archetype catalog

I deployed a maven archetype to sonatype 24 hours ago. While the artifacts are available in repo1, the archetype is not listed in https://repo1.maven.org/maven2/archetype-catalog.xml How can I get it there? Note that the archetype is in https://oss.sonatype.org/content/repositories/releases/archetyp...
user2913094
1

votes
1

answer
303

Views

Camel Spring Boot Archetype builds project with missing artifact

When I run the mvn command to create a Spring Boot Camel project using the Camel Spring Boot archetype the resulting pom.xml gives a dependency error. mvn archetype:generate -DarchetypeGroupId=org.apache.camel.archetypes -DarchetypeArtifactId=camel-archetype-spring-boot -DarchetypeVersion=2.16.0 -Dg...
Benj F
1

votes
2

answer
359

Views

MojoFailureException caused by charsetName on Maven Archetype

When I try to run the command mvn archetype:create-from-project for my WAR project, this exception is showed after the reading of a .java file: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:create-from-project (default-cli) on project ConfiguradorWAR: charsetName...
maihe
1

votes
1

answer
924

Views

Maven Archetype change in intellij

I created a maven project using archetype j2ee-simple in IntelliJ IDEA (2016.1.3). Now is there a way, I can change the archetype for this project?
user139386
1

votes
1

answer
121

Views

Does mvn archetype remove markdown titles?

At my company we have a default archetype which many teams use to base their projects. We're trying to add a default README.md to it with titles and subtitles. But we're struggling with an unexpected behavior. We're trying to add subtitles using multiple number sign characters (e.g. ###). But in the...
Thiago
1

votes
1

answer
315

Views

Maven archetype not substituting properties for module directory name

I created an archetype of a multi-module project, and my intention is to substitute required property __implementation__ for directory names. The result is, __rootArtifactId__ was substituted, but the __impelementation__ was not. archetype-metadata.xml: src/main/java **/*.java pom.xml properties: a...
J. Wang
1

votes
1

answer
811

Views

Sonatype Nexus 3.1: Archetype catalog not generated

Ever since we've upgraded to Sonatype Nexus 3.x we are missing our custom archetypes in the repository. When browsing to http://repo/repository/maven-releases/archetype-catalog.xml I am being shown an empty archetype XML: I have tried rebuilding the index of the repository and also tried deploying a...
Ahatius
1

votes
1

answer
61

Views

is there any way to generate value for nested variable while generating an project from maven archetype

Is there any way to generate value for nested variable while generating an project from maven archetype? I have an statement like this in current archetype which I will replace when I generate an project out of it. I will be making specailzed-folder a required property in archetype-metadata.xml ${s...
naren
1

votes
1

answer
40

Views

Is it possible to execute a Java code as a part of the project generation from maven archetype?

I have a project template and a Maven archetype defined. What I'm trying to figure out is how to execute a custom Java code (or a Maven MOJO) after the initial project structure is generated (for example, I need to pass a URL to a WSDL file and the custom code would parse it and generate additional...
JavaDuke
1

votes
1

answer
118

Views

Store Maven Archetype In Google Cloud Storage

I am using a Maven wagon to store my artifacts in Google Cloud Storage. I followed this blog post https://egkatzioura.com/2018/04/09/host-your-maven-artifacts-using-google-cloud-storage/. I wanted to avoid using nexus for the overhead of running a server and the storage cost savings I could get from...
dan
1

votes
1

answer
49

Views

Maven archetype:generate forcing groupId as package structure

I'm trying to create an archetype to generate a Maven project with some properties that will be used in the files and with the file names and directory structure. The problem I am running into is how to control the package directory structure? No matter what I have tried so far, the groupId I specif...
James
1

votes
1

answer
0

Views

Maven archetype package construction

I created my own archetype which has a custom pom.xml and a custom class in a package like this: ${groupId}.${artifactId}.core The problem is at package. When I create a maven project with my archetype the package it is not like ${groupId}.${artifactId}.core. It is only ${groupId}. This is the gener...
KunLun
1

votes
1

answer
0

Views

Is there a way to just copy resources when using a Maven archetype (no Velocity)?

We are using a Maven archetype to create an initial setup for projects using our framework, which relies heavily on Freemarker. As a consequence we need to copy a few Freemarker templates when the archetype is used to generate a new project. The problem we ran into is that Maven seems to run Velocit...
Peter Becker
1

votes
1

answer
0

Views

webdriver maven archetype

How to find maven project archetype for a webdriver project? I tried google it, but with no luck. where can I find this archtype? I bet it exists.
IAdapter
1

votes
1

answer
2.4k

Views

Cannot Produce JSON with Maven quickstart grizzly Archetype

I've put some good hours trying to get my grizzly webserver to produce JSON. Generated from maven archetype using Intellij, details: groupId untitled3 artifactId untitled3 version 1.0-SNAPSHOT archetypeGroupId org.glassfish.jersey.archetypes archetypeArtifactId jersey-quickstart-grizzly2 archety...
OakNinja
1

votes
1

answer
183

Views

Prevent Maven archetype generate from creating variable

I created a Maven Archetype for use in our company projects. Everything worked well until going to deploy a project built from the archetype which failed due to invalid XML. Within the template I created to generate the archetype from are several .xml files. Each has an XML declaration of: When runn...
Eric Olson
1

votes
1

answer
295

Views

Maven archetypes dynamic folder not properly generated

I've Maven Archetype with folder a structure which I want to be src/main/java/__package__/model. So I filled that structure while defining. The issue is that maven archetype generates this resulting structure: src/main/java/com.myapp/model (notice the dot in place of the expected folder separator :(...
Tcharl
1

votes
1

answer
91

Views

Managing common values for multiple Maven archetypes

I have a number of Maven archetypes, structured as follows . ├── bundle ├── bundle-for-jcrinstall ├── initial-content ├── launchpad-standalone ├── launchpad-webapp ├── servlet └── taglib For these, I would like to have a single source of common values, e.g....
Robert Munteanu

View additional questions