Add test project to verify plugin works.
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@115619 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
1 parent
ee3d095105
commit
a91fb95682
7 files changed
+278
-2
No files matched your search
@@ -21,7 +21,7 @@
|
||||
<project
|
||||
xmlns:j="jelly:core"
|
||||
xmlns:ant="jelly:ant"
|
||||
xmlns:h="jelly:org.apache.maven.hibernate.jelly.HibernateTagLibrary">>
|
||||
xmlns:h="jelly:org.apache.maven.hibernate.jelly.HibernateTagLibrary">
|
||||
|
||||
<goal name="hibernate:init">
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
|
||||
|
||||
<goal name="hibernate:schema-export" prereqs="hibernate:init">
|
||||
<goal name="hibernate:schema-export" prereqs="hibernate:init" description="Export Hibernate schema">
|
||||
|
||||
<ant:echo>Exporting Hibernate Schema file</ant:echo>
|
||||
<ant:mkdir dir="${maven.hibernate.output.dir}"/>
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
<!--
|
||||
/*
|
||||
* Copyright 2001-2004 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
-->
|
||||
<project xmlns:util="jelly:util"
|
||||
xmlns:j="jelly:core"
|
||||
xmlns:ant="jelly:ant"
|
||||
xmlns:assert="assert">
|
||||
|
||||
<goal name="testPlugin" prereqs="test-hibernate-schema-export">
|
||||
<attainGoal name="clean"/>
|
||||
</goal>
|
||||
|
||||
<goal name="test-hibernate-schema-export">
|
||||
<attainGoal name="jar"/>
|
||||
<attainGoal name="hibernate:schema-export"/>
|
||||
|
||||
<assert:assertFileExists file="${maven.hibernate.output.file}"/>
|
||||
|
||||
</goal>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,2 @@
|
||||
maven.hibernate.properties=src/main/hibernate.properties
|
||||
maven.hibernate.quiet=false
|
||||
@@ -0,0 +1,160 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
/*
|
||||
* Copyright 2001-2004 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
-->
|
||||
|
||||
|
||||
<project>
|
||||
<pomVersion>3</pomVersion>
|
||||
<id>test-maven-hibernate-plugin</id>
|
||||
<name>Test project for Maven Hibernate</name>
|
||||
<groupId>maven</groupId>
|
||||
<currentVersion>1.0-SNAPSHOT</currentVersion>
|
||||
<organization>
|
||||
<name>Apache Software Foundation</name>
|
||||
<url>http://www.apache.org/</url>
|
||||
<logo>http://maven.apache.org/images/jakarta-logo-blue.gif</logo>
|
||||
</organization>
|
||||
<inceptionYear>2001</inceptionYear>
|
||||
<package>org.apache.maven</package>
|
||||
<logo>http://maven.apache.org/images/maven.jpg</logo>
|
||||
<description>Test for Maven Hibernate plugin</description>
|
||||
<shortDescription>Test for Maven Hibernate plugin</shortDescription>
|
||||
<url>http://maven.apache.org/reference/plugins/hibernate/</url>
|
||||
<siteDirectory>/www/maven.apache.org/reference/plugins/hibernate/</siteDirectory>
|
||||
<repository>
|
||||
<connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:maven-plugins/hibernate/src/plugin-test</connection>
|
||||
<url>http://cvs.apache.org/viewcvs/maven-plugins/hibernate/src/plugin-test</url>
|
||||
</repository>
|
||||
<developers>
|
||||
<developer>
|
||||
<name>Eric Pugh</name>
|
||||
<id>epugh</id>
|
||||
<email>epugh@opensourceconnections.com</email>
|
||||
<organization>OpenSource Connections</organization>
|
||||
<roles>
|
||||
<role>Developer</role>
|
||||
</roles>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>hsqldb</groupId>
|
||||
<artifactId>hsqldb</artifactId>
|
||||
<version>1.7.1</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>hibernate</groupId>
|
||||
<artifactId>hibernate</artifactId>
|
||||
<version>2.1.3</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ant</groupId>
|
||||
<artifactId>ant</artifactId>
|
||||
<version>1.5.3-1</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-jelly</groupId>
|
||||
<artifactId>commons-jelly</artifactId>
|
||||
<version>20030902.160215</version>
|
||||
<url>http://jakarta.apache.org/commons/jelly/</url>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
<version>2.0</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-beanutils</groupId>
|
||||
<artifactId>commons-beanutils</artifactId>
|
||||
<version>1.6.1</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-dbcp</groupId>
|
||||
<artifactId>commons-dbcp</artifactId>
|
||||
<version>1.1</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-collections</groupId>
|
||||
<artifactId>commons-collections</artifactId>
|
||||
<version>2.1</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-logging</groupId>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
<version>1.0.3</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-pool</groupId>
|
||||
<artifactId>commons-pool</artifactId>
|
||||
<version>1.1</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.8</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>xml-apis</groupId>
|
||||
<artifactId>xml-apis</artifactId>
|
||||
<version>1.0.b2</version>
|
||||
<url>http://xml.apache.org/xerces2-j/</url>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>xerces</groupId>
|
||||
<artifactId>xerces</artifactId>
|
||||
<version>2.4.0</version>
|
||||
<url>http://xml.apache.org/xerces2-j/</url>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>odmg</groupId>
|
||||
<artifactId>odmg</artifactId>
|
||||
<version>3.0</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>dom4j</groupId>
|
||||
<artifactId>dom4j</artifactId>
|
||||
<version>1.4</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<sourceDirectory>src/main</sourceDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
</project>
|
||||
@@ -0,0 +1,7 @@
|
||||
hibernate.dialect net.sf.hibernate.dialect.HSQLDialect
|
||||
hibernate.connection.driver_class org.hsqldb.jdbcDriver
|
||||
hibernate.connection.username sa
|
||||
hibernate.connection.password
|
||||
hibernate.connection.url jdbc:hsqldb:hsql://localhost
|
||||
hibernate.connection.url jdbc:hsqldb:test
|
||||
hibernate.connection.url jdbc:hsqldb:.
|
||||
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC
|
||||
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
|
||||
|
||||
<hibernate-mapping auto-import="false">
|
||||
|
||||
<class name="org.apache.maven.hibernate.Item" table="Item" >
|
||||
<id name="id" type="int" column="ID" unsaved-value="0">
|
||||
<generator class="native"/>
|
||||
</id>
|
||||
<property name="name" column="NAME" type="string"/>
|
||||
|
||||
</class>
|
||||
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,56 @@
|
||||
package org.apache.maven.hibernate;
|
||||
|
||||
/* ====================================================================
|
||||
* Copyright 2001-2004 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* ====================================================================
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class to use with testing the plugin.
|
||||
*
|
||||
* @author <a href="mailto:epugh@opensourceconnections.com">Eric Pugh</a>
|
||||
*
|
||||
* @version $Id: Item.java,v 1.1 2004/07/02 06:16:56 epugh Exp $
|
||||
*/
|
||||
|
||||
public class Item {
|
||||
private int id;
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* @return Returns the id.
|
||||
*/
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
/**
|
||||
* @param id The id to set.
|
||||
*/
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
/**
|
||||
* @return Returns the name.
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
/**
|
||||
* @param name The name to set.
|
||||
*/
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user