Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gtfs-lib is missing in repository - build fails #2023

Closed
radumas opened this Issue Jul 1, 2015 · 10 comments

Comments

Projects
None yet
6 participants
@radumas
Copy link

radumas commented Jul 1, 2015

Following the Getting OTP Instructions to build from source. Running a Digital Ocean droplet with Ubuntu 14.04, I tried building with both Java 7 and Java 8 and got the same error. mvn -version returns

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.13.0-52-generic", arch: "amd64", family: "unix"

Output of mvn clean package

[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.opentripplanner:otp:jar:0.19.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-source-plugin is missing. @ line 155, column 21
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building OpenTripPlanner 0.19.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for com.conveyal:gtfs-lib:jar:0.1-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.993s
[INFO] Finished at: Wed Jul 01 14:52:54 EDT 2015
[INFO] Final Memory: 17M/162M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project otp: Could not resolve dependencies for project org.opentripplanner:otp:jar:0.19.0-SNAPSHOT: Failure to find com.conveyal:gtfs-lib:jar:0.1-SNAPSHOT in http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central2 has elapsed or updates are forced -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

@buma buma changed the title Maven Build of Master Branch Fails in Ubuntu 14.04 gtfs-lib is missing in repository - build fails Jul 2, 2015

@buma

This comment has been minimized.

Copy link
Contributor

buma commented Jul 2, 2015

It seems that gtfs-lib which is included for one test in f349cc8 and will be the future of GTFS loading is missing in repository for some reason. I can replicate a bug on my machine.

Quick fix is to remove gtfs-lib from POM and skip building tests (since test which uses gtfs-lib will fail).

Remove everything between <dependency> including dependency tags in pom.xml.

To make package without test you can use mvn -T 1C package -Dmaven.test.skip

-T 1C uses all the cores for building you can skip that if you want.

To use OTP you don't need to build it there is a link to jars on the page you linked.

I have changed the title of issue so that it is more usefull.

@buma buma added the bug label Jul 2, 2015

@abyrd

This comment has been minimized.

Copy link
Member

abyrd commented Jul 2, 2015

There was no gtfs-lib JAR file on the Conveyal Maven repository. One new test used the gtfs-lib, but apparently we were not deploying that artifact to the Maven repo. I just deployed it manually and the OTP build succeeds now for me. I will update the CI server to deploy gtfs-lib automatically.

@mattwigway

This comment has been minimized.

Copy link
Member

mattwigway commented Jul 2, 2015

I believe we have snapshots disabled for the Conveyal repo, which will prevent gtfs-lib from being pulled in.

@radumas

This comment has been minimized.

Copy link
Author

radumas commented Jul 2, 2015

Build successful with

        <!-- Conveyal GTFS loader, will eventually replace OBA entirely -->
        <!-- <dependency>
            <groupId>com.conveyal</groupId>
            <artifactId>gtfs-lib</artifactId>
             <version>0.1-SNAPSHOT</version>
        </dependency> -->

and running mvn -T 1C package -D maven.test.skip

Thanks folks

@buma

This comment has been minimized.

Copy link
Contributor

buma commented Jul 2, 2015

Mine build still doesn't succeed. I did mvn clean: mvn clean install -U. And maven only asks Conveyal repository for Joda time doesn't find it and doesn't ask it for any other JAR.

@johannilsson

This comment has been minimized.

Copy link
Contributor

johannilsson commented Jul 6, 2015

Build fails for me too unless I modify the source.

If someone else ends up here and don't want to modify the source you can install the gtfs-lib by cloning the gtfs-lib repository and then install the library manually. OTP will then pick the library from your local maven repo;

git clone git@github.com:conveyal/gtfs-lib.git
cd gtfs-lib
mvn install:install-file -Dfile=target/gtfs-lib-0.1-SNAPSHOT.jar -DpomFile=pom.xml
@andreyz

This comment has been minimized.

Copy link
Contributor

andreyz commented Jul 6, 2015

@abyrd

This comment has been minimized.

Copy link
Member

abyrd commented Jul 6, 2015

Ah I must have also had a copy installed in my local repo. Thanks for pointing this out @johannilsson and @mattwigway. Snapshots are indeed disabled in the OTP POM. I will fix this.

@mattwigway

This comment has been minimized.

Copy link
Member

mattwigway commented Jul 23, 2015

We can close this, no?

@abyrd

This comment has been minimized.

Copy link
Member

abyrd commented Jul 28, 2015

Yes, it's working now.

@abyrd abyrd closed this Jul 28, 2015

flibbertigibbet pushed a commit to flibbertigibbet/OpenTripPlanner that referenced this issue Jan 25, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.