Building IntelliJ projects that have had dependencies added from Maven

I've recently started using IntelliJ as I am starting out on an Android development in Java. Just to get up to speed, I began with an Android Library project. I want to use the rxjava extensions, so I added these to my project using

Project Structure -> Libraries -> From Maven.
The actual library I have added is

com.netflix.rxjava:rxjava-android:0.19.6
which depends on (and pulls in)
com.netflix.rxjava:rxjava-core:0.19.6
.

This works brilliantly on my developer workstation and everything builds within IntelliJ. I was hoping that this would transfer over to the TeamCity build server quite easily, but try as I might, I cannot get it to build. I let TeamCity detect and suggest build steps and it came up with an IntelliJ runner, as expected. I filled in all the fields with values that seem to make sense, but it will not build. Clearly the rxjava dependencies are missing. The IntelliJ build runner produces errors like this:
C:\BuildAgent\work\eefd62e2c3082b56\src\com\example\TigraAndroidUtilities\ObservableModel.java:3: package rx does not exist  
import rx.Observable;  
         ^  
C:\BuildAgent\work\eefd62e2c3082b56\src\com\example\TigraAndroidUtilities\ObservableModel.java:4:   package rx.subjects does not exist  
import rx.subjects.BehaviorSubject;  
                  ^  
C:\BuildAgent\work\eefd62e2c3082b56\src\com\example\TigraAndroidUtilities\ObservableModel.java:18:   cannot find symbol  
  symbol:   class BehaviorSubject  
  location: class com.example.TigraAndroidUtilities.ObservableModel  
    private BehaviorSubject modelStream;  
            ^  
C:\BuildAgent\work\eefd62e2c3082b56\src\com\example\TigraAndroidUtilities\ObservableModel.java:63:   cannot find symbol  
  symbol:   class Observable  
  location: class com.example.TigraAndroidUtilities.ObservableModel  
    public Observable toObservable()  
           ^  
C:\BuildAgent\work\eefd62e2c3082b56\src\com\example\TigraAndroidUtilities\ObservableModel.java:28:   cannot find symbol  
  symbol:   variable BehaviorSubject  
  location: class com.example.TigraAndroidUtilities.ObservableModel  
        modelStream = BehaviorSubject.create(modelData);  
                      ^  
C:\BuildAgent\work\eefd62e2c3082b56\src\com\example\TigraAndroidUtilities\ObservableModel.java:65:   cannot find symbol  
  symbol:   variable Observable  
  location: class com.example.TigraAndroidUtilities.ObservableModel  
        if (completed) { return Observable.empty(); }
                                ^   

These are all references to the rxjava stuff. So disappointing as it all built perfectly on my workstation!

So what am I missing here? What do I need to do to make this build on my build agents?

Thanks,

Tim.

1 comment
Comment actions Permalink

Hi,

Unfortunately Maven libraries in IDEA Projects are not supported in TeamCity now. Please watch/vote for this feature request.
As workaround you can manually add these libraries to your project.

0

Please sign in to leave a comment.