我正在尝试启动一个Scage项目。我以前从未使用过maven。
我创建了一个 pom.xml 文件并使用 intellij 下载了这些文件
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>ScageTest</groupId>
<artifactId>ScageTest</artifactId>
<version>1.0</version>
<repositories>
<repository>
<id>scage</id>
<name>Scage Maven Repo</name>
<url>http://scage.googlecode.com/svn/maven-repository</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>su.msk.dunno</groupId>
<artifactId>scage</artifactId>
<version>0.9</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
这工作得很好。如教程中所述,我还创建了主文件
import net.scage.ScageScreenApp
import net.scage.ScageLib._
import net.scage.support.Vec
object HelloWorldExample extends ScageScreenApp("Hello World") {
private var ang = 0f
actionStaticPeriod(100) {
ang += 5
}
backgroundColor = BLACK
render {
openglMove(windowSize/2)
openglRotate(ang)
print("Hello World!", Vec(-50, -5), GREEN)
}
}
正如教程中所指出的,我必须使用这个命令来构建它mvn clean package -Pwebstart
日志:
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-jar-plugin:2.3.2:jar (default-jar) @ ScageTest ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: C:\Users\kanta\IdeaProjects\ScageTest\target\ScageTest-1.0.
jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.922s
[INFO] Finished at: Mon Oct 29 23:40:07 CET 2012
[INFO] Final Memory: 4M/15M
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile "webstart" could not be activated because it doe
s not exist.
现在输出是 a.jar file
而不是 a .jnlp file
,如果我双击 .jar 文件也不会发生任何事情。
任何想法出了什么问题?