问题描述
我想我的集成,提供的环境。这是我的特拉维斯配置:
语言:JAVA
JDK:
- openjdk7
- oraclejdk7
脚本:MVN测试
下面是特拉维斯打印输出:
使用工人:bluebox-linux-1.worker.travis-ci.org:travis-linux-9
$ git的克隆--depth = 50 --branch =主人的git://github.com/tkoomzaaskz/wealthy-laughing-duck.git tkoomzaaskz /富裕,笑鸭
克隆到'tkoomzaaskz /大款,笑鸭......
遥控器:计数对象:458,完成。
遥控器:COM pressing对象:100%(263分之263)完成。
遥控器:总458(增量156),再利用390(增量96)
接收对象:100%(458分之458),458.40昆明植物研究所,完成。
解决增量:100%(一百五十六分之一百五十六)完成。
$ CD tkoomzaaskz /富裕,笑鸭
$ git的结帐-qf 47d1ef528f19ad6d01288ac9a3d4c550a79b14f4
$ jdk_switcher使用openjdk7
切换到OpenJDK7(Java的1.7.0-的OpenJDK-AMD64),JAVA_HOME将被设置为/ usr / lib目录/ JVM / Java的7-的OpenJDK,AMD64
更新替代方案:错误:没有合适的替代品。
更新替代方案:错误:mozilla-javaplugin.so没有办法。
更新Java的替代品:插件替代不存在:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/IcedTeaPlugin.so
$ Java的版本
Java版本1.7.0_15
OpenJDK的运行时环境(IcedTea7 2.3.7)(7u15-2.3.7-0ubuntu1〜12.04.1)
OpenJDK的64位服务器VM(23.7建造-B01,混合模式)
$ javac的-version
javac的1.7.0_15
$ MVN安装--quiet -DskipTests =真
[错误]未能执行目标org.apache.maven.plugins:Maven的编译器插件:2.0.2:编译(默认编译)项目富裕,笑鸭:编译失败:编译失败:
[错误] /home/travis/build/tkoomzaaskz/wealthy-laughing-duck/src/main/java/com/blogspot/symfonyworld/wealthylaughingduck/dao/OutcomeDao.java:[19,8]错误:泛型是不-source 1.3支持
[错误]
[错误](使用-source 5或更高,以使仿制药)
[错误] /home/travis/build/tkoomzaaskz/wealthy-laughing-duck/src/main/java/com/blogspot/symfonyworld/wealthylaughingduck/model/Income.java:[12,1]错误:注释不-source 1.3支持
[错误]
[错误](使用-source 5或更高,以使注解)
[错误] /home/travis/build/tkoomzaaskz/wealthy-laughing-duck/src/main/java/com/blogspot/symfonyworld/wealthylaughingduck/model/User.java:[10,1]错误:注释不-source 1.3支持
输出说,我使用太旧版本的Java使用注释和泛型。但是,这些不是什么新鲜事,他们有以某种方式支持(我猜)。我一直在寻找特拉维斯/ Java文档但没有发现有关Java版本的选项(所以我试图用不同的JDK)。任何人都可以指出我应该怎么投入特拉维斯配置文件?
编辑:
以下@hertzsprung,我跑了 MVN帮助:有效-POM
和它返回下面的输出(事实上,无论是源
也不目标
的属性被记定义 Maven的编译器插件
- 我该怎么办呢)?
<! - ================================= ===================================== - >
&所述;! - - >
!15:: - ;&LT上2013-03-24T08通过生成的Maven插件帮助13 - >
< - 请参阅:http://maven.apache.org/plugins/maven-help-plugin/ - >
&所述;! - - >
&所述;! - ============================================= ========================= - >&所述;! - ============================================= ========================= - >
&所述;! - - >
<! - 有效POM项目 - >
< - 'com.blogspot.symfony世界:有钱人,笑鸭:罐子:1.0快照 - >
&所述;! - - >
&所述;! - ============================================= ========================= - ><项目的xmlns =http://maven.apache.org/POM/4.0.0的xmlns:XSI =http://www.w3.org/2001/XMLSchema-instanceXSI:=的schemaLocationHTTP: //maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">
< modelVersion> 4.0.0< / modelVersion>
<&的groupId GT; com.blogspot.symfony世界< /的groupId>
<&的artifactId GT;有钱的,笑鸭< / artifactId的>
<&版GT; 1.0-SNAPSHOT< /版本>
<名称>有钱的,笑鸭< /名称>
&LT; URL&GT; HTTP://maven.apache.org< / URL&GT;
&LT;建立&GT;
&LT; sourceDirectory&GT;在/ var / WWW / github上/富裕,笑鸭/ src目录/主/ JAVA&LT; / sourceDirectory&GT;
&LT; scriptSourceDirectory&GT;的src / main /脚本&LT; / scriptSourceDirectory&GT;
<testSourceDirectory>/var/www/github/wealthy-laughing-duck/src/test/java</testSourceDirectory>
&LT;输出目录&GT;在/ var / WWW / github上/富裕,笑鸭/目标/类和LT; /输出目录&GT;
<testOutputDirectory>/var/www/github/wealthy-laughing-duck/target/test-classes</testOutputDirectory>
&LT;资源&GT;
&LT;资源&GT;
&LT; mergeId&GT;资源-0℃/ mergeId&GT;
&LT;&目录GT;在/ var / WWW / github上/富裕,笑鸭/ src目录/主/资源和LT; /目录&GT;
&LT; /资源&GT;
&LT; /资源&GT;
&LT; testResources&GT;
&LT; testResource&GT;
&LT; mergeId&GT;资源-1 LT; / mergeId&GT;
&LT;&目录GT;在/ var / WWW / github上/富裕,笑鸭/ src目录/测试/资源&LT; /目录&GT;
&LT; / testResource&GT;
&LT; / testResources&GT;
&LT;&目录GT;在/ var / WWW / github上/富裕,笑鸭/目标&LT; /目录&GT;
&LT; finalName&GT;有钱的,笑鸭-1.0-SNAPSHOT&LT; / finalName&GT;
&LT; pluginManagement&GT;
&LT;&插件GT;
&LT;&插件GT;
&LT;&的artifactId GT;的maven-antrun-插件&LT; / artifactId的&GT;
&LT;&版GT; 1.6 LT; /版本&GT;
&LT; /插件&GT;
&LT;&插件GT;
&LT;&的artifactId GT; Maven的组装插件&LT; / artifactId的&GT;
&LT;&版GT; 2.2-β-4 /版本&GT;
&LT; /插件&GT;
&LT;&插件GT;
&LT;&的artifactId GT;的maven-清理插件&LT; / artifactId的&GT;
&LT;&版GT; 2.3&LT; /版本&GT;
&LT; /插件&GT;
&LT;&插件GT;
&LT;&的artifactId GT; Maven的编译器插件&LT; / artifactId的&GT;
&LT;&版GT; 2.0.2&LT; /版本&GT;
&LT; /插件&GT;
&LT;&插件GT;
&LT;&的artifactId GT; Maven的依赖,插件&LT; / artifactId的&GT;
&LT;&版GT; 2.1&LT; /版本&GT;
&LT; /插件&GT;
&LT;&插件GT;
&LT;&的artifactId GT; Maven的部署,插件和LT; / artifactId的&GT;
&LT;&版GT; 2.4&LT; /版本&GT;
&LT; /插件&GT;
&LT;&插件GT;
&LT;&的artifactId GT;的maven-耳插件&LT; / artifactId的&GT;
&LT;&版GT; 2.3.2&LT; /版本&GT;
&LT; /插件&GT;
&LT;&插件GT;
&LT;&的artifactId GT; Maven的EJB的插件和LT; / artifactId的&GT;
&LT;&版GT; 2.2&LT; /版本&GT;
&LT; /插件&GT;
&LT;&插件GT;
&LT;&的artifactId GT; Maven的安装,插件&LT; / artifactId的&GT;
&LT;&版GT; 2.3&LT; /版本&GT;
&LT; /插件&GT;
&LT;&插件GT;
&LT;&的artifactId GT;的maven-JAR-插件&LT; / artifactId的&GT;
&LT;&版GT; 2.2&LT; /版本&GT;
&LT; /插件&GT;
&LT;&插件GT;
&LT;&的artifactId GT; Maven的Javadoc的插件&LT; / artifactId的&GT;
&LT;&版GT; 2.6.1&LT; /版本&GT;
&LT; /插件&GT;
&LT;&插件GT;
&LT;&的artifactId GT; Maven的插件,插件&LT; / artifactId的&GT;
&LT;&版GT; 2.8 LT; /版本&GT;
&LT; /插件&GT;
&LT;&插件GT;
&LT;&的artifactId GT;的maven-RAR-插件&LT; / artifactId的&GT;
&LT;&版GT; 2.2&LT; /版本&GT;
&LT; /插件&GT;
&LT;&插件GT;
&LT;&的artifactId GT; Maven的释放,插件和LT; / artifactId的&GT;
&LT;&版GT; 2.0-β-8 LT; /版本&GT;
&LT; /插件&GT;
&LT;&插件GT;
&LT;&的artifactId GT; Maven的资源 - 插件和LT; / artifactId的&GT;
&LT;&版GT; 2.3&LT; /版本&GT;
&LT; /插件&GT;
&LT;&插件GT;
&LT;&的artifactId GT; Maven的网站插件&LT; / artifactId的&GT;
&LT;&版GT; 2.1&LT; /版本&GT;
&LT; /插件&GT;
&LT;&插件GT;
&LT;&的artifactId GT; Maven的源代码插件与LT; / artifactId的&GT;
&LT;&版GT; 2.0.4&LT; /版本&GT;
&LT; /插件&GT;
&LT;&插件GT;
&LT;&的artifactId GT; Maven的万无一失,插件&LT; / artifactId的&GT;
&LT;&版GT; 2.4.3&LT; /版本&GT;
&LT; /插件&GT;
&LT;&插件GT;
&LT;&的artifactId GT; Maven的战争插件&LT; / artifactId的&GT;
&LT;&版GT; 2.1-β-1&LT; /版本&GT;
&LT; /插件&GT;
&LT; /插件&GT;
&LT; / pluginManagement&GT;
&LT;&插件GT;
&LT;&插件GT;
&LT;&的artifactId GT; Maven的帮助下,插件和LT; / artifactId的&GT;
&LT;&版GT; 2.2&LT; /版本&GT;
&LT; /插件&GT;
&LT; /插件&GT;
&LT; /构建&GT;
&LT;库&GT;
&LT;&库GT;
&LT;&快照GT;
&LT;&启用GT假LT; /启用&GT;
&LT; /快照&GT;
&LT;&ID GT;中央&LT; / ID&GT;
&LT;名称&gt; Maven仓库总机&LT; /名称&gt;
&LT; URL&GT; HTTP://repo1.maven.org/maven2< / URL&GT;
&LT; /存储库&GT;
&LT; /存储库&GT;
&LT; pluginRepositories&GT;
&LT; pluginRepository&GT;
&LT;发布和GT;
&LT; updatePolicy&GT;绝不&LT; / updatePolicy&GT;
&LT; /释放&GT;
&LT;&快照GT;
&LT;&启用GT假LT; /启用&GT;
&LT; /快照&GT;
&LT;&ID GT;中央&LT; / ID&GT;
&LT;名称&gt;的Maven插件库&LT; /名称&gt;
&LT; URL&GT; HTTP://repo1.maven.org/maven2< / URL&GT;
&LT; / pluginRepository&GT;
&LT; / pluginRepositories&GT;
&LT;依赖和GT;
&LT;&依赖性GT;
&LT;&的groupId GT;的JUnit&LT; /的groupId&GT;
&LT;&的artifactId GT;的JUnit&LT; / artifactId的&GT;
&LT;&版GT; 3.8.1&LT; /版本&GT;
&LT;&范围GT;试验&LT; /&范围GT;
&LT; /依赖性&GT;
&LT;&依赖性GT;
&LT;&的groupId GT; org.apache.thrift&LT; /的groupId&GT;
&LT;&的artifactId GT; libthrift&LT; / artifactId的&GT;
&LT;&版GT; 0.9.0&LT; /版本&GT;
&LT; /依赖性&GT;
&LT;&依赖性GT;
&LT;&的groupId GT; org.slf4j&LT; /的groupId&GT;
&LT;&的artifactId GT; SLF4J的API&LT; / artifactId的&GT;
&LT;&版GT; 1.7.3&LT; /版本&GT;
&LT; /依赖性&GT;
&LT;&依赖性GT;
&LT;&的groupId GT;&org.hibernate作为LT; /的groupId&GT;
&LT;&的artifactId GT;休眠芯&LT; / artifactId的&GT;
&LT;&版GT; 4.1.10.Final&LT; /版本&GT;
&LT; /依赖性&GT;
&LT;&依赖性GT;
&LT;&的groupId GT;的mysql&LT; /的groupId&GT;
&LT;&的artifactId GT;使用mysql-connector-java的&LT; / artifactId的&GT;
&LT;&版GT; 5.1.24&LT; /版本&GT;
&LT; /依赖性&GT;
&LT; /依赖和GT;
&LT;报告&GT;
&LT;输出目录&GT;在/ var / WWW / github上/富裕,笑鸭/目标/网站&LT; /输出目录&GT;
&LT; /报告&GT;
&LT;性状&gt;
&LT; project.build.sourceEncoding&GT; UTF-8&LT; /project.build.sourceEncoding>
&LT; /性状&gt;
&LT; /项目&GT;[INFO] ----------------------------------------------- -------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ----------------------------------------------- -------------------------
[INFO]总时间:16秒
[INFO]在表面处理:太阳3月24日20时十五分13秒CET 2013
[INFO]最后的内存:11M / 60M
[INFO] ----------------------------------------------- -------------------------
这是我的源的pom.xml
内容:
&LT;项目的xmlns =http://maven.apache.org/POM/4.0.0的xmlns:XSI =http://www.w3.org/2001 / XML模式实例
XSI:的schemaLocation =http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">
&LT; modelVersion&GT; 4.0.0&LT; / modelVersion&GT; &LT;&的groupId GT; com.blogspot.symfony世界&LT; /的groupId&GT;
&LT;&的artifactId GT;有钱的,笑鸭&LT; / artifactId的&GT;
&LT;&版GT; 1.0-SNAPSHOT&LT; /版本&GT;
&LT;包装和GT;&罐子LT; /包装&GT; &LT;名称&gt;有钱的,笑鸭&LT; /名称&gt;
&LT; URL&GT; HTTP://maven.apache.org< / URL&GT; &LT;性状&gt;
&LT; project.build.sourceEncoding&GT; UTF-8&LT; /project.build.sourceEncoding>
&LT; /性状&gt; &LT;依赖和GT;
&LT;&依赖性GT;
&LT;&的groupId GT;的JUnit&LT; /的groupId&GT;
&LT;&的artifactId GT;的JUnit&LT; / artifactId的&GT;
&LT;&版GT; 3.8.1&LT; /版本&GT;
&LT;&范围GT;试验&LT; /&范围GT;
&LT; /依赖性&GT;
&LT;&依赖性GT;
&LT;&的groupId GT; org.apache.thrift&LT; /的groupId&GT;
&LT;&的artifactId GT; libthrift&LT; / artifactId的&GT;
&LT;&版GT; 0.9.0&LT; /版本&GT;
&LT; /依赖性&GT;
&LT;&依赖性GT;
&LT;&的artifactId GT; SLF4J的API&LT; / artifactId的&GT;
&LT;&的groupId GT; org.slf4j&LT; /的groupId&GT;
&LT;&型GT;&罐子LT; /类型&GT;
&LT;&版GT; 1.7.3&LT; /版本&GT;
&LT; /依赖性&GT;
&LT;&依赖性GT;
&LT;&的artifactId GT;休眠芯&LT; / artifactId的&GT;
&LT;&的groupId GT;&org.hibernate作为LT; /的groupId&GT;
&LT;&型GT;&罐子LT; /类型&GT;
&LT;&版GT; 4.1.10.Final&LT; /版本&GT;
&LT; /依赖性&GT;
&LT;&依赖性GT;
&LT;&的groupId GT;的mysql&LT; /的groupId&GT;
&LT;&的artifactId GT;使用mysql-connector-java的&LT; / artifactId的&GT;
&LT;&版GT; 5.1.24&LT; /版本&GT;
&LT; /依赖性&GT;
&LT; /依赖和GT;
&LT; /项目&GT;
请尝试包括你的pom.xml以下code你的Maven构建配置。我有同样的问题,因为自己和这似乎为我做的伎俩:
&LT;建立&GT;
&LT; pluginManagement&GT;
&LT;&插件GT;
&LT;&插件GT;
&LT;&的artifactId GT; Maven的编译器插件&LT; / artifactId的&GT;
&LT;&版GT; 2.3.2&LT; /版本&GT;
&LT;结构&gt;
&lt;信源&GT; 1.6 LT; /源&GT;
&lt;目标&GT; 1.6 LT; /目标与GT;
&LT; compilerArgument&GT;&LT; / compilerArgument&GT;
&LT; /结构&gt;
&LT; /插件&GT;
&LT; /插件&GT;
&LT; / pluginManagement&GT;
&LT; /构建&GT;
I'm trying to integrate my github Java/PHP project with travis-ci environment. This is my travis configuration:
language: java
jdk:
- openjdk7
- oraclejdk7
script: mvn test
Below is the output that travis prints:
Using worker: bluebox-linux-1.worker.travis-ci.org:travis-linux-9
$ git clone --depth=50 --branch=master git://github.com/tkoomzaaskz/wealthy-laughing-duck.git tkoomzaaskz/wealthy-laughing-duck
Cloning into 'tkoomzaaskz/wealthy-laughing-duck'...
remote: Counting objects: 458, done.
remote: Compressing objects: 100% (263/263), done.
remote: Total 458 (delta 156), reused 390 (delta 96)
Receiving objects: 100% (458/458), 458.40 KiB, done.
Resolving deltas: 100% (156/156), done.
$ cd tkoomzaaskz/wealthy-laughing-duck
$ git checkout -qf 47d1ef528f19ad6d01288ac9a3d4c550a79b14f4
$ jdk_switcher use openjdk7
Switching to OpenJDK7 (java-1.7.0-openjdk-amd64), JAVA_HOME will be set to /usr/lib/jvm/java-7-openjdk-amd64
update-alternatives: error: no alternatives for apt.
update-alternatives: error: no alternatives for mozilla-javaplugin.so.
update-java-alternatives: plugin alternative does not exist: /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/IcedTeaPlugin.so
$ java -version
java version "1.7.0_15"
OpenJDK Runtime Environment (IcedTea7 2.3.7) (7u15-2.3.7-0ubuntu1~12.04.1)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
$ javac -version
javac 1.7.0_15
$ mvn install --quiet -DskipTests=true
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project wealthy-laughing-duck: Compilation failure: Compilation failure:
[ERROR] /home/travis/build/tkoomzaaskz/wealthy-laughing-duck/src/main/java/com/blogspot/symfonyworld/wealthylaughingduck/dao/OutcomeDao.java:[19,8] error: generics are not supported in -source 1.3
[ERROR]
[ERROR] (use -source 5 or higher to enable generics)
[ERROR] /home/travis/build/tkoomzaaskz/wealthy-laughing-duck/src/main/java/com/blogspot/symfonyworld/wealthylaughingduck/model/Income.java:[12,1] error: annotations are not supported in -source 1.3
[ERROR]
[ERROR] (use -source 5 or higher to enable annotations)
[ERROR] /home/travis/build/tkoomzaaskz/wealthy-laughing-duck/src/main/java/com/blogspot/symfonyworld/wealthylaughingduck/model/User.java:[10,1] error: annotations are not supported in -source 1.3
The output says that I'm using the too old version of java to use annotations and generics. But these are nothing new and they have to be supported somehow (I guess). I've been looking at travis/java docs but found no option about java version (hence I tried to use different jdks). Can anyone point me what should I put into the travis config file?
edit:
following @hertzsprung, I ran mvn help:effective-pom
and it returned following output (in fact, neither source
nor target
attribute are note defined for maven-compiler-plugin
- what can I do about it?):
<!-- ====================================================================== -->
<!-- -->
<!-- Generated by Maven Help Plugin on 2013-03-24T08:15:13 -->
<!-- See: http://maven.apache.org/plugins/maven-help-plugin/ -->
<!-- -->
<!-- ====================================================================== -->
<!-- ====================================================================== -->
<!-- -->
<!-- Effective POM for project -->
<!-- 'com.blogspot.symfony-world:wealthy-laughing-duck:jar:1.0-SNAPSHOT' -->
<!-- -->
<!-- ====================================================================== -->
<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>com.blogspot.symfony-world</groupId>
<artifactId>wealthy-laughing-duck</artifactId>
<version>1.0-SNAPSHOT</version>
<name>wealthy-laughing-duck</name>
<url>http://maven.apache.org</url>
<build>
<sourceDirectory>/var/www/github/wealthy-laughing-duck/src/main/java</sourceDirectory>
<scriptSourceDirectory>src/main/scripts</scriptSourceDirectory>
<testSourceDirectory>/var/www/github/wealthy-laughing-duck/src/test/java</testSourceDirectory>
<outputDirectory>/var/www/github/wealthy-laughing-duck/target/classes</outputDirectory>
<testOutputDirectory>/var/www/github/wealthy-laughing-duck/target/test-classes</testOutputDirectory>
<resources>
<resource>
<mergeId>resource-0</mergeId>
<directory>/var/www/github/wealthy-laughing-duck/src/main/resources</directory>
</resource>
</resources>
<testResources>
<testResource>
<mergeId>resource-1</mergeId>
<directory>/var/www/github/wealthy-laughing-duck/src/test/resources</directory>
</testResource>
</testResources>
<directory>/var/www/github/wealthy-laughing-duck/target</directory>
<finalName>wealthy-laughing-duck-1.0-SNAPSHOT</finalName>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-4</version>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.3</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.1</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<artifactId>maven-ear-plugin</artifactId>
<version>2.3.2</version>
</plugin>
<plugin>
<artifactId>maven-ejb-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.3</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.6.1</version>
</plugin>
<plugin>
<artifactId>maven-plugin-plugin</artifactId>
<version>2.8</version>
</plugin>
<plugin>
<artifactId>maven-rar-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.0-beta-8</version>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.3</version>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>2.1</version>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>2.0.4</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.4.3</version>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.1-beta-1</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<artifactId>maven-help-plugin</artifactId>
<version>2.2</version>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Maven Repository Switchboard</name>
<url>http://repo1.maven.org/maven2</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<releases>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Maven Plugin Repository</name>
<url>http://repo1.maven.org/maven2</url>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.thrift</groupId>
<artifactId>libthrift</artifactId>
<version>0.9.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.3</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.1.10.Final</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.24</version>
</dependency>
</dependencies>
<reporting>
<outputDirectory>/var/www/github/wealthy-laughing-duck/target/site</outputDirectory>
</reporting>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16 seconds
[INFO] Finished at: Sun Mar 24 20:15:13 CET 2013
[INFO] Final Memory: 11M/60M
[INFO] ------------------------------------------------------------------------
This is my source pom.xml
content:
<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>com.blogspot.symfony-world</groupId>
<artifactId>wealthy-laughing-duck</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>wealthy-laughing-duck</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.thrift</groupId>
<artifactId>libthrift</artifactId>
<version>0.9.0</version>
</dependency>
<dependency>
<artifactId>slf4j-api</artifactId>
<groupId>org.slf4j</groupId>
<type>jar</type>
<version>1.7.3</version>
</dependency>
<dependency>
<artifactId>hibernate-core</artifactId>
<groupId>org.hibernate</groupId>
<type>jar</type>
<version>4.1.10.Final</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.24</version>
</dependency>
</dependencies>
</project>
Please try including the following code in your pom.xml for your Maven build config. I had the same problem as yourself and this seemed to do the trick for me:
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<compilerArgument></compilerArgument>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
这篇关于Java泛型和注解1.3版本中不支持(特拉维斯集成)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!