epugh 2004/07/01 23:16:57 Modified: hibernate plugin.jelly Added: hibernate/src/plugin-test/src/main hibernate.properties hibernate/src/plugin-test project.properties maven.xml project.xml hibernate/src/plugin-test/src/main/org/apache/maven/hibernate Item.java Item.hbm.xml Log: Add test project to verify plugin works. Revision Changes Path 1.1 maven-plugins/hibernate/src/plugin-test/src/main/hibernate.properties Index: hibernate.properties =================================================================== 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:. 1.1 maven-plugins/hibernate/src/plugin-test/project.properties Index: project.properties =================================================================== maven.hibernate.properties=src/main/hibernate.properties maven.hibernate.quiet=false 1.1 maven-plugins/hibernate/src/plugin-test/maven.xml Index: maven.xml =================================================================== <!-- /* * 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> 1.1 maven-plugins/hibernate/src/plugin-test/project.xml Index: project.xml =================================================================== <?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:[EMAIL PROTECTED]:/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>[EMAIL PROTECTED]</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> 1.1 maven-plugins/hibernate/src/plugin-test/src/main/org/apache/maven/hibernate/Item.java Index: Item.java =================================================================== 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:[EMAIL PROTECTED]">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; } } 1.1 maven-plugins/hibernate/src/plugin-test/src/main/org/apache/maven/hibernate/Item.hbm.xml Index: Item.hbm.xml =================================================================== <?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> 1.5 +2 -2 maven-plugins/hibernate/plugin.jelly Index: plugin.jelly =================================================================== RCS file: /home/cvs/maven-plugins/hibernate/plugin.jelly,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- plugin.jelly 4 Mar 2004 18:13:45 -0000 1.4 +++ plugin.jelly 2 Jul 2004 06:16:57 -0000 1.5 @@ -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}"/>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]