我想讓SBT創建一個文件併爲特定的階段編寫項目的運行時完整類路徑(scala,managed和unmanaged libs,項目類)(在這種情況下,僅適用於compile
) 。用SBT的類路徑創建腳本
我想複製我的東西與Maven一樣,使用maven-antrun-plugin
:
<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?