how to install

有些小伙伴想下载并自行install 进行研究, 你需要执行以下4个步骤:

1. 下载 feilong-platform

git clone https://github.com/venusdrogon/feilong-platform.git —depth 1

  1. E:\work>git clone https://github.com/venusdrogon/feilong-platform.git --depth 1
  2. Cloning into 'feilong-platform'...
  3. remote: Counting objects: 9, done.
  4. remote: Compressing objects: 100% (6/6), done.
  5. remote: Total 9 (delta 0), reused 6 (delta 0), pack-reused 0
  6. Unpacking objects: 100% (9/9), done.

2. install feilong-platform

mvn install -f feilong-platform/pom.xml

  1. test mvn install -f feilong-platform/pom.xml
  2. [INFO] Scanning for projects...
  3. [INFO]
  4. [INFO] ------------------------------------------------------------------------
  5. [INFO] Building feilong-platform 1.10.4-SNAPSHOT
  6. [INFO] ------------------------------------------------------------------------
  7. [INFO]
  8. [INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) @ parent ---
  9. [INFO] Using 'UTF-8' encoding to copy filtered resources.
  10. [INFO] skip non existing resourceDirectory /Users/feilong/workspace/test/feilong-platform/src/main/resources
  11. [INFO]
  12. [INFO] --- native2ascii-maven-plugin:1.0-beta-1:native2ascii (native2ascii) @ parent ---
  13. [INFO]
  14. [INFO] --- maven-resources-plugin:3.0.2:testResources (default-testResources) @ parent ---
  15. [INFO] Using 'UTF-8' encoding to copy filtered resources.
  16. [INFO] skip non existing resourceDirectory /Users/feilong/workspace/test/feilong-platform/src/test/resources
  17. [INFO]
  18. [INFO] >>> maven-source-plugin:3.0.1:jar (attach-sources) > generate-sources @ parent >>>
  19. [INFO]
  20. [INFO] <<< maven-source-plugin:3.0.1:jar (attach-sources) < generate-sources @ parent <<<
  21. [INFO]
  22. [INFO]
  23. [INFO] --- maven-source-plugin:3.0.1:jar (attach-sources) @ parent ---
  24. [INFO]
  25. [INFO] --- maven-install-plugin:2.5.2:install (default-install) @ parent ---
  26. [INFO] Installing /Users/feilong/workspace/test/feilong-platform/pom.xml to /Users/feilong/Development/repository/com/feilong/platform/parent/1.10.4-SNAPSHOT/parent-1.10.4-SNAPSHOT.pom
  27. [INFO] ------------------------------------------------------------------------
  28. [INFO] BUILD SUCCESS
  29. [INFO] ------------------------------------------------------------------------
  30. [INFO] Total time: 1.255 s
  31. [INFO] Finished at: 2017-07-08T02:16:29+08:00
  32. [INFO] Final Memory: 11M/309M
  33. [INFO] ------------------------------------------------------------------------

3. 下载 feilong-core

git clone https://github.com/venusdrogon/feilong-core.git —depth 1

  1. test git clone https://github.com/venusdrogon/feilong-core.git --depth 1
  2. Cloning into 'feilong-core'...
  3. remote: Counting objects: 492, done.
  4. remote: Compressing objects: 100% (278/278), done.
  5. remote: Total 492 (delta 311), reused 269 (delta 203), pack-reused 0
  6. Receiving objects: 100% (492/492), 382.73 KiB | 72.00 KiB/s, done.
  7. Resolving deltas: 100% (311/311), done.

4. install feilong-core

mvn install -f feilong-core/pom.xml

  1. test mvn install -f feilong-core/pom.xml
  2. [INFO] Scanning for projects...
  3. [INFO]
  4. [INFO] ------------------------------------------------------------------------
  5. [INFO] Building feilong-core 1.10.4-SNAPSHOT
  6. [INFO] ------------------------------------------------------------------------
  7. Downloading: https://raw.github.com/venusdrogon/feilong-platform/repository/com/feilong/test/feilong-common-test/1.10.1/feilong-common-test-1.10.1.pom
  8. Downloaded: https://raw.github.com/venusdrogon/feilong-platform/repository/com/feilong/test/feilong-common-test/1.10.1/feilong-common-test-1.10.1.pom (5.1 kB at 1.3 kB/s)
  9. Downloading: https://raw.github.com/venusdrogon/feilong-platform/repository/com/feilong/test/feilong-common-test/1.10.1/feilong-common-test-1.10.1.jar
  10. Downloaded: https://raw.github.com/venusdrogon/feilong-platform/repository/com/feilong/test/feilong-common-test/1.10.1/feilong-common-test-1.10.1.jar (23 kB at 6.3 kB/s)
  11. [INFO]
  12. [INFO] --- jacoco-maven-plugin:0.7.9:prepare-agent (prepare-agent) @ feilong-core ---
  13. [INFO] argLine set to -javaagent:/Users/feilong/Development/repository/org/jacoco/org.jacoco.agent/0.7.9/org.jacoco.agent-0.7.9-runtime.jar=destfile=/Users/feilong/workspace/test/feilong-core/target/jacoco.exec
  14. [INFO]
  15. [INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) @ feilong-core ---
  16. [INFO] Using 'UTF-8' encoding to copy filtered resources.
  17. [INFO] Copying 1 resource
  18. [INFO]
  19. [INFO] --- maven-compiler-plugin:3.6.1:compile (default-compile) @ feilong-core ---
  20. [INFO] Changes detected - recompiling the module!
  21. [INFO] Compiling 71 source files to /Users/feilong/workspace/test/feilong-core/target/classes
  22. [INFO] /Users/feilong/workspace/test/feilong-core/src/main/java/com/feilong/core/lang/StringUtil.java: 某些输入文件使用或覆盖了已过时的 API
  23. [INFO] /Users/feilong/workspace/test/feilong-core/src/main/java/com/feilong/core/lang/StringUtil.java: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
  24. [INFO]
  25. [INFO] --- native2ascii-maven-plugin:1.0-beta-1:native2ascii (native2ascii) @ feilong-core ---
  26. [INFO] Includes: [classes\**/*.properties, test-classes\**/*.properties]
  27. [INFO] Excludes: []
  28. [INFO]
  29. [INFO] --- maven-resources-plugin:3.0.2:testResources (default-testResources) @ feilong-core ---
  30. [INFO] Using 'UTF-8' encoding to copy filtered resources.
  31. [INFO] Copying 6 resources
  32. [INFO]
  33. [INFO] --- maven-compiler-plugin:3.6.1:testCompile (default-testCompile) @ feilong-core ---
  34. [INFO] Changes detected - recompiling the module!
  35. [INFO] Compiling 332 source files to /Users/feilong/workspace/test/feilong-core/target/test-classes
  36. [INFO] /Users/feilong/workspace/test/feilong-core/src/test/java/com/feilong/core/util/sortutiltest/SortArrayTest.java: 某些输入文件使用或覆盖了已过时的 API
  37. [INFO] /Users/feilong/workspace/test/feilong-core/src/test/java/com/feilong/core/util/sortutiltest/SortArrayTest.java: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
  38. [INFO] /Users/feilong/workspace/test/feilong-core/src/test/java/com/feilong/core/util/collectionsutiltest/GroupWithTransformerAndPredicateTest.java: 某些输入文件使用了未经检查或不安全的操作。
  39. [INFO] /Users/feilong/workspace/test/feilong-core/src/test/java/com/feilong/core/util/collectionsutiltest/GroupWithTransformerAndPredicateTest.java: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。
  40. [INFO]
  41. [INFO] --- maven-surefire-plugin:2.20:test (default-test) @ feilong-core ---
  42. [INFO]
  43. [INFO] -------------------------------------------------------
  44. [INFO] T E S T S
  45. [INFO] -------------------------------------------------------
  46. [INFO] Running com.feilong.FeiLongSuiteTests
  47. 20:20 WARN (DateTimeConverter.java:471) [toDate()] DateConverter does not support default String to 'Date' conversion.
  48. 20:20 WARN (DateTimeConverter.java:472) [toDate()] (N.B. Re-configure Converter or use alternative implementation)
  49. 20:20 INFO (URLUtil.java:150) [toURL()] [new URL("E:\test")] exception,cause by :[unknown protocol: e],will try call [toFileURL("E:\test")]
  50. 20:20 DEBUG (GetUnionUrlTest.java:45) [testGetUnionUrl1()] file:/Users/feilong/workspace/test/feilong-core/sanguo
  51. 20:20 INFO (URLUtil.java:150) [toURL()] [new URL("C:\Users\feilong\feilong\train\新员工\warmReminder\20160704141057.html")] exception,cause by :[unknown protocol: c],will try call [toFileURL("C:\Users\feilong\feilong\train\新员工\warmReminder\20160704141057.html")]
  52. 20:20 DEBUG (ToURLTest.java:41) [testToURL()] file:/Users/feilong/workspace/test/feilong-core/C:%5CUsers%5Cfeilong%5Cfeilong%5Ctrain%5C新员工%5CwarmReminder%5C20160704141057.html
  53. 20:21 WARN (ResourceBundleUtil.java:151) [getValue()] resourceBundle:[java.util.PropertyResourceBundle@118ffcfd] don't containsKey:[wo_bu_cun_zai]
  54. 20:21 WARN (ResourceBundleUtil.java:151) [getValue()] resourceBundle:[java.util.PropertyResourceBundle@36c2b646] don't containsKey:[wo_bu_cun_zai]
  55. [INFO] Tests run: 1513, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.24 s - in com.feilong.FeiLongSuiteTests
  56. [INFO]
  57. [INFO] Results:
  58. [INFO]
  59. [INFO] Tests run: 1513, Failures: 0, Errors: 0, Skipped: 0
  60. [INFO]
  61. [INFO]
  62. [INFO] --- jacoco-maven-plugin:0.7.9:report (post-unit-test) @ feilong-core ---
  63. [INFO] Loading execution data file /Users/feilong/workspace/test/feilong-core/target/jacoco.exec
  64. [INFO] Analyzed bundle 'feilong-core' with 62 classes
  65. [INFO]
  66. [INFO] --- jacoco-maven-plugin:0.7.9:report (report) @ feilong-core ---
  67. [INFO] Loading execution data file /Users/feilong/workspace/test/feilong-core/target/jacoco.exec
  68. [INFO] Analyzed bundle 'feilong-core' with 62 classes
  69. [INFO]
  70. [INFO] --- maven-jar-plugin:2.6:jar (default-jar) @ feilong-core ---
  71. [INFO] Building jar: /Users/feilong/workspace/test/feilong-core/target/feilong-core-1.10.4-SNAPSHOT.jar
  72. [INFO]
  73. [INFO] --- maven-jar-plugin:2.6:test-jar (default) @ feilong-core ---
  74. [INFO] Building jar: /Users/feilong/workspace/test/feilong-core/target/feilong-core-1.10.4-SNAPSHOT-tests.jar
  75. [INFO]
  76. [INFO] >>> maven-source-plugin:3.0.1:jar (attach-sources) > generate-sources @ feilong-core >>>
  77. [INFO]
  78. [INFO] --- jacoco-maven-plugin:0.7.9:prepare-agent (prepare-agent) @ feilong-core ---
  79. [INFO] argLine set to -javaagent:/Users/feilong/Development/repository/org/jacoco/org.jacoco.agent/0.7.9/org.jacoco.agent-0.7.9-runtime.jar=destfile=/Users/feilong/workspace/test/feilong-core/target/jacoco.exec
  80. [INFO]
  81. [INFO] <<< maven-source-plugin:3.0.1:jar (attach-sources) < generate-sources @ feilong-core <<<
  82. [INFO]
  83. [INFO]
  84. [INFO] --- maven-source-plugin:3.0.1:jar (attach-sources) @ feilong-core ---
  85. [INFO] Building jar: /Users/feilong/workspace/test/feilong-core/target/feilong-core-1.10.4-SNAPSHOT-sources.jar
  86. [INFO]
  87. [INFO] --- maven-install-plugin:2.5.2:install (default-install) @ feilong-core ---
  88. [INFO] Installing /Users/feilong/workspace/test/feilong-core/target/feilong-core-1.10.4-SNAPSHOT.jar to /Users/feilong/Development/repository/com/feilong/platform/feilong-core/1.10.4-SNAPSHOT/feilong-core-1.10.4-SNAPSHOT.jar
  89. [INFO] Installing /Users/feilong/workspace/test/feilong-core/pom.xml to /Users/feilong/Development/repository/com/feilong/platform/feilong-core/1.10.4-SNAPSHOT/feilong-core-1.10.4-SNAPSHOT.pom
  90. [INFO] Installing /Users/feilong/workspace/test/feilong-core/target/feilong-core-1.10.4-SNAPSHOT-tests.jar to /Users/feilong/Development/repository/com/feilong/platform/feilong-core/1.10.4-SNAPSHOT/feilong-core-1.10.4-SNAPSHOT-tests.jar
  91. [INFO] Installing /Users/feilong/workspace/test/feilong-core/target/feilong-core-1.10.4-SNAPSHOT-sources.jar to /Users/feilong/Development/repository/com/feilong/platform/feilong-core/1.10.4-SNAPSHOT/feilong-core-1.10.4-SNAPSHOT-sources.jar
  92. [INFO] ------------------------------------------------------------------------
  93. [INFO] BUILD SUCCESS
  94. [INFO] ------------------------------------------------------------------------
  95. [INFO] Total time: 26.079 s
  96. [INFO] Finished at: 2017-07-08T02:20:23+08:00
  97. [INFO] Final Memory: 35M/591M
  98. [INFO] ------------------------------------------------------------------------

5. settings.xml 镜像

如果你配置了镜像, 比如 aliyun

  1. <mirrors>
  2. <mirror>
  3. <mirrorOf>*</mirrorOf>
  4. <id>alimaven</id>
  5. <name>aliyun maven</name>
  6. <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
  7. </mirror>
  8. </mirrors>

那么在执行 mvn install -f feilong-taglib/pom.xml 会出错, 以下是大致的错误信息

  1. test mvn install -f feilong-core/pom.xml
  2. [INFO] Scanning for projects...
  3. [INFO]
  4. [INFO] ------------------------------------------------------------------------
  5. [INFO] Building feilong-core 1.10.4-SNAPSHOT
  6. [INFO] ------------------------------------------------------------------------
  7. Downloading: http://maven.aliyun.com/nexus/content/groups/public/com/feilong/test/feilong-common-test/1.10.1/feilong-common-test-1.10.1.pom
  8. [WARNING] The POM for com.feilong.test:feilong-common-test:jar:1.10.1 is missing, no dependency information available
  9. Downloading: http://maven.aliyun.com/nexus/content/groups/public/com/feilong/test/feilong-common-test/1.10.1/feilong-common-test-1.10.1.jar
  10. [INFO] ------------------------------------------------------------------------
  11. [INFO] BUILD FAILURE
  12. [INFO] ------------------------------------------------------------------------
  13. [INFO] Total time: 4.250 s
  14. [INFO] Finished at: 2017-07-08T02:17:58+08:00
  15. [INFO] Final Memory: 11M/245M
  16. [INFO] ------------------------------------------------------------------------
  17. [ERROR] Failed to execute goal on project feilong-core: Could not resolve dependencies for project com.feilong.platform:feilong-core:jar:1.10.4-SNAPSHOT: Could not find artifact com.feilong.test:feilong-common-test:jar:1.10.1 in alimaven (http://maven.aliyun.com/nexus/content/groups/public/) -> [Help 1]
  18. [ERROR]
  19. [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  20. [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  21. [ERROR]
  22. [ERROR] For more information about the errors and possible solutions, please read the following articles:
  23. [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

此时你需要修改下镜像的 mirrorOf ,让镜像排除 feilong-platform-repository 仓库

  1. <mirror>
  2. <mirrorOf>*,!feilong-platform-repository</mirrorOf>
  3. <id>alimaven</id>
  4. <name>aliyun maven</name>
  5. <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
  6. </mirror>

更多关于 maven mirrorOf,可以参考 http://maven.apache.org/guides/mini/guide-mirror-settings.html

6.帮助

如果仍旧有问题,您可以

feilong 即时交流

|QQ 群 243306798:————-|how to install - 图1

—完