From issues-return-57488-apmail-maven-issues-archive=maven.apache.org@maven.apache.org Fri Oct 02 01:29:29 2009 Return-Path: Delivered-To: apmail-maven-issues-archive@minotaur.apache.org Received: (qmail 53795 invoked from network); 2 Oct 2009 01:29:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Oct 2009 01:29:29 -0000 Received: (qmail 78300 invoked by uid 500); 2 Oct 2009 01:29:29 -0000 Delivered-To: apmail-maven-issues-archive@maven.apache.org Received: (qmail 78196 invoked by uid 500); 2 Oct 2009 01:29:28 -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 78186 invoked by uid 99); 2 Oct 2009 01:29:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Oct 2009 01:29:28 +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; Fri, 02 Oct 2009 01:29:18 +0000 Received: from codehaus01.managed.contegix.com (localhost.localdomain [127.0.0.1]) by codehaus01.managed.contegix.com (Postfix) with ESMTP id 77E5619E01D5 for ; Thu, 1 Oct 2009 20:28:57 -0500 (CDT) Message-ID: <3237189.22641254446937486.JavaMail.haus-jira@codehaus01.managed.contegix.com> Date: Thu, 1 Oct 2009 20:28:57 -0500 (CDT) From: "James William Dumay (JIRA)" To: issues@maven.apache.org Subject: [jira] Updated: (MSOURCES-44) If project doesn't contain sources (contains only test sources) source:jar will fail In-Reply-To: <28195070.42581240472624975.JavaMail.haus-jira@codehaus01.managed.contegix.com> 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-44?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] James William Dumay updated MSOURCES-44: ---------------------------------------- Attachment: MSOURCES-44.patch Id suggest the following patch that simply checks that the archiver has files before it attempts to create it. Having a configuration option for something that is clearly a regression is probably not a good idea. Maintainers can bug me for a functional test if they want one :) > If project doesn't contain sources (contains only test sources) source:jar will fail > ------------------------------------------------------------------------------------ > > Key: MSOURCES-44 > URL: http://jira.codehaus.org/browse/MSOURCES-44 > Project: Maven 2.x Source Plugin > Issue Type: Bug > Affects Versions: 2.1 > Environment: WinXp SP3, Cygwin > Reporter: Bugittaa Pahasti > Assignee: Arnaud Heritier > Priority: Blocker > Fix For: 2.1.1 > > Attachments: failOnEmpty.patch, MSOURCES-44.patch > > > We are running all of our CI builds with the release profile so that javadocs and sources are generated. However, one module in a multi-module build contains only test sources. After updating from 2.0.4 to 2.1 the build will fail. The same error occurs when source:jar is run manually. Below is the stack trace from jar:source. It might be intentional that the build will fail in case source:jar is run from command line, but when using release profile the failure is quite problematic. > [ERROR] BUILD ERROR > [INFO] ------------------------------------------------------------------------ > [INFO] Error creating source archive: You must set at least one file. > [INFO] ------------------------------------------------------------------------ > [DEBUG] Trace > org.apache.maven.lifecycle.LifecycleExecutionException: Error creating source archive: You must set at least one file. > at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:703) > at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:553) > at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:523) > at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371) > at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332) > at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:356) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) > at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) > at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) > at org.codehaus.classworlds.Launcher.main(Launcher.java:375) > Caused by: org.apache.maven.plugin.MojoExecutionException: Error creating source archive: You must set at least one file. > at org.apache.maven.plugin.source.AbstractSourceJarMojo.packageSources(AbstractSourceJarMojo.java:285) > at org.apache.maven.plugin.source.AbstractSourceJarMojo.packageSources(AbstractSourceJarMojo.java:232) > at org.apache.maven.plugin.source.AbstractSourceJarMojo.execute(AbstractSourceJarMojo.java:201) > at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483) > at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678) > ... 16 more > Caused by: org.codehaus.plexus.archiver.ArchiverException: You must set at least one file. > at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchiveMain(AbstractZipArchiver.java:260) > at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.execute(AbstractZipArchiver.java:242) > at org.codehaus.plexus.archiver.AbstractArchiver.createArchive(AbstractArchiver.java:673) > at org.apache.maven.archiver.MavenArchiver.createArchive(MavenArchiver.java:543) > at org.apache.maven.plugin.source.AbstractSourceJarMojo.packageSources(AbstractSourceJarMojo.java:277) > ... 20 more -- 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