You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Andrew Strickland <as...@oberonassociates.com> on 2007/09/25 21:14:19 UTC
Maven not compiling source under generated-sources
Hi all,
I am developing a "wsdl first" web service ( and client ). I use the Axis2 ant task to generate the java source for the web service from the wsdl and place it in the target/generated-sources directory. However, Maven is not compiling the generated source under the target/generated-sources directory. I should mention I'm using Maven 2.0.5, Red Hat Developer Studio beta1, Java 1.5, Axis2 1.3.
Why isn't Maven compiling these generated sources?
Here is a snippet from the POM:
Note: the "generate-sources" ant target is invoking the axis2 codegen task. This outputs the source into the target/generated-sources directory. Maven is not compiling these into class files.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>xxx.xxx.xxx</groupId>
<artifactId>OrderStatus-Client</artifactId>
<packaging>jar</packaging>
<name>Order Status Client</name>
<description>An Order Status business service client.</description>
<version>0.1</version>
<properties>
<dataBinding>xmlbeans</dataBinding>
</properties>
<profiles>
<profile>
<id>xmlbeans</id>
<properties>
<dataBinding>xmlbeans</dataBinding>
</properties>
</profile>
<profile>
<id>adb</id>
<properties>
<dataBinding>adb</dataBinding>
</properties>
</profile>
</profiles>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>unzip</id>
<phase>generate-sources</phase>
<configuration>
<tasks>
<property name="compile_classpath"
refid="maven.compile.classpath" />
<property name="dataBinding"
value="${dataBinding}" />
<ant antfile="${basedir}/build.xml"
dir="${basedir}">
<target name="generate-sources" />
</ant>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
...
</project>
Re: Maven not compiling source under generated-sources
Posted by Wayne Fay <wa...@gmail.com>.
Or use build-helper-m-p to attach gen-src to build...
Wayne
On 9/25/07, nick_stolwijk@planet.nl <ni...@planet.nl> wrote:
> That's by design. ;) Seriously, the plugins, which generates sourcecode normally place their code in a subdirectory of target/generated-sources and add that directory to the compiler. Your ant task doesn't add a directory to the compiler plugin. Can you take a look at the axis2 maven plugin[1]?
>
> Hth,
>
> Nick Stolwijk
>
> [1] http://ws.apache.org/axis2/tools/1_2/maven-plugins/maven-wsdl2code-plugin.html
>
> -----Original Message-----
> From: Andrew Strickland [mailto:astrickland@oberonassociates.com]
> Sent: Tue 9/25/2007 9:14 PM
> To: users@maven.apache.org
> Subject: Maven not compiling source under generated-sources
>
> Hi all,
>
> I am developing a "wsdl first" web service ( and client ). I use the Axis2 ant task to generate the java source for the web service from the wsdl and place it in the target/generated-sources directory. However, Maven is not compiling the generated source under the target/generated-sources directory. I should mention I'm using Maven 2.0.5, Red Hat Developer Studio beta1, Java 1.5, Axis2 1.3.
>
> Why isn't Maven compiling these generated sources?
>
> Here is a snippet from the POM:
>
> Note: the "generate-sources" ant target is invoking the axis2 codegen task. This outputs the source into the target/generated-sources directory. Maven is not compiling these into class files.
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <project xmlns="http://maven.apache.org/POM/4.0.0"
>
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
>
> <modelVersion>4.0.0</modelVersion>
>
> <groupId>xxx.xxx.xxx</groupId>
>
> <artifactId>OrderStatus-Client</artifactId>
>
> <packaging>jar</packaging>
>
> <name>Order Status Client</name>
>
> <description>An Order Status business service client.</description>
>
> <version>0.1</version>
>
> <properties>
>
> <dataBinding>xmlbeans</dataBinding>
>
> </properties>
>
> <profiles>
>
> <profile>
>
> <id>xmlbeans</id>
>
> <properties>
>
> <dataBinding>xmlbeans</dataBinding>
>
> </properties>
>
> </profile>
>
> <profile>
>
> <id>adb</id>
>
> <properties>
>
> <dataBinding>adb</dataBinding>
>
> </properties>
>
> </profile>
>
> </profiles>
>
> <build>
>
> <plugins>
>
> <plugin>
>
> <groupId>org.apache.maven.plugins</groupId>
>
> <artifactId>maven-antrun-plugin</artifactId>
>
> <executions>
>
> <execution>
>
> <id>unzip</id>
>
> <phase>generate-sources</phase>
>
> <configuration>
>
> <tasks>
>
> <property name="compile_classpath"
>
> refid="maven.compile.classpath" />
>
> <property name="dataBinding"
>
> value="${dataBinding}" />
>
> <ant antfile="${basedir}/build.xml"
>
> dir="${basedir}">
>
> <target name="generate-sources" />
>
> </ant>
>
> </tasks>
>
> </configuration>
>
> <goals>
>
> <goal>run</goal>
>
> </goals>
>
> </execution>
>
> </executions>
>
> </plugin>
>
> </plugins>
>
> </build>
>
> ...
>
> </project>
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: Maven not compiling source under generated-sources
Posted by ni...@planet.nl.
That's by design. ;) Seriously, the plugins, which generates sourcecode normally place their code in a subdirectory of target/generated-sources and add that directory to the compiler. Your ant task doesn't add a directory to the compiler plugin. Can you take a look at the axis2 maven plugin[1]?
Hth,
Nick Stolwijk
[1] http://ws.apache.org/axis2/tools/1_2/maven-plugins/maven-wsdl2code-plugin.html
-----Original Message-----
From: Andrew Strickland [mailto:astrickland@oberonassociates.com]
Sent: Tue 9/25/2007 9:14 PM
To: users@maven.apache.org
Subject: Maven not compiling source under generated-sources
Hi all,
I am developing a "wsdl first" web service ( and client ). I use the Axis2 ant task to generate the java source for the web service from the wsdl and place it in the target/generated-sources directory. However, Maven is not compiling the generated source under the target/generated-sources directory. I should mention I'm using Maven 2.0.5, Red Hat Developer Studio beta1, Java 1.5, Axis2 1.3.
Why isn't Maven compiling these generated sources?
Here is a snippet from the POM:
Note: the "generate-sources" ant target is invoking the axis2 codegen task. This outputs the source into the target/generated-sources directory. Maven is not compiling these into class files.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>xxx.xxx.xxx</groupId>
<artifactId>OrderStatus-Client</artifactId>
<packaging>jar</packaging>
<name>Order Status Client</name>
<description>An Order Status business service client.</description>
<version>0.1</version>
<properties>
<dataBinding>xmlbeans</dataBinding>
</properties>
<profiles>
<profile>
<id>xmlbeans</id>
<properties>
<dataBinding>xmlbeans</dataBinding>
</properties>
</profile>
<profile>
<id>adb</id>
<properties>
<dataBinding>adb</dataBinding>
</properties>
</profile>
</profiles>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>unzip</id>
<phase>generate-sources</phase>
<configuration>
<tasks>
<property name="compile_classpath"
refid="maven.compile.classpath" />
<property name="dataBinding"
value="${dataBinding}" />
<ant antfile="${basedir}/build.xml"
dir="${basedir}">
<target name="generate-sources" />
</ant>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
...
</project>