Right way to use -make:transitive ?

260 views
Skip to first unread message

IttayD

unread,
Aug 16, 2010, 12:52:02 AM8/16/10
to Maven and Scala
Hello,

I've read that the way to use scalac's -make:transitive is to add the
following to the plugin's configuration:
<arg>-make:transitive</arg>
<arg>-dependencyfile</arg>
<arg>$
{project.build.directory}/.scala_dependencies</arg>

However, wouldn't this cause any test compilation to override the
dependency file generated for the main compilation? If so, what is the
correct way?

Thank you,
Ittay

David Bernard

unread,
Aug 16, 2010, 5:42:05 AM8/16/10
to maven-a...@googlegroups.com
I don't use make:transitive (I used maven to make full build and eclipse for incremental).
Thnaks for reporting the issue, I'll try to provide a shorcut in the next version of the plugin (by defining default dependencyfile) to avoid the actual solution : create 2 executions :

~~~
      <plugin>
        <groupId>org.scala-tools</groupId>
        <artifactId>maven-scala-plugin</artifactId>
        <version>2.14.1</version>
        <executions>
          <execution>
            <id>cmain</id>
            <goals>
              <goal>compile</goal>
            </goals>
            <configuration>
              <args>
                <arg>-make:transitive</arg>
                <arg>-dependencyfile</arg>
                <arg>${project.build.directory}/.main_scala_dependencies</arg>
              </args>
            </configuration>
          </execution>
          <execution>
            <id>ctest</id>
            <goals>
              <goal>testCompile</goal>
            </goals>
            <configuration>
              <args>
                <arg>-make:transitive</arg>
                <arg>-dependencyfile</arg>
                <arg>${project.build.directory}/.test_scala_dependencies</arg>
              </args>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <jvmArgs>
            <jvmArg>-Xms64m</jvmArg>
            <jvmArg>-Xmx1024m</jvmArg>
          </jvmArgs>
        </configuration>
      </plugin>

~~~
/davidB
Reply all
Reply to author
Forward
0 new messages