Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D9801200C00 for ; Wed, 18 Jan 2017 12:04:30 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id D80AA160B53; Wed, 18 Jan 2017 11:04:30 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 2DAED160B3A for ; Wed, 18 Jan 2017 12:04:30 +0100 (CET) Received: (qmail 58544 invoked by uid 500); 18 Jan 2017 11:04:29 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 58535 invoked by uid 99); 18 Jan 2017 11:04:29 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jan 2017 11:04:29 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id D28F1C01A2 for ; Wed, 18 Jan 2017 11:04:28 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.199 X-Spam-Level: X-Spam-Status: No, score=-1.199 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id sQgKHYYeJ6VK for ; Wed, 18 Jan 2017 11:04:28 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 0CAD560DC8 for ; Wed, 18 Jan 2017 11:04:28 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 883A2E0952 for ; Wed, 18 Jan 2017 11:04:27 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 6D79A25284 for ; Wed, 18 Jan 2017 11:04:26 +0000 (UTC) Date: Wed, 18 Jan 2017 11:04:26 +0000 (UTC) From: "Claus Ibsen (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CAMEL-10711) Consider using add[Test]CompileSourceRoot in api component maven plugin MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 18 Jan 2017 11:04:31 -0000 [ https://issues.apache.org/jira/browse/CAMEL-10711?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Claus Ibsen updated CAMEL-10711: -------------------------------- Fix Version/s: Future > Consider using add[Test]CompileSourceRoot in api component maven plugin > ----------------------------------------------------------------------- > > Key: CAMEL-10711 > URL: https://issues.apache.org/jira/browse/CAMEL-10711 > Project: Camel > Issue Type: New Feature > Components: tooling > Reporter: Marco Collovati > Priority: Trivial > Fix For: Future > > > When using camel-api-component-maven-plugin we must also add > build-helper-maven-plugin to ensure that generated sources are added > to the project for compilation. > To avoid this configuration step it is possible to add the source path > directly from the plugin by calling *MavenProject.addCompileSourceRoot* > and *MavenProject.addTestCompileSourceRoot*. > {code:java} > project.addCompileSourceRoot(this.generatedSrcDir.getAbsolutePath()); > project.addTestCompileSourceRoot(this.generatedTestDir.getAbsolutePath()); > {code} > This can maybe be done at the end of the execute method of ApiComponentGeneratorMojo and AbstractApiMethodGeneratorMojo. > It could also be a nice idea to add boolean properties in AbstractGeneratorMojo in order to enable or disable the automatic addition of the source. > {code:java} > @Parameter(defaultValue = "true", property = PREFIX + "addCompileSourceRoot", required = false) > private boolean addCompileSourceRoot = true; > @Parameter(defaultValue = "true", property = PREFIX + "addTestCompileSourceRoot", required = false) > private boolean addTestCompileSourceRoot = true; > {code} > {code:java} > if (this.addCompileSourceRoot) { > project.addCompileSourceRoot(this.generatedSrcDir.getAbsolutePath()); > } > if (this.addTestCompileSourceRoot) { > project.addTestCompileSourceRoot(this.generatedTestDir.getAbsolutePath()); > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)