繁体   English   中英

如何将.m2 Maven存储库提交到SVN

[英]How to commit .m2 Maven repository to SVN

我是Maven的新手,并将Selenium testng套件与Maven和Jenkins以及SVn集成为存储库。 但是,当我在詹金斯触发目标时,我将遇到错误。

“ [错误]插件org.apache.maven.plugins:maven-clean-plugin:2.5或其依赖项之一无法解析:无法读取org.apache.maven.plugins:maven-clean-plugin的工件描述符: jar:2.5:无法将工件org.apache.maven.plugins:maven-clean-plugin:pom:2.5从/传输到中央( http://repo.maven.apache.org/maven2 ):网络无法访问-> [帮助1] [错误] [错误]要查看错误的完整堆栈跟踪,请使用-e开关重新运行Maven。[错误]使用-X开关重新运行Maven以启用完整的调试日志记录。 ] [ERROR]有关错误和可能的解决方案的更多信息,请阅读以下文章:[ERROR] [帮助1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

下面是我的Maven pom.xml结构

<properties>
    <suiteXmlFile>webtest.xml</suiteXmlFile>
    <skipTests>false</skipTests>
</properties>

<dependencies>
    <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>6.8.7</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-java</artifactId>
        <version>2.28.0</version>
        </dependency>
    <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>21.0</version>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.0</version>
            <configuration>
                <compilerVersion>1.8</compilerVersion>
                <source>1.6</source>
                <target>1.6</target>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.15</version>
            <configuration>
                <forkMode>never</forkMode>
                <suiteXmlFiles>
                    <suiteXmlFile>${suiteXmlFile}</suiteXmlFile>
                </suiteXmlFiles>
            </configuration>
        </plugin>
    </plugins>
</build>
</project>

我不确定是否也必须将.m2文件提交到SVN? 还是应该在SVN存储库和Jenkins中进行配置? 我的jenkins和SVN存储库都在服务器上。

您似乎已经为Internet连接设置了代理。 代理阻止了对目标计算机中mvn存储库的直接访问。 您必须进行配置。 settings.xml中的代理服务器(位于.m2目录的根目录)。 通常,人工制品将人工制品用作代理mvn回购。 请咨询IT团队/开发团队以获取必要的设置。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM