Skip to content

faq 94109699

Billy Charlton edited this page Sep 5, 2018 · 2 revisions

Is MATSim core no longer independent?

by Johan W. Joubert on 2016-11-14 06:37:43


I see in the matsim core's pom.xml that the core is now dependent on matsim-examples. Even if I try to do a  

mvn install -DskipTests=true

on the matsim folder it fails, complaining that the matsim-examples artefact is not found. I was under the impression that the matsim core should be independent from (any) other matsim bits and pieces.

If, however, one runs the install on the entire repository (it seems to be fine, and Maven picks up that the examples folder must be installed first. For now this is just a question from my side.


Comments: 3


Re: Is MATSim core no longer independent?

by Kai Nagel on 2016-11-14 07:03:15

That is correct. It was the only way we could think of to make the test case examples available also to contribs and playgrounds in a clean way. 


Re: Is MATSim core no longer independent?

by Thibaut Dubernet on 2016-11-14 09:38:15

Note that you do not need to build the whole repository (which tends to take a while). From the root of the project, you can run:

mvn --projects playgrounds/myplayground/ --also-make clean install -DskipTests=true

to clean and install the "myplayground" playground and all its dependencies. This will also work with matsim "core" itself:

mvn --projects matsim/ --also-make clean install -DskipTests=true

This way, you do not need to worry what depends on what, without waiting forever for things you do not need to compile.



Re: Is MATSim core no longer independent?

by Michael Zilske on 2016-11-15 11:36:07

It only depends on the examples for the "test" scope:

<dependency>
<groupId>org.matsim</groupId>
<artifactId>matsim-examples</artifactId>
<version>0.9.0-SNAPSHOT</version>
<scope>test</scope>
</dependency>

In my understanding, that's fine. The compiled JAR doesn't have the dependency, then. I don't know why "mvn install" wants it to be there. Perhaps it still wants to compile the tests, even if it doesn't execute them.

Clone this wiki locally