sbt / sbt-pom-reader

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

Support scala-maven-plugin compilerPlugins #41

Closed blast-hardcheese closed 8 years ago

blast-hardcheese commented 8 years ago

I know the goal of sbt-pom-reader is not to support plugins, but do compilerPlugins fall under that category? Currently, I'm looking at having a build.sbt with only the line to enable the si2712fix plugin, but I also need to define the same plugin in pom.xml, which seems error-prone and redundant when it comes to multi-project poms.

Example:

        <plugin>
          <artifactId>scala-maven-plugin</artifactId>
          <groupId>net.alchim31.maven</groupId>
          <version>3.2.2</version>
          <configuration>
            <compilerPlugins>
              <compilerPlugin>
                <groupId>org.wartremover</groupId>
                <artifactId>wartremover_${scala.binary.version}</artifactId>
                <version>${wartremover.version}</version>
              </compilerPlugin>
              <compilerPlugin>
                <groupId>com.milessabin</groupId>
                <artifactId>si2712fix-plugin_${scala.version}</artifactId>
                <version>1.2.0</version>
              </compilerPlugin>
            </compilerPlugins>
            ...
metasim commented 8 years ago

I hate to reply this way, but "PRs are welcome". :-) Not sure how much work would be involved with what you want, but there should be enough examples in the existing code base to extract components from the POM data model and translate them into SBT-land.

blast-hardcheese commented 8 years ago

Just wanted to make sure it was in line with the spirit of the plugin before devoting time to it :)

metasim commented 8 years ago

Cool. I think the statement about not supporting plugins was just to keep expectations low :-)

If you do end up being able to submit something, please make sure to include sbt "scripted" tests... it's the only way we can make sure new functionality remains stable.