You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by zr...@apache.org on 2018/02/18 21:49:48 UTC

[camel] branch master updated: olingo2 test setup changed upgraded archetype plugin

This is an automated email from the ASF dual-hosted git repository.

zregvart pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 8e084e5  olingo2 test setup changed upgraded archetype plugin
8e084e5 is described below

commit 8e084e5b4e6dca7560c4264961047a478f23d6c0
Author: Zoran Regvart <zr...@apache.org>
AuthorDate: Sun Feb 18 22:49:45 2018 +0100

    olingo2 test setup changed upgraded archetype plugin
    
    The build failed as with the root cause that the `target` directory was
    missing in the `camel-olingo2-component` module, this uses the archetype
    plugin directly from the same Maven, and does not run a separate Maven
    process, which could make it fail if the `mvn` is not on PATH. And that
    happens when Maven is run from Maven Wrapper.
---
 .../camel-olingo2/camel-olingo2-component/pom.xml  | 63 ++++++++++++++--------
 parent/pom.xml                                     |  2 +-
 2 files changed, 43 insertions(+), 22 deletions(-)

diff --git a/components/camel-olingo2/camel-olingo2-component/pom.xml b/components/camel-olingo2/camel-olingo2-component/pom.xml
index 59b9815..4c3fc0f 100644
--- a/components/camel-olingo2/camel-olingo2-component/pom.xml
+++ b/components/camel-olingo2/camel-olingo2-component/pom.xml
@@ -299,34 +299,55 @@
       <build>
         <plugins>
           <plugin>
-            <groupId>org.codehaus.mojo</groupId>
-            <artifactId>exec-maven-plugin</artifactId>
-            <version>${exec-maven-plugin-version}</version>
+            <groupId>org.codehaus.gmavenplus</groupId>
+            <artifactId>gmavenplus-plugin</artifactId>
+            <version>${gmavenplus-plugin-version}</version>
             <executions>
               <execution>
-                <id>generate-sources</id>
+                <id>define-archetype-properties</id>
                 <phase>generate-test-sources</phase>
                 <goals>
-                  <goal>exec</goal>
+                  <goal>execute</goal>
                 </goals>
+                <configuration>
+                  <scripts>
+                    <script><![CDATA[
+                      session.userProperties['version'] = project.version
+                      session.userProperties['groupId'] = 'org.apache.camel'
+                      session.userProperties['artifactId'] = 'olingo2-my-car-service'
+                      ]]></script>
+                  </scripts>
+                </configuration>
+              </execution>
+            </executions>
+            <dependencies>
+                <dependency>
+                    <groupId>org.codehaus.groovy</groupId>
+                    <artifactId>groovy-all</artifactId>
+                    <version>${groovy-version}</version>
+                    <scope>runtime</scope>
+                </dependency>
+            </dependencies>
+          </plugin>
+          <plugin>
+            <artifactId>maven-archetype-plugin</artifactId>
+            <version>3.0.1</version>
+            <executions>
+              <execution>
+                <id>generate-my-car-service</id>
+                <phase>generate-test-sources</phase>
+                <goals>
+                  <goal>generate</goal>
+                </goals>
+                <configuration>
+                  <basedir>${project.build.directory}</basedir>
+                  <interactiveMode>false</interactiveMode>
+                  <archetypeGroupId>org.apache.olingo</archetypeGroupId>
+                  <archetypeArtifactId>olingo-odata2-sample-cars-annotation-archetype</archetypeArtifactId>
+                  <archetypeVersion>${olingo2-version}</archetypeVersion>
+                </configuration>
               </execution>
             </executions>
-            <configuration>
-              <executable>mvn${maven.exe.file.extension}</executable>
-              <workingDirectory>${basedir}/target</workingDirectory>
-              <arguments>
-                <argument>archetype:generate</argument>
-                <argument>-q</argument>
-                <argument>-fn</argument>
-                <argument>-DinteractiveMode=false</argument>
-                <argument>-Dversion=${project.version}</argument>
-                <argument>-DgroupId=org.apache.camel</argument>
-                <argument>-DartifactId=olingo2-my-car-service</argument>
-                <argument>-DarchetypeGroupId=org.apache.olingo</argument>
-                <argument>-DarchetypeArtifactId=olingo-odata2-sample-cars-annotation-archetype</argument>
-                <argument>-DarchetypeVersion=${olingo2-version}</argument>
-              </arguments>
-            </configuration>
           </plugin>
         </plugins>
       </build>
diff --git a/parent/pom.xml b/parent/pom.xml
index 1b70894..e2017f7 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -469,7 +469,7 @@
     <!-- needed from tooling/archetypes -->
     <!-- use antrun 1.6 as 1.7 fails with finding tools.jar on java on some platforms -->
     <maven-antrun-plugin-version>1.6</maven-antrun-plugin-version>
-    <maven-archetype-plugin-version>2.0</maven-archetype-plugin-version>
+    <maven-archetype-plugin-version>3.0.1</maven-archetype-plugin-version>
     <maven-archetype-packaging-version>2.0</maven-archetype-packaging-version>
     <maven-assembly-plugin-version>3.0.0</maven-assembly-plugin-version>
     <maven-bundle-version>${maven-bundle-plugin-version}</maven-bundle-version>

-- 
To stop receiving notification emails like this one, please contact
zregvart@apache.org.