Questions tagged [maven-clean-plugin]
27 questions
26
votes
2 answers
Remove directory with maven-clean-plugin
Can I delete directory with maven-clean-plugin?
The following configuration deletes files from the given directory but the directory itself will be remained:
maven-clean-plugin
2.4.1
…

zappee
- 20,148
- 14
- 73
- 129
12
votes
3 answers
Maven Clean: excluding directory inside target from being deleted
I have tried many variants but could not make this work. One example (child pom.xml):
org.apache.maven.plugins
maven-clean-plugin
…

ftkg
- 1,652
- 4
- 21
- 33
7
votes
1 answer
maven-clean-plugin is not removing all given directories
In my project .pom I set up the maven-clean-plugin like so:
maven-clean-plugin
2.6.1
…

Atais
- 10,857
- 6
- 71
- 111
6
votes
1 answer
followSymlinks doesn't work for maven-clean-plugin
I am trying to use "maven-clean-plugin" to delete additional files situated in /my/path folder.
maven-clean-plugin
clean-on-cleaning
…

Dezmond
- 61
- 3
4
votes
2 answers
How to delete a folder at maven clean phase?
I want do delete a folder at clean phase.
I have used maven-clean-plugin and successfully deleted all of the files under it.
maven-clean-plugin
3.0.0
…

aurelius
- 3,946
- 7
- 40
- 73
3
votes
1 answer
Make maven clean not fail when only folder remains
While developing an application, the command I use most often is mvn clean install. Cleaning probably isn't needed 90% of the time, but it does not hurt and might help to avoid weird issues. There are however times, when I'm working on a console…

Deltharis
- 2,320
- 1
- 18
- 29
3
votes
3 answers
Maven clean lifecycle
i have read about maven's clean and site lifecycle at lot of places, but not able to understand how exactly it works.
Please explain me how Maven's clean Lifecycle processes with some example.
how it is different from build.
as before build starts,…

Alpana Chauhan
- 407
- 1
- 9
- 18
3
votes
4 answers
Maven Building Error
When I try to run
mvn clean package
I am getting the following error
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven /plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
[INFO]…

Rohit
- 635
- 6
- 12
- 22
2
votes
2 answers
Maven not cleaning child project target folder
I set up a sample project to understand the clean plugin in maven as to how it cleans a child project when the mvn clean:clean is run from the parent project location. Somehow, I see that maven deletes target of parent project but not of child…

Number945
- 4,631
- 8
- 45
- 83
2
votes
1 answer
Can the directories wiped by mvn clean be customized?
After running
mvn clean
I had kind of a bad moment when trying to run a binary in my project. First the selected binary did not run - then discovered the entire /bin directory had been removed. After a bit of a panic it came out that - among the…

WestCoastProjects
- 58,982
- 91
- 316
- 560
2
votes
2 answers
Maven Run Error "maven-clean-plugin:2.5 or one of its dependencies could not be resolved"
Using İntelliJIdea, I Downloaded my project from Subversion for 12 times.
Deleted .m2/repository for 7-8 times.
Reimported, downloaded source for 15 times. Tried every possibilities but still cannot run my project.
Here is my Maven run profile and…

Tayfun Yaşar
- 422
- 2
- 9
- 24
1
vote
1 answer
Are parent default plugins being executed when using a child profile in maven?
I get the following error. Is it because the install_path wasn't set? If so, does it mean that when using a profile, the default plugins aren't being executed (the one that sets the install_path)?
Execution:
mvn clean install site -Pfull
Error:…

AlikElzin-kilaka
- 34,335
- 35
- 194
- 277
1
vote
1 answer
How to remove a a specific directory from the Maven's target directory at the end of the build?
I have a task to unpack all the jars mentioned in the pom.xml and then jar the unpacked content into one single jar. I am able to do this using the unpack-dependency goal of the dependency plugin and the jar plugin.
However, after i generate the…

RITZ XAVI
- 3,633
- 1
- 25
- 35
1
vote
1 answer
Using maven-clean-plugin with m2e
I use here Eclipse with m2e plugin. If I do a project clean, it doesn't do anything.
On my experiments, I see as if m2e simply weren't wired into the eclipse project cleaning option.
I've tried to set up in lifecycle-mapping-metadata.xml, but it…

peterh
- 11,875
- 18
- 85
- 108
0
votes
0 answers
Github actions maven failed to clean install project because cant create resource directory
Hello :) I am trying to run a pipeline on Github Actions in which I would like to clean and install a maven package, which I am trying to do like so:
- name: Clean and install package
run: mvn clean install -X
When I am doing that I see the…

marialadelbario
- 325
- 1
- 4
- 19