java - Building IntelliJ project in TeamCity -
i'm new intellij , java have fair bit of teamcity experience, building .net projects.
i have created simple android library project in intellij single class uses rxjava (reactive extensions java). have added rx library in intellij using project structure -> libraries -> from maven. actual library have added com.netflix.rxjava:rxjava-android:0.19.6 pulls in com.netflix.rxjava:rxjava-core:0.19.6.
this works brilliantly , project compiles within intellij without having install maven. nice job, jetbrains.
however, when try build project in teamcity using intellij-idea runner, project doesn't compile. bad jetbrains!
i errors on references rx.*, said worked on workstation. errors teamcity this:
c:\buildagent\work\eefd62e2c3082b56\src\com\example\tigraandroidutilities\observablemodel.java:3: package rx not exist import rx.observable; ^ c:\buildagent\work\eefd62e2c3082b56\src\com\example\tigraandroidutilities\observablemodel.java:4: package rx.subjects 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(); } ^ here's i've tried:
- considered using maven build runner instead; project doesn't have pom file it's not maven build.
- i've tried installing maven on build agent, doesn't seem make difference , didn't need install intellij work locally can't see why needed.
- there path macro called maven_repository in intellij build runner settings , i've tried setting various different values, no luck.
- i've looked @ jetbrains' documentation intellij runner , far can tell, i've configured build step correctly. i'm missing though.
this bit frustrating, i've been tinkering hours nothing seems work , have no clue i'm doing wrong. must have missed somewhere. how can build working in teamcity?
as of teamcity 9.1, idea runner can't build maven modules longer, nor can auto-download external artifacts maven central.
basically, need is:
download external artifacts, 1 one, using teamcity maven runner and
maven-dependency-plugin, described in this answer., e. g.:mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.0:get com.netflix.rxjava:rxjava-android:0.19.6you'll need many maven build steps number of dependencies in idea project, , these steps must precede idea runner build step.
at build configuration level, set
system.path.macro.maven.repositorysystem property%env.home%/.m2/repository.
that's it.
happy building!
Comments
Post a Comment