You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Martin Höller <ma...@xss.co.at> on 2009/04/30 10:55:31 UTC

release:perform of an EAR gives error with maven-source-plugin:2.1

Hi all!

We recently upgrade the maven-source-plugin from version 2.0.4 to 2.1 for a 
multimodule project (consisting of modules of packaging type jar, war, ejb 
and ear). No problems so far when doing a "normal build" like mvn install.

However, when we do a "mvn release:perform" the EAR module fails with this 
error: 

...
[INFO] [source:jar]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error creating source archive: You must set at least one file.

This is because the EAR module doesn't contain any sources. We wouldn't need 
the -sources.jar anyway. Older versions of the maven-source-plugin created 
an empty archive with an auto-generated MANIFEST.MF file in it, but the 2.1 
version fails as already reported in MSOURCES-44 [0].

The question I now have is, why is source:jar mojo executed at all? According
to the lifecycle reference [1] this mojo shouldn't be executed (for packaging
EAR). How can I deactivate this mojo?

thanks in advance,
- martin

[0] http://jira.codehaus.org/browse/MSOURCES-44
[1] http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#Lifecycle_Reference

Re: release:perform of an EAR gives error with maven-source-plugin:2.1

Posted by Grant Rettke <gr...@acm.org>.
On Mon, May 4, 2009 at 2:01 AM, Martin Höller <ma...@xss.co.at> wrote:
> On 30 Apr 2009, Grant Rettke wrote:
>
>> Does the workaround on that page work?
>
> Which workaround? Do you mean the patch attached to the MSOURCES-44
> issue? I didn't test it but I had a look at the patch and I would assume
> it would work.

Yes is what I meant. I was wondering if it worked; nothing more.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: release:perform of an EAR gives error with maven-source-plugin:2.1

Posted by Martin Höller <ma...@xss.co.at>.
On 30 Apr 2009, Grant Rettke wrote:

> Does the workaround on that page work?

Which workaround? Do you mean the patch attached to the MSOURCES-44
issue? I didn't test it but I had a look at the patch and I would assume
it would work.

- martin

Re: release:perform of an EAR gives error with maven-source-plugin:2.1

Posted by Grant Rettke <gr...@acm.org>.
Does the workaround on that page work?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: release:perform of an EAR gives error with maven-source-plugin:2.1

Posted by Martin Höller <ma...@xss.co.at>.
On Thursday 30 April 2009 Martin Höller wrote:
> The question I now have is, why is source:jar mojo executed at all?
> According to the lifecycle reference [1] this mojo shouldn't be executed
> (for packaging EAR). How can I deactivate this mojo?

The release-profile seems to introduce the m-source-p into my build. Is this 
a good idea for EAR packaging? EARs usually don't have java files attached.

Any thoughts?

- martin

PS: For the moment I switched back to maven-source-plugin 2.0.4.