我目前正在Ubuntu 14.04 LTS中使用Apache Storm 0.9.3。我遇到Apache Storm 0.9.3中的maven编译器继续使用Java 6,尽管我已经安装了Java 7。
我的Ubuntu中的Java版本:
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) Client VM (build 24.80-b11, mixed mode)
我的Ubuntu中的Maven版本:
Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.7.0_80, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.13.0-52-generic", arch: "i386", family: "unix"
以下是我遇到的错误:
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.apache.storm:storm-starter:jar:0.9.3
[WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-javadoc-plugin is missing. @ org.apache.storm:storm:0.9.3, /home/user/.m2/repository/org/apache/storm/storm/0.9.3/storm-0.9.3.pom, line 694, column 21
[WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-report-plugin is missing. @ org.apache.storm:storm:0.9.3, /home/user/.m2/repository/org/apache/storm/storm/0.9.3/storm-0.9.3.pom, line 660, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building storm-starter 0.9.3
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-remote-resources-plugin:1.2.1:process (default) @ storm-starter ---
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ storm-starter ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 8 resources
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ storm-starter ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 48 source files to /home/user/storm/examples/storm-starter/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/user/storm/examples/storm-starter/src/jvm/storm/starter/bolt/PNMSTD.java:[79,19] strings in switch are not supported in -source 1.6
(use -source 7 or higher to enable strings in switch)
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.856s
[INFO] Finished at: Sun May 31 06:55:27 MYT 2015
[INFO] Final Memory: 18M/51M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project storm-starter: Compilation failure
[ERROR] /home/user/storm/examples/storm-starter/src/jvm/storm/starter/bolt/PNMSTD.java:[79,19] strings in switch are not supported in -source 1.6
[ERROR] (use -source 7 or higher to enable strings in switch)
[ERROR] -> [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/MojoFailureException
下面是/home/user/的一部分。m2/repository/org/apache/storm/storm/0.9.3/storm-0.9.3。与maven相关的pom:
<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>
<prerequisites>
<maven>3.0.0</maven>
</prerequisites>
<modules>
<module>storm-buildtools/maven-shade-clojure-transformer</module>
<module>storm-core</module>
<module>examples/storm-starter</module>
<module>external/storm-kafka</module>
<module>external/storm-hdfs</module>
<module>external/storm-hbase</module>
</modules>
<profiles>
<profile>
<id>sign</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>dist</id>
<modules>
<module>storm-dist/binary</module>
<module>storm-dist/source</module>
</modules>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<distributionManagement>
<site>
<id>storm.maven.website</id>
<name>Storm Website</name>
<url>file:///tmp/site</url>
</site>
</distributionManagement>
<repositories>
<repository>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<url>http://repo1.maven.org/maven2/</url>
</repository>
<repository>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
<id>clojars</id>
<url>https://clojars.org/repo/</url>
</repository>
</repositories>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.4</version>
</plugin>
<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>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5</version>
</plugin>
<plugin>
<groupId>com.theoryinpractise</groupId>
<artifactId>clojure-maven-plugin</artifactId>
<version>1.3.18</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.16</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.7</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.3</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<tagNameFormat>v@{project.version}</tagNameFormat>
</configuration>
</plugin>
<plugin>
<groupId>com.theoryinpractise</groupId>
<artifactId>clojure-maven-plugin</artifactId>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.11</version>
<reportSets>
<reportSet>
<reports>
<report>checkstyle</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.0.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<configuration>
<reportsDirectories>
<file>${project.build.directory}/test-reports</file>
<file>${project.build.directory}/surefire-reports</file>
</reportsDirectories>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>taglist-maven-plugin</artifactId>
<version>2.4</version>
<configuration>
<tagListOptions>
<tagClasses>
<tagClass>
<displayName>Todo Work</displayName>
<tags>
<tag>
<matchString>TODO</matchString>
<matchType>exact</matchType>
</tag>
<tag>
<matchString>FIXME</matchString>
<matchType>exact</matchType>
</tag>
</tags>
</tagClass>
</tagClasses>
</tagListOptions>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<version>0.11</version>
<configuration>
<excludeSubProjects>false</excludeSubProjects>
<excludes>
<!-- exclude maven artifacts -->
<exclude>**/target/**</exclude>
<!-- exclude intellij projects -->
<exclude>**/*.iml</exclude>
<!-- exclude CHANGELOG, VERSION, AND TODO files -->
<exclude>**/CHANGELOG.md</exclude>
<exclude>**/README.md</exclude>
<exclude>**/README.markdown</exclude>
<exclude>**/DEVELOPER.md</exclude>
<exclude>**/BYLAWS.md</exclude>
<exclude>**/STORM-UI-REST-API.md</exclude>
<exclude>SECURITY.md</exclude>
<exclude>VERSION</exclude>
<exclude>TODO</exclude>
<!-- thrift-generated code -->
<exclude>**/src/py/**</exclude>
<!-- the following are in the LICENSE file -->
<exclude>**/src/ui/public/js/jquery-1.6.2.min.js</exclude>
<exclude>**/src/ui/public/js/jquery.cookies.2.2.0.min.js</exclude>
<exclude>**/src/ui/public/js/jquery.tablesorter.min.js</exclude>
<exclude>**/src/ui/public/js/moment.min.js</exclude>
<exclude>**/src/ui/public/js/jquery.blockUI.min.js</exclude>
<exclude>**/src/ui/public/js/url.min.js</exclude>
<exclude>**/src/ui/public/js/arbor.js</exclude>
<exclude>**/src/ui/public/js/arbor-graphics.js</exclude>
<exclude>**/src/ui/public/js/arbor-tween.js</exclude>
<exclude>**/src/ui/public/js/jquery.mustache.js</exclude>
<exclude>**/src/ui/public/js/purl.js</exclude>
<!-- generated by shade plugin -->
<exclude>**/dependency-reduced-pom.xml</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</reporting>
首先,您必须安装Java 7。
如中所示
[警告]'报告。插件。插件。组织的“版本”。阿帕奇。专家插件:缺少maven javadoc插件。@组织。阿帕奇。Storm:Storm:0.9.3,/home/user/。m2/repository/org/apache/storm/storm/0.9.3/storm-0.9.3。pom,第694行,第21列[警告]'报告。插件。插件。组织的“版本”。阿帕奇。专家插件:缺少maven surefire报告插件。@组织。阿帕奇。Storm:Storm:0.9.3,/home/user/。m2/repository/org/apache/storm/storm/0.9.3/storm-0.9.3。pom,第660行,第21列
转到您的主目录并将cd光盘刻录到/。m2/repository/org/apache/storm/storm/0.9.3/然后是nano或vi storm-0.9.3。pom。
搜索
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
如果您打算使用java-7-oracle,请将1.6修改为1.7。如果您使用的是nan,您可以使用Ctrl W轻松搜索
问题内容: 尝试执行以下行时,仅显示最后两个语句(“ Here is some ERROR”和“ Here is some FATAL”),并且不显示前三个语句。我刚刚开始学习此主题,任何人都可以告诉为什么会这样呢? log4j.property有 问题答案: 您可能在项目中的某个地方有一个log4j.properties文件。在该文件中,您可以配置所需的调试输出级别。请参阅以下示例: 第一行将根
问题内容: 我使用Flickr照片搜索API的JavaScript创建了一个演示。现在,我将其转换为AngularJs。我在互联网上搜索,发现下面的配置。 组态: 服务: 控制器: 问题答案: 你不知道 您请求的服务器必须实现CORS才能从您的网站访问权限中授予JavaScript。您的JavaScript无法授予自己访问其他网站的权限。
问题内容: 标题说说我的问题。我需要将DTO包装到javascript方法回调中。目前,我应要求返回JSON。但是在Ajax中使用此问题,因为我将GET发送到其他域。当然还有治安警察。 我有创建附加提供的想法。有任何示例,链接或建议如何执行。 问题答案: RESTEasy中没有明确支持JSONP,但是在应用程序中启用JSONP的一种简单方法是编写Servlet过滤器。 这里有一些链接可以帮助您编写
问题内容: 我正在尝试使用jquery提出跨源请求,但它一直被消息拒绝 XMLHttpRequest无法加载http:// …请求的资源上不存在“ Access-Control-Allow-Origin”标头。因此,不能访问Origin…。 我正在使用flask,heroku和jquery 客户端代码如下所示: 在heroku方面,我正在使用flask,就像这样 问题答案: 当我部署到Heroku
问题内容: 当我在MySQL中执行查询时,它返回一条错误消息,说明未启用InnoDB。当我单击存储引擎时,InnoDB被禁用。 如何启用InnoDB? 问题答案: 您需要在文件中启用它,然后重新启动服务器: http://dev.mysql.com/doc/refman/5.1/zh-CN/innodb- parameters.html#option_mysqld_innodb 或者,您可以在运行
问题内容: 如何在xampp中启用curl? 我的PHP Twitter应用程序需要curl函数。但是未在XAMPP中启用它。如何启用它。我没有选择这样做的选择。 问题答案: 您必须修改xampp文件夹中的php.ini文件。需要更改三个不同位置的三个文件。 请按照以下步骤在Windows中使用XAMPP启用curl库: 步骤1: 浏览并打开以下3个文件 第2步: 通过删除分号(;)取消注释php