记录IDEA第一次搭建Spring 官方项目 GreenHouse

官方git:https://github.com/spring-projects/greenhouse

按照姿势来:

第一步:

git clone git://github.com/SpringSource/greenhouse.git

第二部: 

  这里省略CD 因为IDEA 在当前项目打开终端是默认在 greenhouse 目录的  

mvn clean install

然后 喜闻乐见的 报错

官方Demo中的pom.xml  

<org.aspectj-version>1.8.9</org.aspectj-version>

这个版本改一下,不然报错

改完之后 mvn clean install

继续报错如下:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project greenhouse: There are test failures.
[ERROR] 
[ERROR] Please refer to /Users/vvan/IdeaProjects/greenhouse/target/surefire-reports for the individual test results.
[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
解决方法 :

一是命令行,

1

mvn clean package -Dmaven.test.skip=true


二是写入pom文件

<plugin>  
        <groupId>org.apache.maven.plugins</groupId>  
        <artifactId>maven-surefire-plugin</artifactId>  
        <version>2.4.2</version>  
        <configuration>  
          <skipTests>true</skipTests>  
        </configuration>  
</plugin>  

这里采用在idea 的 Terminal 中 敲第一个命令 然后如下结果

[INFO] WEB-INF/web.xml already added, skipping
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.708 s
[INFO] Finished at: 2018-09-09T10:28:33+08:00
[INFO] ------------------------------------------------------------------------

注意:这里直接Terminal按照官方姿势跑

mvn t7:run
http://localhost:8080/greenhouse

 

,会报一个500错误 还没研究

换成tomcat 发布  :

就直接上去了

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值