I am beginning a new Java web application using Netbeans, and I would like to use Maven. McAfee is installed on my box (here at work), which is preventing me from turning off the read-only attribute in my documents folder (where my web application project is stored). I can run a traditional web application project, and get the ‘hello world’ screen on my browser. However, if I try to run a new Maven project, I get an ‘access is denied’ in the console output screen. Why is this happening, and is there a workaround? Here’s the console output:
------------------------------------------------------------------------
Building mavenproject1 1.0-SNAPSHOT
------------------------------------------------------------------------
[dependency:copy]
[resources:resources]
Using 'UTF-8' encoding to copy filtered resources.
skip non existing resourceDirectory C:\mavenproject1\src\main\resources
[compiler:compile]
Nothing to compile - all classes are up to date
[resources:testResources]
Using 'UTF-8' encoding to copy filtered resources.
skip non existing resourceDirectory C:\mavenproject1\src\test\resources
[compiler:testCompile]
Nothing to compile - all classes are up to date
[surefire:test]
No tests to run.
Surefire report directory: C:\mavenproject1\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
There are no tests to run.
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[war:war]
Packaging webapp
Assembling webapp [mavenproject1] in [C:\mavenproject1\target
\mavenproject1-1.0-SNAPSHOT]
Processing war project
Copying webapp resources [C:\mavenproject1\src\main\webapp]
Webapp assembled in [25 msecs]
Building war: C:\mavenproject1\target\mavenproject1-1.0-SNAPSHOT.war
------------------------------------------------------------------------
BUILD SUCCESS
------------------------------------------------------------------------
Total time: 2.090s
Finished at: Thu Jan 12 08:48:22 EST 2012
Final Memory: 7M/17M
------------------------------------------------------------------------
Access is denied.
The problem is most likely due to not being able to write to the Maven repository. You can overwrite the location of this repository via the Preferences page. Point the location to a writable directory on your computer: