Author: dkulp
Date: Mon Nov 5 22:19:36 2012
New Revision: 1405991
URL: http://svn.apache.org/viewvc?rev=1405991&view=rev
Log:
Add m2e lifecylcle things (very minimal impl)
Added:
cxf/xjc-utils/trunk/cxf-xjc-plugin/src/main/resources/
cxf/xjc-utils/trunk/cxf-xjc-plugin/src/main/resources/META-INF/
cxf/xjc-utils/trunk/cxf-xjc-plugin/src/main/resources/META-INF/m2e/
cxf/xjc-utils/trunk/cxf-xjc-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml
Modified:
cxf/xjc-utils/trunk/cxf-xjc-plugin/pom.xml
cxf/xjc-utils/trunk/cxf-xjc-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractXSDToJavaMojo.java
cxf/xjc-utils/trunk/pom.xml
Modified: cxf/xjc-utils/trunk/cxf-xjc-plugin/pom.xml
URL:
http://svn.apache.org/viewvc/cxf/xjc-utils/trunk/cxf-xjc-plugin/pom.xml?rev=1405991&r1=1405990&r2=1405991&view=diff
==============================================================================
--- cxf/xjc-utils/trunk/cxf-xjc-plugin/pom.xml (original)
+++ cxf/xjc-utils/trunk/cxf-xjc-plugin/pom.xml Mon Nov 5 22:19:36 2012
@@ -38,6 +38,16 @@
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>org.sonatype.plexus</groupId>
+ <artifactId>plexus-build-api</artifactId>
+ <version>0.0.7</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>2.0.5</version>
+ </dependency>
+ <dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-downloader</artifactId>
<version>1.1</version>
Modified:
cxf/xjc-utils/trunk/cxf-xjc-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractXSDToJavaMojo.java
URL:
http://svn.apache.org/viewvc/cxf/xjc-utils/trunk/cxf-xjc-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractXSDToJavaMojo.java?rev=1405991&r1=1405990&r2=1405991&view=diff
==============================================================================
---
cxf/xjc-utils/trunk/cxf-xjc-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractXSDToJavaMojo.java
(original)
+++
cxf/xjc-utils/trunk/cxf-xjc-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractXSDToJavaMojo.java
Mon Nov 5 22:19:36 2012
@@ -39,6 +39,7 @@ import org.apache.maven.plugin.MojoExecu
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.MavenProjectBuilder;
import org.apache.maven.shared.downloader.Downloader;
+import org.sonatype.plexus.build.incremental.BuildContext;
/**
* @description CXF XSD To Java Tool
@@ -120,6 +121,10 @@ public abstract class AbstractXSDToJavaM
private ArtifactFactory artifactFactory;
+ /** @component */
+ private BuildContext buildContext;
+
+
abstract String getOutputDir();
@@ -226,6 +231,7 @@ public abstract class AbstractXSDToJavaM
result = result && deleteDir(dirs[idx]);
}
}
+ buildContext.refresh(outputDirFile);
} catch (Exception e) {
throw new MojoExecutionException(e.getMessage(), e);
}
Added:
cxf/xjc-utils/trunk/cxf-xjc-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml
URL:
http://svn.apache.org/viewvc/cxf/xjc-utils/trunk/cxf-xjc-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml?rev=1405991&view=auto
==============================================================================
---
cxf/xjc-utils/trunk/cxf-xjc-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml
(added)
+++
cxf/xjc-utils/trunk/cxf-xjc-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml
Mon Nov 5 22:19:36 2012
@@ -0,0 +1,31 @@
+<lifecycleMappingMetadata>
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <goals>
+ <goal>xsdtojava</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <execute>
+ <runOnIncremental>true</runOnIncremental>
+ <runOnConfiguration>true</runOnConfiguration>
+ </execute>
+ </action>
+ </pluginExecution>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <goals>
+ <goal>xsdtojava-tests</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <execute>
+ <runOnIncremental>true</runOnIncremental>
+ <runOnConfiguration>true</runOnConfiguration>
+ </execute>
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+</lifecycleMappingMetadata>
+
Modified: cxf/xjc-utils/trunk/pom.xml
URL:
http://svn.apache.org/viewvc/cxf/xjc-utils/trunk/pom.xml?rev=1405991&r1=1405990&r2=1405991&view=diff
==============================================================================
--- cxf/xjc-utils/trunk/pom.xml (original)
+++ cxf/xjc-utils/trunk/pom.xml Mon Nov 5 22:19:36 2012
@@ -271,7 +271,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
- <version>2.3</version>
+ <version>2.4</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
@@ -353,7 +353,7 @@
<dependency>
<groupId>org.apache.cxf.build-utils</groupId>
<artifactId>cxf-buildtools</artifactId>
- <version>2.3.1</version>
+ <version>2.5.0-SNAPSHOT</version>
</dependency>
</dependencies>
</plugin>
@@ -365,7 +365,7 @@
<dependency>
<groupId>org.apache.cxf.build-utils</groupId>
<artifactId>cxf-buildtools</artifactId>
- <version>2.3.1</version>
+ <version>2.5.0-SNAPSHOT</version>
</dependency>
</dependencies>
<configuration>
@@ -398,7 +398,7 @@
<dependency>
<groupId>org.apache.cxf.build-utils</groupId>
<artifactId>cxf-buildtools</artifactId>
- <version>2.3.1</version>
+ <version>2.5.0-SNAPSHOT</version>
</dependency>
</dependencies>
<configuration>