You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2019/02/05 10:47:37 UTC

[camel] branch master updated: Revert "Maybe this works better on CI (#2748)"

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

acosentino 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 8fd105f  Revert "Maybe this works better on CI (#2748)"
8fd105f is described below

commit 8fd105fdd728b699c25bbbc824f11ba267026a68
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Feb 5 11:43:26 2019 +0100

    Revert "Maybe this works better on CI (#2748)"
    
    This reverts commit 07dcbe01af524436df1e153a26f3437e8761a1d6.
---
 .../org/apache/camel/maven/packaging/PackageDataFormatMojo.java    | 7 +++++++
 .../java/org/apache/camel/maven/packaging/PackageLanguageMojo.java | 7 +++++++
 2 files changed, 14 insertions(+)

diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageDataFormatMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageDataFormatMojo.java
index 975475c..45434ce 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageDataFormatMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageDataFormatMojo.java
@@ -427,6 +427,13 @@ public class PackageDataFormatMojo extends AbstractMojo {
     }
 
     private static File findCamelCoreJar(MavenProject project) {
+        // maybe this project is camel-core itself
+        Artifact artifact = project.getArtifact();
+        if (artifact.getGroupId().equals("org.apache.camel") && artifact.getArtifactId().equals("camel-core")) {
+            return artifact.getFile();
+        }
+
+        // okay we are a custom dataformat so we need to find camel-core by walking down the folders
         return findCamelCoreDirectory(project, project.getBasedir());
     }
 
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageLanguageMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageLanguageMojo.java
index 4144823..4a118dd 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageLanguageMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageLanguageMojo.java
@@ -345,6 +345,13 @@ public class PackageLanguageMojo extends AbstractMojo {
     }
 
     private static File findCamelCoreJar(MavenProject project) {
+        // maybe this project is camel-core itself
+        Artifact artifact = project.getArtifact();
+        if (artifact.getGroupId().equals("org.apache.camel") && artifact.getArtifactId().equals("camel-core")) {
+            return artifact.getFile();
+        }
+
+        // okay we are a custom dataformat so we need to find camel-core by walking down the folders
         return findCamelCoreDirectory(project, project.getBasedir());
     }