camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject camel git commit: Salesforce Maven plugin: run without Maven project
Date Tue, 22 Nov 2016 08:51:11 GMT
Repository: camel
Updated Branches:
  refs/heads/master f30365ece -> b77de5f41


Salesforce Maven plugin: run without Maven project

Adds `requiresProject = false` to `@Mojo` annotation which allows the
camel-salesforce-maven-plugin to work in a directory without Maven
project (without pom.xml).


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/b77de5f4
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/b77de5f4
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/b77de5f4

Branch: refs/heads/master
Commit: b77de5f41e8b59e5d2cd41187ef11d00e720e9f2
Parents: f30365e
Author: Zoran Regvart <zoran@regvart.com>
Authored: Mon Nov 21 12:16:36 2016 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Tue Nov 22 09:49:48 2016 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/camel/maven/CamelSalesforceMojo.java   | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/b77de5f4/components/camel-salesforce/camel-salesforce-maven-plugin/src/main/java/org/apache/camel/maven/CamelSalesforceMojo.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-maven-plugin/src/main/java/org/apache/camel/maven/CamelSalesforceMojo.java
b/components/camel-salesforce/camel-salesforce-maven-plugin/src/main/java/org/apache/camel/maven/CamelSalesforceMojo.java
index 88e6b92..5b6ce07 100644
--- a/components/camel-salesforce/camel-salesforce-maven-plugin/src/main/java/org/apache/camel/maven/CamelSalesforceMojo.java
+++ b/components/camel-salesforce/camel-salesforce-maven-plugin/src/main/java/org/apache/camel/maven/CamelSalesforceMojo.java
@@ -82,7 +82,7 @@ import org.eclipse.jetty.util.ssl.SslContextFactory;
 /**
  * Goal to generate DTOs for Salesforce SObjects
  */
-@Mojo(name = "generate", defaultPhase = LifecyclePhase.GENERATE_SOURCES)
+@Mojo(name = "generate", requiresProject = false, defaultPhase = LifecyclePhase.GENERATE_SOURCES)
 public class CamelSalesforceMojo extends AbstractMojo {
 
     // default connect and call timeout
@@ -376,6 +376,9 @@ public class CamelSalesforceMojo extends AbstractMojo {
             if (!packageName.matches(PACKAGE_NAME_PATTERN)) {
                 throw new MojoExecutionException("Invalid package name " + packageName);
             }
+            if (outputDirectory.getAbsolutePath().contains("$")) {
+                outputDirectory = new File("generated-sources/camel-salesforce");
+            }
             final File pkgDir = new File(outputDirectory, packageName.trim().replace('.',
File.separatorChar));
             if (!pkgDir.exists()) {
                 if (!pkgDir.mkdirs()) {


Mime
View raw message