Setting sbt.override.build.repos=true in TeamCity SBT runner

Hi Team,

Is there an environment configuration parameter on the agent that TeamCity SBT Runner is reading by default?
I would like to set the property "sbt.override.build.repos=true" so that SBT uses Nexus proxy repository.

Currently, we are passing this parameter in the "JVM command line parameters" field of each and every SBT build step.

Does the SBT runner reads an environment parameter by default, where we can add this option?

IntelliJ, for example, reads the sbt repositories file in the user home folder (~/.sbt/repositories)
Options can be set in this file.
(see galway's comment on this blog post http://blog.jetbrains.com/scala/2013/11/18/built-in-sbt-support-in-intellij-idea-13/)

so, how can I use a parameter to all SBT Runner builds?

I'm using TeamCity 8.1.29879 with the plugin Simple Build Tool (Scala) version snapshot-20150802215515

Thanks,
Eyal

2 comments

Hi Eyal,

TeamCity SBT Runner doesn't read anything additional to command line arguments you provide within build step in UI.
If you need to share some options between several builds you can use templates for your build configurations.
Please find more details in documentation https://confluence.jetbrains.com/display/TCD8/Build+Configuration+Template

Regards,
Kate

0

Hi Kate,

Happy new year! and thanks for the quick reply.

I'll see if it is feasible for us to use build template just for the SBT build step.

Seems to me that the SBT build step should have similar functionalities as the Maven build step.

The Maven build step allows uploading a "settings.xml" file to TeamCity and using it in the build.

Shouldn't the SBT build step have the same feature? i.e. upload a "repositories" file that can be shared between different builds.

Also, that Maven build step populates the configuration parameters of "maven.project.artifactId", "maven.project.groupId", "maven.project.name", and "maven.project.version".

We really need these values in the SBT build as well.

Thanks,
Eyal

0

Please sign in to leave a comment.