• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Maven build failing - cannot clean

 
Ranch Hand
Posts: 146
  • Number of slices to send:
    Optional 'thank-you' note:
I was debugging a piece of code. I didn’t have any POMs open, everything was going fine.
I tried to clean & build a project from within Netbeans it failed saying “ Failed to clean project: Failed to delete F:\Javadev\Parent\{modulename}\target\test-classes\.netbeans_automatic_build

Now it won’t clean or compile anything.

I have tried deleting the file myself, it makes no difference. No module will compile, all give the same error.
I have tried restarting the machine.

What have I done?

My Parent POM



My Assembly POM


My Central POM


I have removed the irrelevant modules from the POMs.

If I try 'mvn clean install' from a command line it says it compiles parent but then fails on Central with the same message.
 
Neil Barton
Ranch Hand
Posts: 146
  • Number of slices to send:
    Optional 'thank-you' note:
and then...just like that... it all started working again. I didn't edit anything, didn't change anything. Just rebuilt another module and everything now cleans and compiles. I just love Maven :-(
 
Marshal
Posts: 4533
572
  • Number of slices to send:
    Optional 'thank-you' note:
Did you have a terminal window open somewhere in or below the build target directory?

Did you have a process running which was using the built jar file?
 
Saloon Keeper
Posts: 15621
366
  • 1
  • Number of slices to send:
    Optional 'thank-you' note:
Again, nothing to do with Maven. Maven can't help it if the file system blocks access to a file. This is usually the case when you have a terminal window open or a file is in active use.
 
Neil Barton
Ranch Hand
Posts: 146
  • Number of slices to send:
    Optional 'thank-you' note:
Thanks Ron, not as far as I know. As I said I rebooted the PC in the end and it was still doing it. One thing to throw in the mix: I have recently started using the Reflect library to get a value. That is mentioned in the output dump. The notes say not to use Reflect for a live system (but there's no alternative) could this be a symptom of Reflect not behaving itself?
 
Neil Barton
Ranch Hand
Posts: 146
  • Number of slices to send:
    Optional 'thank-you' note:
Sorry Marshal, How do I move it to another forum? I'm guessing Java General (is there a maven specific?). It's happening again so I need to work out what's causing it.
 
Sheriff
Posts: 22787
131
  • Number of slices to send:
    Optional 'thank-you' note:
Campbell already moved it for you.

I noticed that the path that failed had {modulename} in it. I couldn't find any references to it, but I'm guessing that was the issue. Given that the file was called .netbeans_automatic_build makes me think this may have been a glitch in Netbeans.
 
Neil Barton
Ranch Hand
Posts: 146
  • Number of slices to send:
    Optional 'thank-you' note:
Sorry Rob, that was me, I was trying to show that it didn't matter what module name was in there they all fail to compile with the same error message. I have tried : switching the PC off. Checking for locks. Upgrading Netbeans to V20. Still it persists, nothing compiles with this same error. I have tried deleting every file it says it can't delete only to get to the point where all folders under the target folder are deleted when it says it can't delete them (took a while), when even the target folder is removed it responds with:  Central: Error while storing the mojo status: F:\Javadev\Parent\Central\target\maven-status\maven-compiler-plugin\compile\default-compile\inputFiles.lst -> [Help 1]
 
Neil Barton
Ranch Hand
Posts: 146
  • Number of slices to send:
    Optional 'thank-you' note:
I just tried to create a new ANT project, it fails to create it and leaves me at the 'Create project' screen. There is no error message. If I try to create a maven project it fails again and leaves me on the same screen but this time it gives the error message "Called DataObject.find on null" I'm not sure how I get it working again! Any help appreciated.
 
Saloon Keeper
Posts: 27868
196
  • Number of slices to send:
    Optional 'thank-you' note:
Since my command shell doesn't have "screens", I'll have to assume you're having a problem with an IDE. And I can't tell which IDE it was.

Note "mvn clean" normally just deletes the project's target directory and everything under it. Windows cannot delete directories that are currently serving as the current (working) directory for any command shell that might be running on the system because Windows locks based on the file path name. Unix-like systems lock on inodes not names, so you can delete in cases where Windows wouldn't let you, but you'll still probably wish you hadn't. So before doing a clean always make sure that you don't have any open connections to files or directories under /target.
 
Neil Barton
Ranch Hand
Posts: 146
  • Number of slices to send:
    Optional 'thank-you' note:
Thanks Tim, Yes, I'm working with Netbeans IDE, and I think that was the culprit. Thinking back I remember using the Netbeans 'move' facility to move a project around. It seemed OK at the time but it was about an hour later that the problems started. I think it corrupted the file structure somehow. I tried everything, even changing the permissions to everyone full control but it made no difference. What I did was to export all of the modules out, create a new folder and import them back in (took a while). After a little tweaking all is now working again.
I may be a bit hesitant about using the Netbeans 'move' facility in future!
reply
    Bookmark Topic Watch Topic
  • New Topic
vceplus-200-125    | boson-200-125    | training-cissp    | actualtests-cissp    | techexams-cissp    | gratisexams-300-075    | pearsonitcertification-210-260    | examsboost-210-260    | examsforall-210-260    | dumps4free-210-260    | reddit-210-260    | cisexams-352-001    | itexamfox-352-001    | passguaranteed-352-001    | passeasily-352-001    | freeccnastudyguide-200-120    | gocertify-200-120    | passcerty-200-120    | certifyguide-70-980    | dumpscollection-70-980    | examcollection-70-534    | cbtnuggets-210-065    | examfiles-400-051    | passitdump-400-051    | pearsonitcertification-70-462    | anderseide-70-347    | thomas-70-533    | research-1V0-605    | topix-102-400    | certdepot-EX200    | pearsonit-640-916    | itproguru-70-533    | reddit-100-105    | channel9-70-346    | anderseide-70-346    | theiia-IIA-CIA-PART3    | certificationHP-hp0-s41    | pearsonitcertification-640-916    | anderMicrosoft-70-534    | cathMicrosoft-70-462    | examcollection-cca-500    | techexams-gcih    | mslearn-70-346    | measureup-70-486    | pass4sure-hp0-s41    | iiba-640-916    | itsecurity-sscp    | cbtnuggets-300-320    | blogged-70-486    | pass4sure-IIA-CIA-PART1    | cbtnuggets-100-101    | developerhandbook-70-486    | lpicisco-101    | mylearn-1V0-605    | tomsitpro-cism    | gnosis-101    | channel9Mic-70-534    | ipass-IIA-CIA-PART1    | forcerts-70-417    | tests-sy0-401    | ipasstheciaexam-IIA-CIA-PART3    | mostcisco-300-135    | buildazure-70-533    | cloudera-cca-500    | pdf4cert-2v0-621    | f5cisco-101    | gocertify-1z0-062    | quora-640-916    | micrcosoft-70-480    | brain2pass-70-417    | examcompass-sy0-401    | global-EX200    | iassc-ICGB    | vceplus-300-115    | quizlet-810-403    | cbtnuggets-70-697    | educationOracle-1Z0-434    | channel9-70-534    | officialcerts-400-051    | examsboost-IIA-CIA-PART1    | networktut-300-135    | teststarter-300-206    | pluralsight-70-486    | coding-70-486    | freeccna-100-101    | digitaltut-300-101    | iiba-CBAP    | virtuallymikebrown-640-916    | isaca-cism    | whizlabs-pmp    | techexams-70-980    | ciscopress-300-115    | techtarget-cism    | pearsonitcertification-300-070    | testking-2v0-621    | isacaNew-cism    | simplilearn-pmi-rmp    | simplilearn-pmp    | educationOracle-1z0-809    | education-1z0-809    | teachertube-1Z0-434    | villanovau-CBAP    | quora-300-206    | certifyguide-300-208    | cbtnuggets-100-105    | flydumps-70-417    | gratisexams-1V0-605    | ituonline-1z0-062    | techexams-cas-002    | simplilearn-70-534    | pluralsight-70-697    | theiia-IIA-CIA-PART1    | itexamtips-400-051    | pearsonitcertification-EX200    | pluralsight-70-480    | learn-hp0-s42    | giac-gpen    | mindhub-102-400    | coursesmsu-CBAP    | examsforall-2v0-621    | developerhandbook-70-487    | root-EX200    | coderanch-1z0-809    | getfreedumps-1z0-062    | comptia-cas-002    | quora-1z0-809    | boson-300-135    | killtest-2v0-621    | learncia-IIA-CIA-PART3    | computer-gcih    | universitycloudera-cca-500    | itexamrun-70-410    | certificationHPv2-hp0-s41    | certskills-100-105    | skipitnow-70-417    | gocertify-sy0-401    | prep4sure-70-417    | simplilearn-cisa    |
http://www.pmsas.pr.gov.br/wp-content/    | http://www.pmsas.pr.gov.br/wp-content/    |