HI All,
I am using continuum version 1.2.2.
I have a generic pom that I use for automatically generating WSDL files from
API classes.
The pom contains the following build profile to add a provided dependency
based on some properties that are defined in maven projects that extend this
pom:
<!-- Current version -->
<modelVersion>4.0.0</modelVersion>
<groupId>mypackage</groupId>
<artifactId>generic_wsdl_generation</artifactId>
<packaging>pom</packaging>
<name>Generic WSDL generation module</name>
<version>1.1-SNAPSHOT</version>
<profiles>
<profile>
<activation>
<file>
<missing>src/file_to_disable_profile.txt</missing>
</file>
</activation>
<!-- Compile time dependencies -->
<dependencies>
<dependency>
<groupId>${impl.module.groupId}</groupId>
<artifactId>${impl.module.artifactId}</artifactId>
<version>${impl.module.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-java2wsdl-maven-plugin</artifactId>
<version>${guiproject.axis.version}</version>
<configuration>
<className>${impl.class.name}</className>
<outputFileName>target/classes/${service.name}.wsdl</outputFileName>
<serviceName>${service.name}</serviceName>
</configuration>
<executions>
<execution>
<goals>
<goal>java2wsdl</goal>
</goals>
</execution>
</executions>
<!-- Requires the actual API classses package -->
<dependencies>
<dependency>
<groupId>${impl.module.groupId}</groupId>
<artifactId>${impl.module.artifactId}</artifactId>
<version>${impl.module.version}</version>
</dependency>
</dependencies>
</plugin>
.
</profile>
</profiles>
When I build directly from maven, as the profile is not active (disabled by
the 'file_to_disable_profile.txt' file), the dependency is not added and
therefore I get no error that the system can't find the dependency. This is
what I would expect to happen in continuum.
However, when building from continuum, I get:
org.apache.maven.continuum.execution.ContinuumBuildExecutorException: Unable
to read the Maven project descriptor
'/usr/local/continuum/data/working-directory/128/pom.xml':
'dependencies.dependency.groupId' with value '${impl.module.groupId}' does
not match a valid id pattern.
Failed to validate POM for project mypackage:generic_wsdl_generation at
/usr/local/continuum/data/working-directory/128/pom.xml
at
org.apache.maven.continuum.execution.maven.m2.MavenTwoBuildExecutor.getMaven
Project(MavenTwoBuildExecutor.java:332)
at
org.apache.maven.continuum.execution.maven.m2.MavenTwoBuildExecutor.shouldBu
ild(MavenTwoBuildExecutor.java:410)
at
org.apache.maven.continuum.buildcontroller.DefaultBuildController.shouldBuil
d(DefaultBuildController.java:557)
at
org.apache.maven.continuum.buildcontroller.DefaultBuildController.build(Defa
ultBuildController.java:151)
at
org.apache.maven.continuum.buildcontroller.BuildProjectTaskExecutor.executeT
ask(BuildProjectTaskExecutor.java:50)
at
org.codehaus.plexus.taskqueue.execution.ThreadedTaskQueueExecutor$ExecutorRu
nnable$1.run(ThreadedTaskQueueExecutor.java:116)
at
edu.emory.mathcs.backport.java.util.concurrent.Executors$RunnableAdapter.cal
l(Executors.java:442)
at
edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.jav
a:178)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(
ThreadPoolExecutor.java:1061)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run
(ThreadPoolExecutor.java:575)
at java.lang.Thread.run(Thread.java:595)
I know that continuum is not using the profile to build because until I
added the 'dependencies' block the system would build fine (if it were
running the 'profile', It would have failed in the
axis2-java2wsdl-maven-plugin).
I believe that continuum should not inspect the parts of the pom that are
not active in a given profile.
Can anyone provide a workaround for this ? For now, I am simply adding the
'dependencies' block in each module that uses this as its parent.
Regards,
Iker