You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Mick Knutson <mi...@gmail.com> on 2007/02/22 21:21:13 UTC

strange hibernatedoclet and war not adding hbm files

I have hibernatedoclet generating several hbm files from my DAO.jar and
adding them to my common-jar module. Seems to be an issue with Xdoclet1 &
Maven.
No matter, my app.war seems to suck in the 1st hbm file but not the rest
into the webapp/classes/....*

What am I missing to get all the hbm files included?



                <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="${
project.build.outputDirectory}"

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>





-- 
---
Thanks,
Mick Knutson

http://www.baselogic.com
http://www.blincmagazine.com
http://www.djmick.com
http://www.myspace.com/djmick_dot_com
http://www.thumpradio.com
---

Re: [m2] strange hibernatedoclet and war not adding hbm files

Posted by Eus <so...@member.fsf.org>.
Are you using Maven2?
If yes, it is better if you run XDoclet using maven-antrun-plugin.
This link (http://www.nabble.com/-M2--Struts-and-XDoclet-t1775233.html)
gives the reason.

Also, below is the relevant part of my pom.xml that I use to generate my
web.xml (using webdoclet).
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.1</version>
        <executions>
          <execution>
            <id>xdoclet-processing</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>run</goal>
            </goals>      
            <configuration>
              <tasks>            
                <taskdef name="webdoclet"
                         classname="xdoclet.modules.web.WebDocletTask">
                  <classpath refid="maven.compile.classpath"/>
                </taskdef>
                
                <webdoclet destDir="${basedir}/src/main/webapp/WEB-INF">
                  <fileset dir="${basedir}/src/main/java"
includes="**/*.java"/>
                  <deploymentdescriptor
destDir="${basedir}/src/main/webapp/WEB-INF" />
                </webdoclet>

              </tasks>
            </configuration>
          </execution>
        </executions>
      </plugin>
    ...
    </plugins>
  </build>
  ...
  <dependencies>
    ...
    <dependency>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-antrun-plugin</artifactId>
      <version>1.1</version>
    </dependency>
    <dependency>
      <groupId>xdoclet</groupId>
      <artifactId>xdoclet</artifactId>
      <version>1.2.3</version>
    </dependency>
    <dependency>
      <groupId>xdoclet</groupId>
      <artifactId>xjavadoc</artifactId>
      <version>1.1</version>
    </dependency>
    <dependency>
      <groupId>xdoclet</groupId>
      <artifactId>xdoclet-web-module</artifactId>
      <version>1.2.3</version>
    </dependency>
  </dependencies>

HTH.


Mick Knutson-4 wrote:
> 
> I have hibernatedoclet generating several hbm files from my DAO.jar and
> adding them to my common-jar module. Seems to be an issue with Xdoclet1 &
> Maven.
> No matter, my app.war seems to suck in the 1st hbm file but not the rest
> into the webapp/classes/....*
> 
> What am I missing to get all the hbm files included?
> 
> 
> 
>                 <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="${
> project.build.outputDirectory}"
> 
> 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>
> 
> 
> 
> 
> 
> -- 
> ---
> Thanks,
> Mick Knutson
> 
> http://www.baselogic.com
> http://www.blincmagazine.com
> http://www.djmick.com
> http://www.myspace.com/djmick_dot_com
> http://www.thumpradio.com
> ---
> 
> 

-- 
View this message in context: http://www.nabble.com/strange-hibernatedoclet-and-war-not-adding-hbm-files-tf3275025s177.html#a9114252
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org