You can place your generated resources anywhere in target...

but to include it in your package, you need to tell the resources plugin where to look for the resources... which is configured in your pom.xml

<project>
 <build>
   <resources>
     <resource/>  <-- here
   </resources>
 </build>
</project>


please see: http://maven.apache.org/ref/current/maven-model/maven.html#class_resource


Sean McNamara wrote:
Thanks Mike.  I didn't realize we were setting the output path for the 
generated hibernate files since /target/resources seemed like it could be a 
reasonable default.

Changed that to create them in /target/classes, and the jar looks good.

Does that mean there isn't a standard area for generated resources under 
/target, and that generated files should always be created in the classes dir?

Thanks again.

----- Original Message ----
From: Mike Perham <[EMAIL PROTECTED]>
To: Maven Users List <users@maven.apache.org>
Sent: Tuesday, June 20, 2006 12:36:58 PM
Subject: RE: Adding hibernate generated resources to JAR?

We just output to target/classes:

    <build>
      <plugins>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>xdoclet-maven-plugin</artifactId>
          <executions>
            <execution>
              <phase>test-compile</phase>
              <goals>
                <goal>xdoclet</goal>
              </goals>
              <configuration>
                <tasks>
                  <hibernatedoclet
destdir="${project.build.outputDirectory}"
excludedtags="@version,@author,@todo,@see,@desc" verbose="true">
              <fileset
dir="${project.build.sourceDirectory}">
                      <include name="**/domain/*.java" />
                    </fileset>
                    <hibernate version="3.0"
destdir="${project.build.outputDirectory}" />
                  </hibernatedoclet>
                </tasks>
              </configuration>
            </execution>
          </executions>
        </plugin>
      </plugins>
  </build>

-----Original Message-----
From: Sean McNamara [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 20, 2006 11:54 AM
To: users@maven.apache.org
Subject: Adding hibernate generated resources to JAR?

Can someone point me in the right direction here:

I'm building a jar that makes use of hibernate. The hibernate class descriptors are created in /target/resources, but are not included in the jar.

I'm guessing I need to add a configuration for the maven-resources-plugin to add /target/resources as a resource patch, but I'm not finding the docs for that plugin (they appear to be empty on the maven plugins doc site.)

Any tips appreciated.





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



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





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


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

Reply via email to