opentraffic / traffic-engine-app

OTv1: Web application for processing and visualizing traffic statistics.
GNU General Public License v3.0
55 stars 31 forks source link

Cannot build from sources #1

Open rouen-sk opened 9 years ago

rouen-sk commented 9 years ago

Hi, I am trying to build from sources (I am .NET programmer, not much exp. in Java), and the build fail because following imports cannot be resolved

import org.opentripplanner.traffic.Segment; import org.opentripplanner.traffic.SegmentSpeedSample; import org.opentripplanner.traffic.StreetSpeedSnapshot; import org.opentripplanner.traffic.StreetSpeedSnapshotSource;

where can I find org.opentripplanner.traffic? It is not in sources I get from https://github.com/opentripplanner/OpenTripPlanner

radumas commented 8 years ago

My problem when building is that the traffic-engine jar doesn't seem to be in the conveyal maven repository

[ERROR] Failed to execute goal on project traffic-engine-app: Could not resolve dependencies
for project com.conveyal:traffic-engine-app:jar:0.0.1-SNAPSHOT:  Could not find artifact 
com.conveyal:traffic-engine:jar:0.1-SNAPSHOT in conveyal (http://maven.conveyal.com/) 
-> [Help 1]
mattwigway commented 8 years ago

Traffic engine 0.2, 0.3-SNAPSHOT and 0.3 are in the Conveyal Maven repo; I'm not sure why the pom here is still referencing 0.1-SNAPSHOT. That may or may not be on purpose.

radumas commented 8 years ago

This also affects traffic-example, which references the same engine jar.

radumas commented 8 years ago

Hi so I tried switching to version 0.3-SNAPSHOT in the pom.xml

    <dependency>
                <groupId>com.conveyal</groupId>
                <artifactId>traffic-engine</artifactId>
                <version>0.3-SNAPSHOT</version>
    </dependency>

and this is the output I got

Downloading: http://maven.conveyal.com/com/conveyal/traffic-engine/0.3-SNAPSHOT/maven-metadata.xml
[WARNING] The POM for com.conveyal:traffic-engine:jar:0.3-SNAPSHOT is missing, no dependency information available
Downloading: http://maven.conveyal.com/org/apache/commons/commons-imaging/1.0-SNAPSHOT/maven-metadata.xml
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.031s
[INFO] Final Memory: 16M/264M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project traffic-engine-app: Could not resolve dependencies for project com.conveyal:traffic-engine-app:jar:0.0.1-SNAPSHOT: Failure to find com.conveyal:traffic-engine:jar:0.3-SNAPSHOT in http://maven.conveyal.com/ was cached in the local repository, resolution will not be reattempted until the update interval of com.conveyal has elapsed or updates are forced -> [Help 1]

I'm running

Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.8.0_45-internal, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.16.0-49-generic", arch: "amd64", family: "unix"
mattwigway commented 8 years ago

Ah. The groupId is now io.opentraffic.

Matthew Wigginton Conway Transportation Analytics/Open Source Washington, DC indicatrix.org

---- On Wed, 16 Sep 2015 10:10:43 -0400 radumas<notifications@github.com> wrote ----

Hi so I tried switching to version 0.3-SNAPSHOT in the pom.xml <dependency> <groupId>com.conveyal</groupId> <artifactId>traffic-engine</artifactId> <version>0.3-SNAPSHOT</version> </dependency> and this is the output I got Downloading: https://repository.apache.org/content/repositories/snapshots/com/conveyal/traffic-engine/0.3-SNAPSHOT/maven-metadata.xml Downloading: http://repository.springsource.com/maven/bundles/external/com/conveyal/traffic-engine/0.3-SNAPSHOT/maven-metadata.xml Downloading: https://repository.apache.org/content/repositories/snapshots/com/conveyal/traffic-engine/0.3-SNAPSHOT/traffic-engine-0.3-SNAPSHOT.pom Downloading: file:///home/m2/repository/com/conveyal/traffic-engine/0.3-SNAPSHOT/traffic-engine-0.3-SNAPSHOT.pom Downloading: http://repository.springsource.com/maven/bundles/external/com/conveyal/traffic-engine/0.3-SNAPSHOT/traffic-engine-0.3-SNAPSHOT.pom [WARNING] The POM for com.conveyal:traffic-engine:jar:0.3-SNAPSHOT is missing, no dependency information available Downloading: file:///home/m2/repository/org/apache/commons/commons-imaging/1.0-SNAPSHOT/maven-metadata.xml Downloading: http://maven.conveyal.com/org/apache/commons/commons-imaging/1.0-SNAPSHOT/maven-metadata.xml Downloading: https://repository.apache.org/content/repositories/snapshots/org/apache/commons/commons-imaging/1.0-SNAPSHOT/maven-metadata.xml Downloading: http://repository.springsource.com/maven/bundles/external/org/apache/commons/commons-imaging/1.0-SNAPSHOT/maven-metadata.xml Downloading: http://download.osgeo.org/webdav/geotools/org/apache/commons/commons-imaging/1.0-SNAPSHOT/maven-metadata.xml Downloaded: https://repository.apache.org/content/repositories/snapshots/org/apache/commons/commons-imaging/1.0-SNAPSHOT/maven-metadata.xml (3 KB at 1.9 KB/sec) Downloading: http://maven.conveyal.com/org/opentripplanner/otp/0.19.0-SNAPSHOT/otp-0.19.0-20150914.215608-86.jar Downloading: http://maven.conveyal.com/crosby/binary/osmpbf/1.3.4-SNAPSHOT/osmpbf-1.3.4-20150914.191218-1.jar Downloaded: http://maven.conveyal.com/crosby/binary/osmpbf/1.3.4-SNAPSHOT/osmpbf-1.3.4-20150914.191218-1.jar (191 KB at 101.6 KB/sec) Downloaded: http://maven.conveyal.com/org/opentripplanner/otp/0.19.0-SNAPSHOT/otp-0.19.0-20150914.215608-86.jar (3038 KB at 438.8 KB/sec) Downloading: https://repository.apache.org/content/repositories/snapshots/com/conveyal/traffic-engine/0.3-SNAPSHOT/traffic-engine-0.3-SNAPSHOT.jar Downloading: file:///home/m2/repository/com/conveyal/traffic-engine/0.3-SNAPSHOT/traffic-engine-0.3-SNAPSHOT.jar Downloading: http://repository.springsource.com/maven/bundles/external/com/conveyal/traffic-engine/0.3-SNAPSHOT/traffic-engine-0.3-SNAPSHOT.jar [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1:05.570s [INFO] Final Memory: 14M/112M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project traffic-engine-app: Could not resolve dependencies for project com.conveyal:traffic-engine-app:jar:0.0.1-SNAPSHOT: Failure to find com.conveyal:traffic-engine:jar:0.3-SNAPSHOT in http://maven.conveyal.com/ was cached in the local repository, resolution will not be reattempted until the update interval of conveyal has elapsed or updates are forced -> [Help 1] [ERROR] — Reply to this email directly or view it on GitHub.

radumas commented 8 years ago

So with

          <repository>
            <id>io.opentraffic</id>
            <name>Conveyal Maven Repository</name>
            <url>http://maven.conveyal.com/</url>
          </repository>
    <dependency>
                <groupId>io.opentraffic</groupId>
                <artifactId>traffic-engine</artifactId>
                <version>0.3-SNAPSHOT</version>
    </dependency>

I get

[ERROR] /home/git/traffic-engine-app/src/main/java/com/conveyal/traffic/app/TrafficEngineApp.java:[22,33] package com.conveyal.traffic.data does not exist
[ERROR] /home/git/traffic-engine-app/src/main/java/com/conveyal/traffic/app/TrafficEngineApp.java:[23,39] package com.conveyal.traffic.data.stats does not exist
[ERROR] /home/git/traffic-engine-app/src/main/java/com/conveyal/traffic/app/TrafficEngineApp.java:[24,39] package com.conveyal.traffic.data.stats does not exist
[ERROR] /home/git/traffic-engine-app/src/main/java/com/conveyal/traffic/app/TrafficEngineApp.java:[25,33] package com.conveyal.traffic.geom does not exist

And so on. Seems like the change from conveyal.com to opentraffic.io broke a lot of dependencies?

mattwigway commented 8 years ago

Have you pulled down the latest traffic-engine-app code?

radumas commented 8 years ago

I've only used the latest commit from July 27th on the master branch. I see that 35fc90927d3b758ff8081caedc8c727946cff179 is ahead of master.

mattwigway commented 8 years ago

Yep, looks like the imports are wrong in master. @kpwebb do you have unpushed code?

radumas commented 8 years ago

Just to clarify my motivations here: I'm mostly interested in a form of traffic-engine which can export the processed data. I started commenting on this issue because it seemed similar to the build failure of traffic-example