我希望SBT可以创建一个文件,并将项目的运行时完整类路径(Scala、管理和非管理库、项目类)写入该文件,用于特定阶段(在这种情况下,仅针对compile
)。
我正在尝试使用maven-antrun-plugin
复制我之前使用Maven完成的某些操作:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>generate-runner</id>
<phase>package</phase>
<configuration>
<target>
<property name="runtime_classpath" refid="maven.runtime.classpath" />
<property name="runtime_entrypoint" value="com.biasedbit.webserver.Bootstrap" />
<echo file="../../bin/run-server.sh" append="false">#!/bin/sh
java -classpath ${runtime_classpath} ${runtime_entrypoint} $$*
</echo>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
我该如何使用SBT实现这个?