You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jesse McConnell <je...@gmail.com> on 2005/07/29 20:48:41 UTC
Re: compiling source code from 2 different dirs
well, the xdoclet plugin should be calling
project.addCompileSourceRoot( outputDirectory );
in order to add the generated files to the compile phase..
mostly these are generated into target/generated-sources I believe,
that why they are blown away with the default clean targets. I don't
see source for the xdoclet plug in either mojo or the m2 repos though
so I can't say for sure.
but yes, it is easy to do
On 7/29/05, Adam Hardy <ad...@cyberspaceroad.com> wrote:
> Adam Hardy on 28/07/05 16:39, wrote:
> > (2) Even if I could get the xdoclet to run in m2, I can't figure out how
> > to include a second source directory (containing the xdoclet generated
> > classes). Is it just a comma-delimited list in the <sourceDirectory>
> > attribute of the pom?
>
> If I run xdoclet to generate some EJB code in a seperate directory (I
> don't want it in the version control system), can I get maven to compile
> it along with the normal code in src/main/java?
>
> As quoted in the paragraph above, I can't work out how to get m2 to do
> that.
>
> Or is it better to put it straight into the src/main/java tree with the
> rest? I could always tell cvs to ignore it - although this would be
> error prone.
>
> Thanks
> Adam
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
--
jesse mcconnell
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2] compiling from 2 different dirs
Posted by Jason van Zyl <ja...@maven.org>.
On Sun, 2005-07-31 at 14:51 +0100, Adam Hardy wrote:
> Sorry my mistake. maven-xdoclet-plugin is calling
> project.addCompileSourceRoot() but in its current version, it does not
> accept any config, and the default
> ${project.build.directory}/generated-sources/xdoclet must be used.
>
> Just for anyone searching the mail archives with this problem.
This is typically the pattern employed by plug-ins generating sources.
Where the output is directed to:
${project.build.directory}/generated-sources/<plugin-id>
--
jvz.
Jason van Zyl
jason at maven.org
http://maven.apache.org
believe nothing, no matter where you read it,
or who has said it,
not even if i have said it,
unless it agrees with your own reason
and your own common sense.
-- Buddha
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2] compiling from 2 different dirs
Posted by Adam Hardy <ad...@cyberspaceroad.com>.
Sorry my mistake. maven-xdoclet-plugin is calling
project.addCompileSourceRoot() but in its current version, it does not
accept any config, and the default
${project.build.directory}/generated-sources/xdoclet must be used.
Just for anyone searching the mail archives with this problem.
Adam Hardy on 30/07/05 18:22, wrote:
> maven-xdoclet-plugin isn't calling project.addCompileSourceRoot()
>
> Unfortunately.
>
> How can I set this myself in my pom? I have played around with stuff
> like this:
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-compiler-plugin</artifactId>
> <configuration>
> <sourcePath>
> src/main/java
> </sourcePath>
> <sourcePath>
> ${project.build.directory}/generated-src
> </sourcePath>
> </configuration>
> </plugin>
>
> but i either get a Failure executing javac (but could not parse the
> error) or maven ignores it completely.
>
> Is there a way to do this for 2 directories?
>
> Adam
>
>
> Jesse McConnell on 29/07/05 19:48, wrote:
>
>> well, the xdoclet plugin should be calling
>> project.addCompileSourceRoot( outputDirectory );
>>
>> in order to add the generated files to the compile phase..
>>
>> mostly these are generated into target/generated-sources I believe,
>> that why they are blown away with the default clean targets. I don't
>> see source for the xdoclet plug in either mojo or the m2 repos though
>> so I can't say for sure.
>>
>> but yes, it is easy to do
>>
>>
>>
>> On 7/29/05, Adam Hardy <ad...@cyberspaceroad.com> wrote:
>>
>>> Adam Hardy on 28/07/05 16:39, wrote:
>>>
>>>> (2) Even if I could get the xdoclet to run in m2, I can't figure out
>>>> how to include a second source directory (containing the xdoclet
>>>> generated classes). Is it just a comma-delimited list in the
>>>> <sourceDirectory> attribute of the pom?
>>>
>>>
>>> If I run xdoclet to generate some EJB code in a seperate directory (I
>>> don't want it in the version control system), can I get maven to
>>> compile it along with the normal code in src/main/java?
>>>
>>> As quoted in the paragraph above, I can't work out how to get m2 to do
>>> that.
>>>
>>> Or is it better to put it straight into the src/main/java tree with
>>> the rest? I could always tell cvs to ignore it - although this would
>>> be error prone.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org