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 4558558
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T17:39:59+00:00 2026-05-21T17:39:59+00:00

In my project I originally made a mistake and committed the target directory in

  • 0

In my project I originally made a mistake and committed the target directory in the cvs repository; I know there is no safe way to remove a directory from CVS, so I put a .cvsignore file there to basically ignore everything (I don’t want developers who aren’t able to even merge properly to commit their classes…).

The problem raises with my Jenkins CI, because I run clean and test goals; basically clean is run before CVS update, so it always finds a file to update (the .cvsignore that has been wiped by clean) and triggers an often useless build.

I think the way to go is to use exclusions but I tried and did not work:

[INFO] [clean:clean {execution: default-clean}]
[INFO] Deleting file set: **************************/target (included: [**], excluded: [])

The exclusion is configured as:

<plugin>
    <artifactId>maven-clean-plugin</artifactId>
    <executions>
        <execution>
            <id>not-clean</id>
            <configuration>
                <filesets>
                    <fileset>
                        <directory>target</directory>
                        <excludes>
                            <exclude>*cvsignore</exclude>
                        </excludes>
                        <followSymlinks>false</followSymlinks>
                    </fileset>
                </filesets>
            </configuration>
            <phase>initialize</phase>
            <goals>
                <goal>clean</goal>
            </goals>
        </execution>
    </executions>
</plugin>
  • 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-21T17:40:00+00:00Added an answer on May 21, 2026 at 5:40 pm

    You could try setting <excludeDefaultDirectories> to true, Otherwise, I believe target folder would always get deleted.

    The following code snippet works for me. Note that I have used default-clean as the id.

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-clean-plugin</artifactId>
                <version>2.4.1</version>
                <executions>
                    <execution>
                        <id>default-clean</id>
                        <configuration>
                            <excludeDefaultDirectories>true</excludeDefaultDirectories>
                            <filesets>
                                <fileset>
                                    <directory>target</directory>
                                    <excludes>
                                        <exclude>.cvsignore</exclude>
                                        <exclude>CVS</exclude>
                                        <exclude>CVS/**</exclude>
                                    </excludes>
                                    <followSymlinks>false</followSymlinks>
                                </fileset>
                            </filesets>
                        </configuration>
                        <phase>initialize</phase>
                        <goals>
                            <goal>clean</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I inherited a project originally stored in CVS with all the revisions. I made
In my current project we have a large repository of content that was originally
I have forked the git repository of a project on Github and made my
I'm maintaining an MFC/COM/ATL 45-odd project solution originally written with VS6. I'm now using
I'm trying to compile an old project that was originally designed for Visual Studio
So herein lies my question. Django project that was originally developed several years ago
I originally used JQuery for this project, but now I'm having to use Prototype,
I want to generate Javascript code from an existing Java project ( original question
I've imported a project into a directory and the original directory structure is: //depot/a/b/foo.txt
I am building a large project with a makefile that was originally built with

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.