[hibernate-issues] [Hibernate-JIRA] Updated: (HV-137) Create a Hibernate Validator maven archetype

Gunnar Morling (JIRA) noreply at atlassian.com
Mon Apr 13 10:46:17 EDT 2009


     [ http://opensource.atlassian.com/projects/hibernate/browse/HV-137?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gunnar Morling updated HV-137:
------------------------------

    Attachment: archetype.patch

Hardy,

please find attached my patch for the HV archetype. Upon instantiation it will create a project with the Car and CarTest classes from the "Getting started" section of the reference guide.

I'm not yet totally sure about a versioning scheme for the archetype. I think in the projects created by the archetype always the newest HV version should be referenced, which probably means that also a new version of the archetype project is required, whenever a new HV version comes out.

Therefore I added the archetype project as module to the parent POM.

The HV version is hard-coded to 4.0.0.Beta1-SNAPSHOT in archetype-resources/pom.xml for now. If we decide to update the archetype with each new HV version, here the HV version as specified in the parent POM could be used, but unfortunately right now I am not aware of any way to reference this version in the pom.xml for the instance projects (filtering the pom.xml doesn't seem to work as expected).

Another question is how users should reference the archetype. I like the concept of archetype catalogs. If a file archetype-catalog.xml with the contents

<?xml version="1.0" encoding="UTF-8"?>
<archetype-catalog>
  <archetypes>
    <archetype>
		<groupId>org.hibernate</groupId>
		<artifactId>hibernate-validator-archetype</artifactId>
		<version>LATEST</version>
		<repository>http://repository.jboss.com/maven2/</repository>
		<description>Archetype for creating the Hibernate Validator Quickstart project</description>
    </archetype>
  </archetypes>
</archetype-catalog>

was published to the JBoss Maven repository, end users could use the archetype as follows:

mvn archetype:generate -DarchetypeCatalog=http://repository.jboss.com/maven2/archetype-catalog.xml

WDYT?

Gunnar


> Create a Hibernate Validator maven archetype
> --------------------------------------------
>
>                 Key: HV-137
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-137
>             Project: Hibernate Validator
>          Issue Type: Task
>          Components: documentation
>            Reporter: Hardy Ferentschik
>             Fix For: 4.0.0.Beta1
>
>         Attachments: archetype.patch
>
>
> Creating and deploying a HV maven archetype will make it even easier for people to get started and we can use the archetype to keep some of the example classes.
> We can add the archetype just as another submodule

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list