sbt / sbt-pom-reader

Translates xml -> awesome. Maven-ish support for sbt.
Other
76 stars 26 forks source link

Allowing the default artifact/ project name to be overridden without having to use the directory name #3

Closed nmccready closed 10 years ago

nmccready commented 10 years ago

This pull easily allows this plugin to deal with naming issues with sbt. If scrubbing is to be done eventually this may not be needed. However this immediately allows you to bypass the issue for the root project.

jsuereth commented 10 years ago

Cool! Thanks for the fix. Just a note that adding a parameter to a method (even with a default) means this will be binary incompatible with the current release (requiring a version bump before we release).

Thanks again for the patch!

nmccready commented 10 years ago

np, I do have a question though. Is there anyway to force the ProjectRefs to build / install prior to running the pom.xml for the main project?

nmccready commented 10 years ago

I am trying to overcome maven forcefull design where I have mod1,mod2,mod3 defined ../ and the current project required mod1,mod2,mod3 all version 1.0.0 . With mvn compile , install from current project it always can not find the modules installed which makes sense. But I was hoping this tool could hack around maven since SBT is more flexible .

But currently I am running into the same issue where I can not force the mod1-3 to build install prior to it.

overall funky struct:

/root
   /mod1
   /mod2
   /mod3
   /current_poj (depends on mod1-3 specific versions.. when in reality it depends on the local projects above) 

In the hierarchy above I do not want to use root/pom.xml as it builds way more crummy modules than it should and takes forever. All I want to do is build install mod1,mod2,mod3 from /currentProj so it works and follows the pom updates.

Any ideas?

jsuereth commented 10 years ago

Well, this is something that may be possible with this plugin. I'm actually currently stumped from an issue whereby these multi-module projects, with parents, aren't resolving correctly in maven. It seems the mismatch can be quite bad.

What you want to do, essentially, is construct your own sbt build that loads mod1-3, current_proj and wires them together as being dependent. then you want to filter out (by hand) the dependencies you don't need. That should work, unless you run into any of these parent-pom issues I've recently discovered as a flaw with the technique I'm using to migrate maven -> sbt project.

nmccready commented 10 years ago

Yeah basically this stuff work magically in Intellij but IntelliJ becomes mad slow overtime. All we want to do is run currentProject quickly and rebuild on code changes.

Any pseudo code is appreciated. Wait for the weekend, I am sure your busy. Otherwise I'll keep searching or look through some older sbt multi project stuff I have somewhere.