#18880 closed task (fixed)
Fix Netbeans configuration and update/improve Developers Guide Compiling using Netbeans
Reported by: | Klumbumbus | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 20.03 |
Component: | Core | Version: | |
Keywords: | netbeans ivy | Cc: | bastiK |
Description (last modified by )
So far I compiled only with ant. To check out the advantages of an IDE I choose Netbeans and followed wiki:/DevelopersGuide/Compiling#CompilingusingNetbeans
It is outdated after r16006. Changing subdirectory netbeans/
to subdirectory ide/netbeans/
and updating the screenshot is no big deal.
edit: fixed
However there are the following problems:
After opening the netbeans project it did not find several jar files and folders. I selected the files manually however the folders test-unit, test-performance, test-functional and core-src are not available.
edit: fixed
Compiling does not work:
C:\Users\stefa\Documents\OSM\josm\core\ide\netbeans\nbbuild.xml:15: Cannot find C:\Users\stefa\Documents\OSM\josm\core\ide\build.xml imported from C:\Users\stefa\Documents\OSM\josm\core\ide\netbeans\nbbuild.xml
It seems it tries to find the josm build.xml in /ide, not in the root. Regression of r16006 or which additional steps are required for compiling?
edit: fixed, but new error, see comment:5
Attachments (2)
Change History (24)
by , 5 years ago
Attachment: | netbeans2.png added |
---|
comment:1 by , 5 years ago
Keywords: | netbeans added |
---|
comment:2 by , 5 years ago
Milestone: | → 20.03 |
---|
comment:3 by , 5 years ago
comment:5 by , 5 years ago
It's not yet working.
ant -f C:\\Users\\stefa\\Documents\\OSM\\josm\\core\\ide\\netbeans\\nbbuild.xml -Dnb.internal.action.name=rebuild clean jar init: deps-clean: Created dir: C:\Users\stefa\Documents\OSM\josm\core\ide\netbeans\build Updating property file: C:\Users\stefa\Documents\OSM\josm\core\ide\netbeans\build\built-clean.properties Deleting directory C:\Users\stefa\Documents\OSM\josm\core\ide\netbeans\build clean: init: deps-jar: Created dir: C:\Users\stefa\Documents\OSM\josm\core\ide\netbeans\build Updating property file: C:\Users\stefa\Documents\OSM\josm\core\ide\netbeans\build\built-jar.properties Created dir: C:\Users\stefa\Documents\OSM\josm\core\ide\netbeans\build\classes set-josmbase-properties: init-ivy: resolve: :: loading settings :: url = jar:file:/C:/Users/stefa/.ant/lib/ivy.jar!/org/apache/ivy/core/settings/ivysettings.xml C:\Users\stefa\Documents\OSM\josm\core\ide\netbeans\ivy.xml (Das System kann die angegebene Datei nicht finden) in file:/C:/Users/stefa/Documents/OSM/josm/core/ide/netbeans/ivy.xml C:\Users\stefa\Documents\OSM\josm\core\build.xml:1098: syntax errors in ivy file: java.text.ParseException: C:\Users\stefa\Documents\OSM\josm\core\ide\netbeans\ivy.xml (Das System kann die angegebene Datei nicht finden) in file:/C:/Users/stefa/Documents/OSM/josm/core/ide/netbeans/ivy.xml at org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser$Parser.parse(XmlModuleDescriptorParser.java:293) at org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser.parseDescriptor(XmlModuleDescriptorParser.java:123) at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser.parseDescriptor(AbstractModuleDescriptorParser.java:50) at org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:198) at org.apache.ivy.Ivy.resolve(Ivy.java:507) at org.apache.ivy.ant.IvyResolve.doExecute(IvyResolve.java:328) at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:259) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292) at sun.reflect.GeneratedMethodAccessor62.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99) at org.apache.tools.ant.Task.perform(Task.java:350) at org.apache.tools.ant.Target.execute(Target.java:449) at org.apache.tools.ant.Target.performTasks(Target.java:470) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1388) at org.apache.tools.ant.Project.executeTarget(Project.java:1361) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1251) at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:261) at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:574) at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:128) Caused by: java.io.FileNotFoundException: C:\Users\stefa\Documents\OSM\josm\core\ide\netbeans\ivy.xml (Das System kann die angegebene Datei nicht finden) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.<init>(FileInputStream.java:138) at java.io.FileInputStream.<init>(FileInputStream.java:93) at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90) at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188) at org.apache.ivy.util.url.BasicURLHandler.openStream(BasicURLHandler.java:211) at org.apache.ivy.util.url.URLHandlerDispatcher.openStream(URLHandlerDispatcher.java:137) at org.apache.ivy.util.url.URLHandlerDispatcher.openStream(URLHandlerDispatcher.java:129) at org.apache.ivy.util.XMLHelper.parse(XMLHelper.java:122) at org.apache.ivy.util.XMLHelper.parse(XMLHelper.java:116) at org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser$Parser.parse(XmlModuleDescriptorParser.java:272) ... 21 more BUILD FAILED (total time: 0 seconds)
comment:6 by , 5 years ago
Also it seems not right to me that I can't access the josm folder structure in the "Files" window (similar to the example project Anagram Game). Instead the structure starts with the sub sub folder ide\netbeans.
I cleared the Netbeans cache to hopefully get gid of any local changes made before r16064.
Another problem is that the file ide\netbeans\nbproject\project.properties gets modified. I don't think that should be the case.
-
project.properties
21 21 #debug.transport=dt_socket 22 22 debug.classpath=\ 23 23 ${run.classpath} 24 debug.modulepath=\ 25 ${run.modulepath} 24 26 debug.test.classpath=\ 25 27 ${run.test.classpath} 28 debug.test.modulepath=\ 29 ${run.test.modulepath} 26 30 # Files in build.classes.dir which should be excluded from distribution jar 27 31 dist.archive.excludes= 28 32 # This directory is removed when the project is cleaned: … … 55 59 javac.compilerargs=-Xlint:unchecked -Xlint:cast -Xlint:dep-ann -Xlint:divzero -Xlint:empty -Xlint:finally -Xlint:overrides -Xlint:static -Xlint:try -Xlint:deprecation 56 60 javac.deprecation=true 57 61 javac.external.vm=false 62 javac.modulepath= 63 javac.processormodulepath= 58 64 javac.processorpath=\ 59 65 ${javac.classpath} 60 66 javac.source=1.8 … … 75 81 ${file.reference.awaitility-3.1.5.jar}:\ 76 82 ${file.reference.spotbugs.jar}:\ 77 83 ${file.reference.commons-testing-2.1.0.jar} 84 javac.test.modulepath=\ 85 ${javac.modulepath} 78 86 javac.test.processorpath=\ 79 87 ${javac.test.classpath} 80 88 javadoc.additionalparam= … … 96 104 run.classpath=\ 97 105 ${javac.classpath}:\ 98 106 ${build.classes.dir} 107 run.modulepath=\ 108 ${javac.modulepath} 99 109 run.test.classpath=\ 100 110 ${javac.test.classpath}:\ 101 111 ${build.test.classes.dir} 112 run.test.modulepath=\ 113 ${javac.test.modulepath} 102 114 source.encoding=UTF-8 103 115 src.dir=${file.reference.core-src} 104 116 test.functional.dir=${file.reference.test-functional}
(As said I'm a IDE newbie, so if I'm talking bullshit, please interfere.)
by , 5 years ago
Attachment: | netbeans3.png added |
---|
comment:7 by , 5 years ago
I don't use Netbeans, only bastiK did. I guess new versions of Netbeans have additional properties, so feel free to commit the changes created by Netbeans.
comment:11 by , 5 years ago
comment:12 by , 5 years ago
Cc: | added |
---|
@bastiK: could you please have a look at the netbeans configuration?
comment:13 by , 5 years ago
Description: | modified (diff) |
---|---|
Summary: | update/improve Developers Guide Compiling using Netbeans → Fix Netbeans configuration and update/improve Developers Guide Compiling using Netbeans |
comment:14 by , 5 years ago
Component: | Wiki content → Core |
---|
comment:17 by , 5 years ago
Now Ivy runs fine with Netbeans. We need to update javac.classpath
with the contents of runtime.path
, as described on Netbeans wiki
comment:19 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I managed to build and run JOSM with the above change.
Note that the build needs to be run twice** The first build will write ivy.classpath in project.properties, second build will read it. I couldn't find a better way.
comment:22 by , 5 years ago
r16229 broke the project.properties file again as it still references the jar files.
In 16064/josm: