You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Aleksandar Likic <al...@rogers.com> on 2005/11/06 18:49:43 UTC

Multiple source directories (again)

I am trying to find out how to tell maven 2 to compile multiple source
directories. I am using JAXB to generate code in target/src, and then
compile it together with the rest of the code. I could have multiple
projects, but it simply doesn't make sense to me to in this particular case.
The build process would become more complex to manage, with an extra
artifact that I don't want to have. Any ideas?


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


Re: Multiple source directories (again)

Posted by Alexandre Poitras <al...@gmail.com>.
A even better solution is to use the xjc plugin :
http://mojo.codehaus.org/xjc-maven-plugin/. I use it for my jaxb
transformations and it's work great. I can post you my pom tomorrow from my
job if you need a exemple to get it working.

On 11/6/05, Aleksandar Likic <al...@rogers.com> wrote:
>
> OK, I found it:
>
> <sourceDirectory>.</sourceDirectory>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-compiler-plugin</artifactId>
> <version>2.0</version>
> <configuration>
> <source>1.5</source>
> <target>1.5</target>
> <includes>
> <include
> implementation="java.lang.String">src/main/java/**/*.java</include>
> <include
> implementation="java.lang.String">target/schema-src/**/*.java</include>
> </includes>
> <testIncludes>
> <testInclude
> implementation="java.lang.String">src/test/java/**/*.java</testInclude>
> </testIncludes>
> </configuration>
> </plugin>
>
> -----Original Message-----
> From: Aleksandar Likic [mailto:aleksandar.likic@rogers.com]
> Sent: Sunday, November 06, 2005 12:50 PM
> To: users@maven.apache.org
> Subject: Multiple source directories (again)
>
>
> I am trying to find out how to tell maven 2 to compile multiple source
> directories. I am using JAXB to generate code in target/src, and then
> compile it together with the rest of the code. I could have multiple
> projects, but it simply doesn't make sense to me to in this particular
> case.
> The build process would become more complex to manage, with an extra
> artifact that I don't want to have. Any ideas?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


--
Alexandre Poitras
Québec, Canada

RE: Multiple source directories (again)

Posted by hamdard <hs...@tiscali.co.uk>.
I think where you have to do:

<sourceDirectory>.</sourceDirectory>

you also have to specify the same for testSourceDirectory, e.g.:

<testSourceDirectory>.</testSourceDirectory>

and then rest is same...


--
View this message in context: http://www.nabble.com/Multiple+source+directories+%28again%29-t501592.html#a4635171
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: Multiple source directories (again)

Posted by Aleksandar Likic <al...@rogers.com>.
OK, I found it:

        <sourceDirectory>.</sourceDirectory>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.0</version>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                    <includes>
                        <include
implementation="java.lang.String">src/main/java/**/*.java</include>
                        <include
implementation="java.lang.String">target/schema-src/**/*.java</include>
                    </includes>
                    <testIncludes>
                        <testInclude
implementation="java.lang.String">src/test/java/**/*.java</testInclude>
                    </testIncludes>
                </configuration>
            </plugin>

-----Original Message-----
From: Aleksandar Likic [mailto:aleksandar.likic@rogers.com]
Sent: Sunday, November 06, 2005 12:50 PM
To: users@maven.apache.org
Subject: Multiple source directories (again)


I am trying to find out how to tell maven 2 to compile multiple source
directories. I am using JAXB to generate code in target/src, and then
compile it together with the rest of the code. I could have multiple
projects, but it simply doesn't make sense to me to in this particular case.
The build process would become more complex to manage, with an extra
artifact that I don't want to have. Any ideas?


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