Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 819731
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T02:21:34+00:00 2026-05-15T02:21:34+00:00

I am trying to release a web project using Maven 2.2.1 and the maven-release-plugin

  • 0

I am trying to release a web project using Maven 2.2.1 and the maven-release-plugin 2.0-beta-9, but it always fails when doing release:perform on generating the sources jar for the EAR project, which makes sense since the EAR project doesn’t have any source.

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

To try to disable the building of a sources JAR for the EAR project, I added the following to the POM for my EAR project (the version of the release plugin is set in a parent POM):

<build>
    <plugins>
        ...
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-release-plugin</artifactId>
            <configuration>
                <useReleaseProfile>false</useReleaseProfile>
            </configuration>
        </plugin>
    </plugins>
</build>

Upon running the release again after checking in this change, I got the same error while generating the sources JAR for the EAR project, even though this should have been disabled by the previous POM snippet.

What am I doing wrong? Why is the sources JAR still being built?

Edit:
I’ve tried to make the source plugin include my application.xml file so that this error doesn’t occur by adding the following POM snippet:

<build>
    <plugins>
        ...
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <configuration>
                <includes>
                    <include>${basedir}/META-INF/**/*</include>
                </includes>
                <useDefaultExcludes>false</useDefaultExcludes>
            </configuration>
        </plugin>
    </plugins>
</build>

Unfortunately, this does not fix the problem either.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T02:21:35+00:00Added an answer on May 15, 2026 at 2:21 am

    I finally figured it out. I needed to add my source files as part of the references:

    <resources>
        <resource>
            <directory>${project.basedir}</directory>
            <includes>
                <include>META-INF/**/*</include>
            </includes>
            <excludes>
                <exclude>target/**/*</exclude>
                <exclude>bin/**/*</exclude>
                <exclude>META-INF/.svn/**/*</exclude>
            </excludes>
        </resource>
    </resources>
    

    Doing this made everything work again. I didn’t need any special configuration for the release or source plugins to get it to work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use the glassfish-maven-plugin ( https://maven-glassfish-plugin.dev.java.net/ ) with GlassFish v3 (I'm on
I am trying to have my web application automatically Publish when a Release build
With the JavaFX 1.0 release I am trying to layout some SwingButton instances in
Trying to keep all the presentation stuff in the xhtml on this project and
I am trying to deploy an ASP.NET 3.5 Web Application to my production server
Im trying to learn how to set up a Zend framework web application from
I am starting a new project using WCF so that I can use jQuery
I'm trying to use the library released by Novell (Novell.Directory.Ldap). Version 2.1.10. What I've
Just playing around with the now released Silverlight 2.0. I'm trying to put a
Trying to setup an SSH server on Windows Server 2003. What are some good

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.