1

I have openNMS 1.8.12-1 source code and trying to build it using maven and import the project to eclipse for development.I have run the command mvn eclipse:clean eclipse:eclipse -e form command line. Iam getting the build error as

org.apache.maven.lifecycle.LifecycleExecutionException: Unable to write to file:
 D:\Software\NMS\opennms-1.8.12-1\source\core\api\.settings\org.eclipse.jdt.core
.prefs
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:719)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
Goal(DefaultLifecycleExecutor.java:569)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:539)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:387)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:348)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:180)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
        at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:6
0)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to write to fi
le: D:\Software\NMS\opennms-1.8.12-1\source\core\api\.settings\org.eclipse.jdt.c
ore.prefs
        at org.apache.maven.plugin.eclipse.EclipsePlugin.writeAdditionalConfig(E
clipsePlugin.java:1026)
        at org.apache.maven.plugin.eclipse.EclipsePlugin.writeConfiguration(Ecli
psePlugin.java:972)
        at org.apache.maven.plugin.ide.AbstractIdeSupportMojo.execute(AbstractId
eSupportMojo.java:494)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:490)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:694)
        ... 17 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 35 seconds
[INFO] Finished at: Wed Jul 27 12:27:17 IST 2011
[INFO] Final Memory: 84M/200M
[INFO] ------------------------------------------------------------------------
TechnocraT
  • 313
  • 2
  • 6
  • 22
  • thanks for your prompt response shahzeb.How do i provide the access then? also as u know i have already built it using "mvn install -Dskip..." skipping test which gave build success at the end but when i import using maven in eclipse, it gave me tons of errors. so i thought of going the other way. – TechnocraT Jul 27 '11 at 07:11
  • Nah Maven is your friend once you learn to use it will never go the other way . Any how simple right click these folder(s) D:\Software\NMS\opennms-1.8.12-1\source\core\api\.settings\org.eclipse.jdt.c ore.prefs and in properties at operating system level see if readonly is checked it needs to to unchecked.Trying creating a text file just any thing to see if you can save any thing. If it works see these up arrows next to my comments make sure to click em ;) – Shahzeb Jul 27 '11 at 07:17
  • Thanks dude, iam very new to maven and yes i guess read-only access is be the reason for the error. But i still have miles to be traveled before i successfully build it. Also the opennms is a web application, how do i set it up as a web application in eclipse. – TechnocraT Jul 27 '11 at 07:27

1 Answers1

1

Right click these folder(s)

D:\Software\NMS\opennms-1.8.12-1\source\core\api\.settings\org.eclipse.jdt.c ore.prefs 


and in properties at operating system level see if readonly is checked it needs to to unchecked.Trying creating a text file just any thing to see if you can save any thing. If it works see these up arrows next to my comments make sure to click em ;)

Shahzeb
  • 4,745
  • 4
  • 27
  • 40