Javaのオープンソースであるnextrtc-signaling-serverをテストしました。しかし、Mavenのビルドの問題に遭遇しました。これが解決されることを願っています。
私のコンソールログ
[INFO] Building jar: D:\signallinServer\nextrtc-signaling-server\target\nextrtc-signaling-server-0.0.4-SNAPSHOT-javadoc.jar
[INFO]
[INFO] --- exec-maven-plugin:1.5.0:Java (default-cli) @ nextrtc-signaling-server ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.430 s
[INFO] Finished at: 2016-08-29T11:12:34+09:00
[INFO] Final Memory: 26M/223M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.5.0:Java (default-cli) on project nextrtc-signaling-server: The parameters 'mainClass' for goal org.codehaus.mojo:exec-maven-plugin:1.5.0:Java are missing or invalid -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.Apache.org/confluence/display/MAVEN/PluginParameterException
POM.xml
http://maven.Apache.org/xsd/maven-4.0.0.xsd "> 4.0.0
<groupId>org.nextrtc.signalingserver</groupId>
<artifactId>nextrtc-signaling-server</artifactId>
<version>0.0.4-SNAPSHOT</version>
<packaging>jar</packaging>
<name>nextrtc-signaling-server</name>
<url>http://nextrtc.org</url>
<description>Library providing signaling protocol for WebRTC</description>
<licenses>
<license>
<name>MIT License</name>
<url>http://www.opensource.org/licenses/mit-license.php</url>
</license>
</licenses>
<developers>
<developer>
<name>Marcin Ślósarz</name>
<email>[email protected]</email>
<organization>NextRTC</organization>
<organizationUrl>http://nextrtc.org</organizationUrl>
</developer>
</developers>
<issueManagement>
<url>https://github.com/mslosarz/nextrtc-signaling-server/issues</url>
<system>GitHub Issues</system>
</issueManagement>
<scm>
<connection>scm:git:https://github.com/mslosarz/nextrtc-signaling-server.git</connection>
<developerConnection>scm:git:[email protected]:mslosarz/nextrtc-signaling-server.git</developerConnection>
<url>https://github.com/mslosarz/nextrtc-signaling-server</url>
</scm>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<spring-version>4.2.4.RELEASE</spring-version>
</properties>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<build>
<plugins>
<plugin>
<groupId>org.Apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
</plugin>
<plugin>
<groupId>org.Apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.Apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.Apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring-version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-websocket</artifactId>
<version>${spring-version}</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.9.2</version>
</dependency>
<dependency>
<groupId>javax.websocket</groupId>
<artifactId>javax.websocket-api</artifactId>
<version>1.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.16.6</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>19.0</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>org.Apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
</dependency>
<dependency>
<groupId>com.googlecode.zohhak</groupId>
<artifactId>zohhak</artifactId>
<version>1.1.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>1.10.19</version>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>hamcrest-core</artifactId>
<groupId>org.hamcrest</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
</dependencies>
私はこのソースを "clean package exec:Java"(Maven Goals)で構築しました
私は何をしなければなりませんか?本当に直したい。
次のコマンドを使用して、nextrtc-signaling-serverプロジェクト( https://github.com/mslosarz/nextrtc-signaling-server )をビルドできます。
mvn clean package
パッケージを含むプロジェクト(たとえば、com.sample.my)にメインクラス(たとえば、MySampleApplication.Java)がある場合は、以下のコマンドを使用して実行できます。
mvn exec:Java -Dexec.mainClass="com.sample.my.MySampleApplication"
「nextrtc-signaling-server」を使用して新しいアプリケーションを開発する場合は、mavenプロジェクトに以下のmaven依存関係を追加します。参照してください https://nextrtc.org/archives/85
<dependency>
<groupId>org.nextrtc.signalingserver</groupId>
<artifactId>nextrtc-signaling-server</artifactId>
<version>0.0.3</version>
</dependency>
この問題を修正するために多くの作業を行う必要はありません。サービスの下にあるMavenリポジトリーに移動し、右クリックして「リポジトリーの追加」を選択し、リポジトリー名を追加します。この場合、org.codehausである必要があります...