命令行根据archetype创建项目

mvn archetype:generate mvn archetype:generate -X debug模式 mvn archetype:generate -DarchetypeCatalog=internal 本地模式

http://blog.csdn.net/u011303778/article/details/46534601

mac 下添加 自定义 archetype

编辑 /Users/${your_username}/Library/Caches/${your_idea_version}/Maven/Indices/UserArchetypes.xml

<?xml version="1.0" encoding="UTF-8"?>
<archetypes>
  <archetype groupId="org.scala-tools.archetypes" artifactId="scala-archetype-simple" version="1.3" />
  <archetype groupId="org.sparkinaction" artifactId="scala-archetype-sparkinaction" version="0.13" repository="https://github.com/spark-in-action/scala-archetype-sparkinaction/raw/master" />
</archetypes>

安装jar至本地nexus

  • 在maven的conf/setting.xml 配置nexus私服的管理账号
    • 在servers标签下添加server ```xml nexus-releases admin admin nexus-snapshots admin admin sjrep admin admin123

      ```

id可自己定义一个名称 以及私服的管理管的账号密码

  • 在mirrors和profiles下配置nexus私服
  • 在项目的pom.xml中配置 ```xml nexus-releases Nexus Release Repository http://192.168.10.8:18080/nexus/content/repositories/releases/ nexus-snapshots Nexus Snapshot Repository http://192.168.10.8:18080/nexus/content/repositories/snapshots/

    ``` >id与settings.xml中的server的id对应

  • 当项目package后将jar上传到nexus私服 mvn deploy

相关文章