archetypes

Can I add custom objects to Velocity context with Maven archetype plugin?

99封情书 提交于 2019-12-04 03:27:25
We have a number of code generators that use Velocity to generate projects. The generation can be quite complicated: reflection is used (to introspect 3rd party proxies that we have to interface with) prior to calling velocity - the resulting properties (a complex object graph) are added to the velocity context the project structure and files can vary depending on the options selected the templates do more than just variable substitution (they make use of a custom object added to the velocity context, which contains many derived properties, including collections of other objects which are

Build Sling Failure: Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:integration-test (default-integration-test)

自作多情 提交于 2019-12-04 03:26:15
im trying to build sling cause I need it for a project at the university. Can anyone tell me, how I can solve this error? [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 54.112s [INFO] Finished at: Sun Mar 25 18:51:41 CEST 2012 [INFO] Final Memory: 68M/165M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:integration-test (default-integration-test) on project sling-servlet-archetype: Execution default

How to use my custom archetype with Maven?

无人久伴 提交于 2019-12-04 02:52:18
I just create my custom archetype project, and I run perfectly the " mvn install " command. In my local repository, my archetype project was added correctly via m2/repository/com/mycomp/archetype-project-name . (but it was not created in the archetype folder : m2/repository/org/apache/maven/archetypes : maybe it's normal) But now I can't use my new custom archetype with the "mvn archetype:generation" command : with good parameters Maven tell me he doesn't find the archetype without parameters, my archetype doesn't exist in the archetype list. Should I execute the mvn deploy command too ? I

Conditionally include exclude files while creating project using maven archetype

六眼飞鱼酱① 提交于 2019-12-03 12:27:33
问题 Am trying to create an archetype which will conditionally include file based on the user input. Like for eg., if a user will use this custom archetype and pass parameters like -DprojectType=webProject or -DprojectType=webDBProject if webProject copy only files related to webProject and if its webDBProject copy files related to webProject and DB related files. I found out that conditionally include/exclude file is not possible at least in near future using archetype-descriptor. How do I

Maven 3 Archetype for Project With Spring, Spring MVC, Hibernate, JPA

我怕爱的太早我们不能终老 提交于 2019-12-03 11:14:42
问题 I'm trying to use Maven 3 to create a project which uses Spring 3, Spring MVC, Hibernate 4, and JPA. However, when I execute: mvn archetype:generate Non of the archetypes listed include all of these; and even those which are close seem to be special projects such as projects with Flex. I want to avoid having extra modules such as Flex that would crowd the project and configuration files. So, is there an archetype for Maven 3 that I can use to create such a project? 回答1: Possible duplicate: Is

Conditionally include exclude files while creating project using maven archetype

一曲冷凌霜 提交于 2019-12-03 02:48:23
Am trying to create an archetype which will conditionally include file based on the user input. Like for eg., if a user will use this custom archetype and pass parameters like -DprojectType=webProject or -DprojectType=webDBProject if webProject copy only files related to webProject and if its webDBProject copy files related to webProject and DB related files. I found out that conditionally include/exclude file is not possible at least in near future using archetype-descriptor. How do I conditionally include or exclude a file from an archetype when project is generated? The other option i had

Maven 3 Archetype for Project With Spring, Spring MVC, Hibernate, JPA

左心房为你撑大大i 提交于 2019-12-03 01:36:22
I'm trying to use Maven 3 to create a project which uses Spring 3, Spring MVC, Hibernate 4, and JPA. However, when I execute: mvn archetype:generate Non of the archetypes listed include all of these; and even those which are close seem to be special projects such as projects with Flex. I want to avoid having extra modules such as Flex that would crowd the project and configuration files. So, is there an archetype for Maven 3 that I can use to create such a project? Rob Possible duplicate: Is there a maven 2 archetype for spring 3 MVC applications? That said, I would encourage you to think

Maven-archetype-webapp Directory Structure?

我的未来我决定 提交于 2019-12-01 21:08:40
Is there a possibility or a workaroud to use maven-archetype-webapp archetype to generate a maven webapp with plain directory structure like /src /main /java /resources /webapp /test /java /resources wemu I assume that your issue is the missing java and test folders in a new project when using maven-archetype-webapp. There are no options to make that archetype to add those. Of course you could add them manually after the project was created. You may find another archetypes in one of these lists: http://myjeeva.com/exclusive-maven-archetype-list.html http://docs.codehaus.org/display/MAVENUSER

Moving fields between fieldsets on Dexterity

耗尽温柔 提交于 2019-12-01 06:59:29
In Archetypes, in order to move a field from a fieldset (or schemata) to another, we can do the following: schema['creators'].schemata = 'default' However, I'm not achieving the same using Dexterity. I've tried using form hints. Ex: form.fieldset('default', fields=['creators'] ) I notice that it doesn't work because the field "creators" is unknown at this time. (The ownership behavior wasn't evaluated yet). Nevertheless, with form hints, I can move from "default" to another (eg. "ownership"). myfile = NamedFile(title=_(u"A file")) form.fieldset('ownership', fields=['myfile']) How can I do that

Moving fields between fieldsets on Dexterity

*爱你&永不变心* 提交于 2019-12-01 04:51:51
问题 In Archetypes, in order to move a field from a fieldset (or schemata) to another, we can do the following: schema['creators'].schemata = 'default' However, I'm not achieving the same using Dexterity. I've tried using form hints. Ex: form.fieldset('default', fields=['creators'] ) I notice that it doesn't work because the field "creators" is unknown at this time. (The ownership behavior wasn't evaluated yet). Nevertheless, with form hints, I can move from "default" to another (eg. "ownership").