Return-Path: Delivered-To: apmail-maven-issues-archive@minotaur.apache.org Received: (qmail 27683 invoked from network); 15 Nov 2010 16:55:03 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Nov 2010 16:55:03 -0000 Received: (qmail 50639 invoked by uid 500); 15 Nov 2010 16:55:35 -0000 Delivered-To: apmail-maven-issues-archive@maven.apache.org Received: (qmail 50596 invoked by uid 500); 15 Nov 2010 16:55:34 -0000 Mailing-List: contact issues-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list issues@maven.apache.org Received: (qmail 50588 invoked by uid 99); 15 Nov 2010 16:55:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Nov 2010 16:55:34 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [63.246.2.115] (HELO codehaus01.managed.contegix.com) (63.246.2.115) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Nov 2010 16:55:26 +0000 Received: from codehaus01.managed.contegix.com (localhost.localdomain [127.0.0.1]) by codehaus01.managed.contegix.com (Postfix) with ESMTP id F204B1DE045E for ; Mon, 15 Nov 2010 10:55:04 -0600 (CST) Date: Mon, 15 Nov 2010 10:55:03 -0600 (CST) From: "Bob Fields (JIRA)" To: issues@maven.apache.org Message-ID: <17991666.10609.1289840103799.JavaMail.haus-jira@codehaus01.managed.contegix.com> In-Reply-To: <13032310.1193567044801.JavaMail.haus-jira@codehaus01.managed.contegix.com> Subject: [jira] Commented: (MSOURCES-25) Allow additional source directories to be configured MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 4e90ceb663894a42f12c0e28abbab431 X-Virus-Checked: Checked by ClamAV on apache.org [ http://jira.codehaus.org/browse/MSOURCES-25?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=243163#action_243163 ] Bob Fields commented on MSOURCES-25: ------------------------------------ Adding additional source or resource roots does not solve the problem of not wanting to include additional elements in the project runtime artifact. I'm still trying to figure out the usefulness of the 'includes' configuration item if you can only accomplish this with additional resources or sources directories. It seems like we could simply add that configured reference to the included directories (either absolute or relative location) and use those when building the source artifact from source:jar. In our case, we have UML artifacts and xsd artifacts used to generate code plus Eclipse project configurastion, which we don't want included as project resources, and we don't want to have to go through all of the lifecycle steps when creating the sources jar. > Allow additional source directories to be configured > ---------------------------------------------------- > > Key: MSOURCES-25 > URL: http://jira.codehaus.org/browse/MSOURCES-25 > Project: Maven 2.x Source Plugin > Issue Type: New Feature > Affects Versions: 2.0.3 > Reporter: Benjamin Bentmann > Assignee: Milos Kleint > Priority: Minor > > Currently, the plugin simply archives the compile source roots and resource directories that are known to the POM. However, there may exist further files which do not directly contribute to the build process but are nevertheless to be considered as "source" files. > For example, consider a project with the following directories: > - src/main/java > - src/main/javacc > - src/main/jflex > - src/main/uml > The directories "javacc" and "jflex" provide grammar definitions for generated java files while "uml" contains UML (or similar) models from which MDA tools create java files. I would consider it useful to package these "pre-source" files as well into the sources JAR. > Surely, the assembly-plugin would do the job but since it requires quite a complete build I consider this approach quite unattractive when I want to package up files that are already hanging around in the file system. > While adding more directory roots to the archive is in principle no big deal for the source-plugin, the major question would be how to nicely configure the plugin to do so. My spontaneous proposal would be an additional configuration parameter "sourceDirectories" of type File[] with the following semantic: > If not specified (as would be the case for all currently existing configurations), simply package compile source roots and resources from POM like it does now. If I understand mojo configuration correctly, the mojo parameter would be null in this case. > Otherwise (i.e. if POM configuration contains element), ONLY those directories listed up here should be packaged. This would allow precise control what the plugin packages. For example, if one does not want to package resources, simply omit to list up their root directory. For my formerly mentioned example, one would need to write: > {code:xml} > > src/main/java > src/main/javacc > src/main/jflex > src/main/uml > > {code} > (BTW, not sure whether Plexus can actually handle the non-standard plural form ending with "ies"). > Of course, things are not that simple... The above illustrated approach conflicts with the current solution for MSOURCES-22. Furthermore, the plugin is currently aware of includes/excludes for the resources being packaged. This cannot be realized by a simple configuration parameter of type File[], i.e. src/main/resources would not be equivalent to the default behavior, causing confusion. Therefore, one might need something like a SourceDirectory bean that holds the directory path and optional includes/excludes (similar to an Ant fileset). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira