You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2017/02/17 12:22:47 UTC
camel git commit: Only run in the right directory
Repository: camel
Updated Branches:
refs/heads/master 3fa2f05d2 -> 1d288e080
Only run in the right directory
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/1d288e08
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/1d288e08
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/1d288e08
Branch: refs/heads/master
Commit: 1d288e0802839fcfaa335e9d6a3087b396dc1993
Parents: 3fa2f05
Author: Claus Ibsen <da...@apache.org>
Authored: Fri Feb 17 13:22:49 2017 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri Feb 17 13:22:49 2017 +0100
----------------------------------------------------------------------
.../org/apache/camel/maven/packaging/PrepareExampleMojo.java | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/1d288e08/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareExampleMojo.java
----------------------------------------------------------------------
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareExampleMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareExampleMojo.java
index 5e05acd..ca56721 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareExampleMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareExampleMojo.java
@@ -80,6 +80,12 @@ public class PrepareExampleMojo extends AbstractMojo {
Set<File> examples = new TreeSet<>();
File dir = new File(".");
+
+ // only run in examples directory where the main readme.adoc file is located
+ if (!dir.getName().equals("examples")) {
+ return;
+ }
+
File[] files = dir.listFiles();
if (files != null) {
examples.addAll(Arrays.asList(files));