我正在尝试启动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.
现在输出是.jar file
而不是.jnlp file
,如果我双击.jar文件也没有任何反应。
任何想法出了什么问题?
答案 0 :(得分:4)
您缺少pom.xml中的webstart个人资料
查看scage示例项目中的pom.xml:https://code.google.com/p/scage/downloads/detail?name=scage-example-project.zip&can=2&q=
它非常大,但其中包含指定配置文件的东西
<project>
<profiles>
<profile>
<id>webstart</id>
...
</profile>
</profiles>
</project>