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

  • SEARCH
  • Home
  • 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 6229769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:37:48+00:00 2026-05-24T09:37:48+00:00

I have multi module project where one project contains excel spreadsheet and it is

  • 0

I have multi module project where one project contains excel spreadsheet and it is being dropped in the target folder when maven build the project. Now when I do a mvn clean install, sometime maven throws an error that it can not delete the “abc.xls” file. So I started using maven-clean-plugin and trying to exclude this file. Still I am getting the same error. Strange problem is, if i close my eclipse and do the build from command line then it works fine. But for that everytime i want to do clean build I have to close my eclipse. Also I am using M2ECLIPSE plugin for my project. Here is my maven-clean-plugin looks like

<plugin>
            <artifactId>maven-clean-plugin</artifactId>
            <version>2.4.1</version>
            <configuration>
                    <excludeDefaultDirectories>true</excludeDefaultDirectories>
                    <filesets>
                        <fileset>
                            <directory>${basedir}/target/classes/</directory>
                            <excludes>
                                <exclude>**/*.xls</exclude>
                            </excludes>
                            <followSymlinks>true</followSymlinks>
                        </fileset>
                    </filesets>
                    <!-- <failOnError>false</failOnError> -->
            </configuration>
        </plugin>

Any insight would be helpful.

Thanks

  • 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-24T09:37:49+00:00Added an answer on May 24, 2026 at 9:37 am

    That’s not how to configure the clean plugin.

    You need to turn on excludeDefaultDirectories and then write a fileset that covers what you want with exclusions. What you’ve just done is redundantly add target/classes, but that’s added on top of deleting ‘target’ with no exclusions.

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

Sidebar

Related Questions

I have created a multi module maven project. Now I have shared the project
I have a huge multi-module project , which is being built using maven. Most
I have a maven multi-module project. In one module, we create 2 ZIP files
The followings are ok now: I have a multi-module project in maven with EJB
I have a multi module Maven project, one of its modules has the main
I have a multi-module maven project with an installer sub-project. The installer will be
We have a multi-module maven project that uses a profile that defines a buildnumber-maven-plugin
Basically, I have a multi-module project consisting of 5 different modules. One of the
Our multi-module Maven project used to take 4-6 minutes to build. Over the past
I have a multi-module maven project (several levels of nesting). Normally, when I execute

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.