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

thisProject #1258

Closed
ahjohannessen opened this issue Apr 11, 2014 · 8 comments
Closed

thisProject #1258

ahjohannessen opened this issue Apr 11, 2014 · 8 comments

Comments

@ahjohannessen
Copy link
Contributor

I have made a sbt-plugin that is used to bootstrap various projects in our organization. The sbt-plugin contains various useful common generic settings for things such as scalac, basic test dependencies and also more specific things such as publishing and resolvers tied to our organization.

In order to use this in a fresh project I define the following:

In ./project/plugins.sbt:

resolvers += Resolver.url("n", url("u"))(Resolver.ivyStylePatterns)

addSbtPlugin("a.b.c" %% "c-sbt" % "0.0.1")

In ./build.sbt:

name := "ohhi"

version := "x.y.z"

commonSettings

This works perfect except for when I publish artifacts, because I wish to use a project id that I define. In our case it is common that id == name.

This is trivial to do in a build.scala, but I do not seem to be able to set the project id in the .sbt file. Is there some way to accomplish this?

@cunei
Copy link

cunei commented Apr 11, 2014

If you are using sbt 0.13, project ids can be specified within an .sbt file by using the syntax described at the beginning of this page: http://www.scala-sbt.org/release/docs/Getting-Started/Multi-Project.html

I hope that can be of help with your query. I am closing this ticket, however, as this is not actually an sbt bug description or a request for enhancement. General support for sbt is best obtained via StackOverflow, where you can post general usage questions.

@cunei cunei closed this as completed Apr 11, 2014
@ahjohannessen
Copy link
Contributor Author

cunei, what I was after is more like:

id := "id1"

and not lazy val id1 = project

@jsuereth
Copy link
Member

You can do:

lazy val project = Project("id1", file("."))

Or what not. We should probably fix it to be shared.

@eed3si9n eed3si9n reopened this Apr 11, 2014
@eed3si9n
Copy link
Member

I asked @ahjohannessen to create this ticket on twitter since I thought this could relate to improving ux (including auto plugins etc), we've talked about self reference.

@jsuereth
Copy link
Member

@eed3si9n If you have time to chat, I have a proposal around that now (although not a self reference).

@jsuereth
Copy link
Member

We're going to investigate something like this in relation to #1213

I'm adding a quick proposal there.

@jsuereth
Copy link
Member

Here's the proposal: #1213 (comment)

I may start further comments on this case.

@dwijnand
Copy link
Member

This ticket is very confusing (and old). Is it about "thisProject" or about project id?

I'm going to close a blind eye and assume the root issue was dealt with in #1213.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants