`

Maven的Setting.xml配置默认JDK,本地仓库,repositories

 
阅读更多

个人博客:http://demi-panda.com

 

在settings标签里面添加

<localRepository>D:\Java\m2\repository</localRepository>

此为设置本地仓库


< profiles >
     < profile >   
         < id >jdk-1.6</ id >   
         < activation >   
             < activeByDefault >true</ activeByDefault >   
             < jdk >1.6</ jdk >   
         </ activation >   
         < properties >   
             < maven.compiler.source >1.6</ maven.compiler.source >   
             < maven.compiler.target >1.6</ maven.compiler.target >   
             < maven.compiler.compilerVersion >1.6</ maven.compiler.compilerVersion >   
         </ properties >   
     </ profile >
     < profile
         < id >dev</ id
         < repositories
             < repository
                 < id >local-nexus</ id
                 < url >http://192.168.1.100:8081/nexus/content/groups/public/ </ url
                 < releases
                     < enabled >true</ enabled
                 </ releases
                 < snapshots
                     < enabled >true</ enabled
                 </ snapshots
             </ repository
         </ repositories
     </ profile >
</ profiles >
分享到:
评论

相关推荐

    maven settings.xml配置文件的作用

    `settings.xml`是Maven构建工具的核心配置文件之一,它定义了Maven仓库的位置、镜像设置、本地仓库路径、用户特定的配置信息等。在Maven的工作流程中,`settings.xml`扮演着至关重要的角色,它使得Maven能够根据用户...

    Maven更新失败,Cannot resolve plugin org.apache.maven.plugins:maven-compiler-plugin:3.1

    在apache-maven-3.5.2/conf/setting.xml中加入以下配置即可解决 alimaven aliyun maven http://maven.aliyun.com/nexus/content/repositories/central/ central junit junit Address/ ...

    myeclipse 上安装 Maven3

    - 在命令行中输入 `mvn help:system`,这将触发Maven从远程仓库下载必要的组件和依赖库到本地仓库。 #### 配置MyEclipse中的Maven 1. **打开MyEclipse**: - 通过菜单栏选择 `Window &gt; Preferences &gt; MyEclipse &gt;...

    如何进行Linux安装配置maven以及搭建nexus服务器.docx

    在`settings.xml`中,你需要配置本地仓库路径、远程仓库等信息。 **三、安装Nexus** 下载Nexus服务器的tar.gz文件,例如`nexus-oss-webapp-1.9.1.1-bundle.tar.gz`,然后解压到合适的位置。 ```bash # 解压Nexus...

    pentahog构建调试

    - **解释**: 这段配置指定了一个名为 `pentaho` 的 Maven profile, 它默认激活, 并指向了 Pentaho 的公共 Maven 仓库。 **4. 开始编译** - 在 BI 目录下打开命令行工具, 输入以下命令进行编译: ``` mvn clean ...

    idea整合s2jh4net

    - 指定User setting file为Maven的配置文件`settings.xml`。 5. **配置Maven镜像** - 修改Maven配置文件`settings.xml`中的`mirror`标签,添加多个镜像源以加速依赖下载: ```xml &lt;id&gt;repo2 &lt;mirrorOf&gt;...

Global site tag (gtag.js) - Google Analytics