• maven中配置jboss仓库


      有两种方式,一种是在项目的pom.xml中<repositories>中添加,这是配置是针对具体的某一个项目,更多时候,我们想把jboss仓库作为所有项目的仓库,这就需要在maven的setting.xml中配置了.建议将maven/conf/setting.xml文件拷贝一份到你本地仓库的目录,作为用户配置文件。打开setting.xml文件,在里面添加一下内容:

    ...  
      <profiles>  
        ...  
        <profile>  
          <id>jboss-public-repository</id>  
          <repositories>  
            <repository>  
              <id>jboss-public-repository-group</id>  
              <name>JBoss Public Maven Repository Group</name>  
              <url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>  
              <layout>default</layout>  
              <releases>  
                <enabled>true</enabled>  
                <updatePolicy>never</updatePolicy>  
              </releases>  
              <snapshots>  
                <enabled>true</enabled>  
                <updatePolicy>never</updatePolicy>  
              </snapshots>  
            </repository>  
          </repositories>
        <!-- 插件仓库 --> <pluginRepositories> <pluginRepository> <id>jboss-public-repository-group</id> <name>JBoss Public Maven Repository Group</name> <url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url> <layout>default</layout> <releases> <enabled>true</enabled> <updatePolicy>never</updatePolicy> </releases> <!-- 不下载快照版 --> <snapshots> <enabled>false</enabled> <updatePolicy>never</updatePolicy> </snapshots> </pluginRepository> </pluginRepositories> </profile> </profiles> <!-- 默认为激活状态--> <activeProfiles> <activeProfile>jboss-public-repository</activeProfile> </activeProfiles> ...

    如果想要停用JBoss仓库,可在setting.xml文件所在目录运行 :mvn -Pjboss-public-repository install  

    添加插件组

     

    <pluginGroups>
        ...
        <pluginGroup>org.jboss.maven.plugins</pluginGroup>
        ...
    </pluginGroups>
  • 相关阅读:
    程序跳过UAC研究及实现思路(两种方法,现在可能都不行了)
    getch(),getche(),getchar()的区别
    命令行版扫雷(vc08)
    类成员函数指针的特殊之处(成员函数指针不是指针,内含一个结构体,需要存储更多的信息才能知道自己是否virtual函数)
    WCF与Web API 区别
    扩展方法库
    开源Dubbox
    AngularJs应用页面
    浅谈可扩展性框架:MEF
    AngularJs + ASP.NET MVC
  • 原文地址:https://www.cnblogs.com/manliu/p/4682003.html
Copyright © 2020-2023  润新知