maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Swindells (JIRA)" <j...@codehaus.org>
Subject [jira] Commented: (MSOURCES-44) If project doesn't contain sources (contains only test sources) source:jar will fail
Date Thu, 21 May 2009 16:19:42 GMT

    [ http://jira.codehaus.org/browse/MSOURCES-44?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=177480#action_177480
] 

Thomas Swindells commented on MSOURCES-44:
------------------------------------------

A work around seems to be setting includePom to true, then the sources will always include
some files.

> 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
>         Attachments: failOnEmpty.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

        

Mime
View raw message