Hi Mick! I've followed your suggestion, but, now I've been facing the
following error.
How can I set up ANT_OPTS to solve this problem?
Check it out the error message!
Regards,
Roberto.
[DEBUG] (f) tasks =
[DEBUG] -- end configuration --
[INFO] [xdoclet:xdoclet {execution: default}]
[INFO] Initializing DocletTasks!!!
[INFO] Executing tasks
[DEBUG] getProperty(ns=null, name=ant.reuse.loader, user=false)
25/01/2007 10:03:55 xdoclet.XDocletMain start
INFO: Executando <hibernate/>
Java heap space
ParameterImpl instances: 20
MethodImpl instances: 5776
ConstructorImpl instances: 381
SimpleNode instances: 0
SourceClass instances: 549
XDoc instances: 0
DefaultXTag instances: 0
BinaryClass instances: 73
UnknownClass instances: 45
Total memory: 63
Free memory: 0
Try to increase heap size. Can be done by defining ANT_OPTS=-Xmx640m
See the JDK tooldocs.
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error executing ant tasks
Embedded error: Java heap space
[INFO]
------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant
task
s
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
(Defa
ultLifecycleExecutor.java:559)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:475)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal
(Defau
ltLifecycleExecutor.java:454)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:306)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:273)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
(DefaultLi
fecycleExecutor.java:140)
On 1/24/07, Mick Knutson <[EMAIL PROTECTED]> wrote:
<!--
=======================================================-->
<!-- XDoclet Plugin -->
<!--
=======================================================-->
<!--
This plugin will ...
-->
<!--
=======================================================-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xdoclet-maven-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>xdoclet</goal>
</goals>
<configuration>
<tasks>
<hibernatedoclet
destdir="${basedir}/src/main/resources"
mergedir="${basedir}/src/main/resources"
excludedtags="@version,@author,@todo,@see,@desc"
verbose="true">
<fileset
dir="${basedir}/src/main/java">
<include name="**/*.java"/>
</fileset>
<hibernate version="3.0"/>
</hibernatedoclet>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
Then the JavaBean:
package org.delta.provider.npi.data;
import org.delta.provider.npi.BaseObject;
/**
* Simple JavaBean domain object representing the static plans.
*
* @author Martin Eggenberger
* Documentation Started on 18/01/07 Manindar
*
* @hibernate.class table = "PLAN" polymorphism="explicit"
* @hibernate.cache usage = "read-write" lazy="false"
*
*/
public class Plan extends BaseObject {
/**
* planCode.
*/
private String planCode;
/**
* Description of plan.
*/
private String planDescription;
/**
* Getter method for planCode.
*
* @return String - Plan code
*
* @hibernate.id column="PLANCODE"
* generator-class="assigned"
*
* @hibernate.property column="PLANCODE"
*/
public final String getPlanCode() {
return planCode;
}
/**
* Setter method for planCode.
*
* @param planCode - String Plan code to set.
*/
public final void setPlanCode(final String planCode) {
this.planCode = planCode;
}
/**
* Getter method for PlanDescription.
*
* @return String - Plan code Description
*
* @hibernate.property column="PLANDESCRIPTION"
*/
public final String getPlanDescription() {
return planDescription;
}
/**
* Setter method for PlanDescription.
*
* @param planDescription - String planDescription to set.
*/
public final void setPlanDescription(final String planDescription) {
this.planDescription = planDescription;
}
}
Go to the xdoclet site to see more detailed description of the annotation
tags...
On 1/24/07, Roberto UserList <[EMAIL PROTECTED]> wrote:
>
> Hi all, I want to generate Hibernate mapping files from xdoclet
annotated
> JavaBeans. Which pluging I could use to do this and where I find some
> documentation.
> Thanks in advance for help.
> Regards,
> Roberto.
>
>
--
Thanks
DJ MICK
(Mick Knutson)
http://www.djmick.com
http://www.myspace.com/djmick_dot_com
http://www.thumpradio.com