-
Notifications
You must be signed in to change notification settings - Fork 179
faq 107745867
by Karsten Hager on 2017-02-07 14:38:13
Originally, I was looking for a shapefile to .xml converter and found one in the playground from juliakern. Unfortunately, in the 0.8.1. Version of the Example Project, there is an older version of the .core.network.networkutils which doesnt seem to work with the playground-example because there are some important functions missing (the master version of networkutils has ~ 200 code lines more than the 0.8.1 one) .
Now I tried to update the version of the example project in the pom.xml file to 0.9.0-snapshot (using the development version code snippet from matsim.org/download), but now eclipse cant find any sources anymore (even though a matsim-0.9.0-SNAPSHOT.jar exists) and I cant have a look at the sourcecodes. What might be the problem?
I can provide the pom.xml, if needed. Thanks for help!
by Johan W. Joubert on 2017-02-07 21:14:43
Hi Karsten, to link the sources will probably depend on your Integrated Development Environment (IDE) - for example Eclipse or IntelliJ.
In Eclipse you would right-click on the project, select Build Path → Configure Build Path. In the window that pops up, select the Libraries tab on the right side, expand the matsim-0.9.0-SNAPSHOT.jar
(assuming that is how you linked the library). Once you expanded it, you will see one of the first options is probably Source attachment: (None). Select it, you will see the Edit... button shown on the right, and from there you can select the path to the sources file (probably the jar).
Hope that helps you along.
by Kai Nagel on 2017-02-11 09:56:18
Glad it worked that way. In general, I would prefer to have this work automatically. Problem is that the gurus are of the opinion that this should be an IDE setting (i.e. an eclipse or an IntelliJ setting) rather than a project setting. Yet supposedly there is a pom.xml solution for eclipse, which is the following snippet. It should be in newer versions of the java example project. Pls let us know if you gather any experiences with this.
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<downloadSources>true</downloadSources>
<downloadJavadocs>true</downloadJavadocs>
</configuration>
</plugin>
...
<plugins>
</build>
See MATSIM-566 for the discussion.
You are viewing an archive of the previous MATSim Q&A site. The real site is now at https://matsim.org/faq