You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by ozeebee <oz...@gmail.com> on 2006/05/26 10:48:37 UTC

[m2] XDoclet generated resources problem

Hi,

I'm using the XDoclet plugin to generate several sources and (hibernate)
resources (mapping files *.hbm.xml).
The sources are generated in /target/generated-sources/xdoclet and the
resources are created in /target/generated-resources/xdoclet as expected.
For some reason, the resources files are NOT being put in the Test classpath
and NOT included in the package (while the sources do) !!?!

Any good reason for that ??
Of course, I have added a <build/resources/resource> element to my pom to
work around this but why the hell do these xml files get ignored ?
Is it a bug ? 

Any explanation would be welcome.
thanks in advance

cheers,
Ozeebee.






--
View this message in context: http://www.nabble.com/-m2-+XDoclet+generated+resources+problem-t1685663.html#a4572700
Sent from the Maven - Users forum at Nabble.com.


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


Re: [m2] XDoclet generated resources problem

Posted by Kenney Westerhof <ke...@apache.org>.
On Thu, 1 Jun 2006, ozeebee wrote:

Hi,

>
> Ok thanks
>
> I was just wondering why the xdoclet plugin was adding the
> "generated-sources/xdoclet" dir to the maven sources but not the
> "generated-resources/xdoclet" to the resources ....
>

It's because I'm lazy. :)

File a JIRA issue and it'll get fixed.

Thanks,

	Kenney


>
> --
> View this message in context: http://www.nabble.com/-m2-+XDoclet+generated+resources+problem-t1685663.html#a4660881
> Sent from the Maven - Users forum at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key

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


Re: [m2] XDoclet generated resources problem

Posted by ozeebee <oz...@gmail.com>.
Ok thanks

I was just wondering why the xdoclet plugin was adding the
"generated-sources/xdoclet" dir to the maven sources but not the
"generated-resources/xdoclet" to the resources ....


--
View this message in context: http://www.nabble.com/-m2-+XDoclet+generated+resources+problem-t1685663.html#a4660881
Sent from the Maven - Users forum at Nabble.com.


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


Re: [m2] XDoclet generated resources problem

Posted by Jorg Heymans <jo...@gmail.com>.
You need to specify the xdoclet directory as a resource dir:

      <resource>
        <directory>src/main/resources</directory>
      </resource>
      <resource>
        <directory>${project.build.outputDirectory
}/generated-sources/xdoclet</directory>
      </resource>

and because at that point you're overriding the resources element you should
put in the default src/main/resources as well.

HTH
Jorg

On 5/26/06, ozeebee <oz...@gmail.com> wrote:
>
>
> the hbm.xmls are correctly generated in the
> /target/genereated-resources/xdoclet directory.
> then I expect maven to include all these resources in my classpath and in
> my
> package but it does not.
>
> Here's my (part of) my xdoclet config:
>
>         ...
>         <!-- Generate Hibernate files -->
>         <hibernatedoclet destdir="${xdoclet.generatedResources}"
> mergedir="${basedir}/src/xdoclet"
>                         verbose="true" force="false">
>                 <fileset dir="${basedir}/src/main/java">
>                         <include name="**/model/*.java"/>
>                 </fileset>
>                 <hibernate destdir="${xdoclet.generatedResources}"
>                         version="3.0"/>
>         </hibernatedoclet>
>         ...
>
> where ${xdoclet.generatedResources} property is defined in my parent
> project
> pom as :
>
> <xdoclet.generatedResources>${project.build.directory
> }/generated-resources/xdoclet</xdoclet.generatedResources>
>
> thanks for your time
> Ozeebee
>
>
> --
> View this message in context:
> http://www.nabble.com/-m2-+XDoclet+generated+resources+problem-t1685663.html#a4576681
> Sent from the Maven - Users forum at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

RE: [m2] XDoclet generated resources problem

Posted by ozeebee <oz...@gmail.com>.
the hbm.xmls are correctly generated in the
/target/genereated-resources/xdoclet directory.
then I expect maven to include all these resources in my classpath and in my
package but it does not.

Here's my (part of) my xdoclet config:

	...
	<!-- Generate Hibernate files -->
	<hibernatedoclet destdir="${xdoclet.generatedResources}"
mergedir="${basedir}/src/xdoclet"
			verbose="true" force="false">
		<fileset dir="${basedir}/src/main/java">
			<include name="**/model/*.java"/>
		</fileset>
		<hibernate destdir="${xdoclet.generatedResources}"
			version="3.0"/>
	</hibernatedoclet>
	...

where ${xdoclet.generatedResources} property is defined in my parent project
pom as :

<xdoclet.generatedResources>${project.build.directory}/generated-resources/xdoclet</xdoclet.generatedResources>

thanks for your time
Ozeebee


--
View this message in context: http://www.nabble.com/-m2-+XDoclet+generated+resources+problem-t1685663.html#a4576681
Sent from the Maven - Users forum at Nabble.com.


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