|
From: Nick C. <nic...@ve...> - 2015-06-15 12:23:29
|
David, Thanks for sharing this. Nick > On Jun 12, 2015, at 10:14 AM, David Momper <dav...@gm...> wrote: > > I recently tried using Maven to manage my library dependencies for a Repast Simphony project, and was eventually able to get it working. The following provides a description for anyone else interested in doing this: > > The jars contained in the Eclipse Maven Managed Dependencies are not included in the classpath used by the default launcher associated with a Repast project. Because of this, launching the project when there are Maven dependencies will result in a NoClassDefFoundError as Repast searches through the classpath looking for annotations. > > I first attempted to add the Maven dependencies through the Run Configurations menu, but Eclipse would not allow it. Eclipse prompts "Use Maven Project settings to configure Maven dependency resolution", but Maven project settings aren't used by the Repast launchers. > > I was able to get this working by adding the Eclipse Maven Managed Dependencies to the launch file (located in launchers/[project name] Model.launch). I added the following line to the classpath entries: > > <listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER" path="3" type="4"/> "/> > > Now the Maven dependencies work with no problems. I hope this is helpful to someone else out there. > ------------------------------------------------------------------------------ > _______________________________________________ > Repast-interest mailing list > Rep...@li... > https://lists.sourceforge.net/lists/listinfo/repast-interest |