Tag - maven

eclipse maven nexus depoly    2017-07-19 22:25:41    4
1、setting.xml文件(以下为关键代码):
<servers>
<server>  
  <id>releases</id>  
  <username>admin</username>  
  <password>admin123</password>  
</server>  
<server>  
  <id>snapshots</id>  
  <username>admin</username>  
  <password>admin123</password>  
</server>
<server>  
  <id>thirdparty</id>  
  <username>admin</username>  
  <password>admin123</password>  
</server>
<server>  
  <id>snapshots-host</id>  
  <username>admin</username>  
  <password>admin123</password>  
</server>
</servers> 
...........
<repositories>
  <repository>
   <id>snapshots</id>
   <name>Snapshots</name>
  </repository>
  <repository>
   <id>releases</id>
   <name>Releases</name>
  </repository>
  <repository>
   <id>snapshots-host</id>
   <name>SnapshotsHost</name>
  </repository>
 </repositories>

    上面的红色标注地方,为我自定义的一个re
maven java    2017-07-19 22:09:09    3
pom文件中,在plugins节点下添加:
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <configuration>
            <skip>true</skip>
          </configuration>
        </plugin>



 

by 刘迎光@萤火虫工作室 
OpenBI交流群:495266201 
MicroService 微服务交流群:217722918 
mail: liuyg#liuyingguang.cn 
博主首页(==防止爬虫==):http://blog.liuyingguang.cn

java jetty Docker maven    2017-03-26 23:38:30    24

1. 准备好一个非常简单点的web项目(maven项目)

2. 准备好maven环境,并配置pom文件,关于jetty内容如下:

  1. <!-- jetty dependecies begin -->
  2. <dependency>
  3. <groupId>org.eclipse.jetty</groupId>
  4. <artifactId>jetty-server</artifactId>
  5. <version>9.1.4.v20140401</version>
  6. </dependency>
  7. <dependency>
  8. <groupId>org.eclipse.jetty</groupId>
  9. <artifactId>jetty-webapp</artifactId>
  10. <version>9.1.4.v20140401</version>
  11. </dependency>
  12. <dependency>
  13. <groupId>org.eclipse.jetty</groupId>
  14. <artifactId>jetty-continuation</artifactId>
  15. <version>9.1.4.v20140401</version>
  16. </dependency>
  17. <dependency>
  18. <groupId>org.eclipse.jetty</groupId>
  19. <artifactId>jetty-jsp</artifactId>
  20. <version>9.1.4.v20140401</version>
  21. </dependency>
  22. <!-- jetty dependecies end -->

3. 使用eclipse对maven项目进行build,获取build后的项目目录(或者将项目达成war包)

4. 创建运行配置jetty的Server类

运行war包的类

  1. public class WebAppWarServer {
  2. public static void main(String[] args) throws Exception {
  3. Server server = new Server(8080);