Tag - maven

nexus maven nexus3 刘迎光 狐刺科技    2019-04-18 00:52:45    996

错误日志

  1. Java HotSpot(TM) 64-Bit Server VM warning: Cannot open file /nexus-data/log/jvm.log due to Permission denied
  2. Warning: Cannot open log file: /nexus-data/log/jvm.log
  3. Warning: Forcing option -XX:LogFile=/tmp/jvm.log
  4. Unable to delete file: /nexus-data/cache/cache.lock
  5. Unable to update instance pid: /nexus-data/instances/instance.properties (Permission denied)
  6. Exception in thread "Thread-2" java.lang.SecurityException: Could not lock User prefs. Lock file access denied.
  7. at java.util.prefs.FileSystemPreferences.checkLockFile0ErrorCode(FileSystemPreferences.java:937)
  8. at java.util.prefs.FileSystemPreferences.lockFile(FileSystemPreferences.java:925)
  9. at java.util.prefs.FileSystemPreferences.sync(FileSystemPreferences.java:729)
  10. at java.util.prefs.FileSystemPreferences.flush(FileSystemPreferences.java:824)
  11. at java.util.prefs.FileSystemPreferences.syncWorld(FileSystemPreferences.java:464)
  12. at j
eclipse maven nexus depoly    2017-07-19 22:25:41    1200
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    910
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    987

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);