【发布时间】:2012-02-15 07:58:35
【问题描述】:
我想让 SBT 创建一个文件并为特定阶段(在这种情况下,仅适用于 compile)编写项目的运行时完整类路径(scala、托管和非托管库、项目类)。
我正在尝试使用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 做到这一点?
【问题讨论】: