Hi,

I'm trying to get the hibernatedoclet-maven-plugin from Ashley Williams to 
work. I built the hibernatedoclet-maven-plugin and mant project after svn 
checkout. I installed the plugin into my local repo :

/home/koen/.m2/repository/org/codehaus/mojo/hibernatedoclet-maven-plugin/1.0-beta-1/hibernatedoclet-maven-plugin-1.0-beta-1.pom

Next when I try to run 

mvn -e org.codehaus.mojo:hibernatedoclet-maven-plugin:hibernatedoclet        

I get 

...................
[INFO] 
----------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] 
----------------------------------------------------------------------------
[INFO] One or more required plugin parameters are invalid/missing for 
'hibernatedoclet:hibernatedoclet'

[0] inside the definition for plugin: 'hibernatedoclet-maven-plugin'specify 
the following:

<configuration>
  ...
  <task>VALUE</task>
</configuration>.

[INFO] 
----------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error configuring: 
org.codehaus.mojo:hibernatedoclet-maven-plugin. Reason: Invalid or missing 
parameters: [Mojo parameter [name: 'task'; alias: 'null']] for mojo: 
org.codehaus.mojo:hibernatedoclet-maven-plugin:1.0-beta-1:hibernatedoclet
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:485)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:455)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)


This is the relevant path of the pom.xml 

        <build>
                <plugins>
                        <plugin>
                                <groupId>org.codehaus.mojo</groupId>
                                
<artifactId>hibernatedoclet-maven-plugin</artifactId>
                                <version>1.0-beta-1</version>
                                <executions>
                                        <execution>
                                                <goals>
                                                        
<goal>hibernatedoclet</goal>
                                                </goals>
                                                <phase>generate-sources</phase>
                                                <configuration>
                                                        <task>
                                                                <![CDATA[ 
                                                                        
<hibernatedoclet> 
                                                                        
<fileset includes="**/model/*.java"/> 
                                                                        
<hibernate version="2.1"/> 
                                                                        
</hibernatedoclet> 
                                                                        ]]>
                                                        </task>
                                                </configuration>
                                        </execution>
                                </executions>
                        </plugin>
                </plugins>
        </build>

And I think this is the relevant part of the code 
    public void execute()
        throws MojoExecutionException, MojoFailureException
    {
        String[] mappings = new String[] {
            "@destDir", MantGoal.WEB_INF_GEN,
            "fileset/@dir", MantGoal.JAVA,
        //            ,
        //            "deploymentdescriptor/@destDir", MantGoal.META_INF_GEN,
        //            "jboss/@destDir",                MantGoal.META_INF_GEN
        };
        MantGoal goal = new MantGoal( this, project, 
"xdoclet.modules.hibernate.HibernateDocletTask", task, mappings );
        goal.execute( "xdoclet.class.path" );
    }

I see that the mapping has 2 elements but how to map things is not clear to 
me ?? Can anybody (or better Ashley) help get on with my problem.
My final goal is to generate the hbm.xml mappings from the code.


thx,

koen

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to