具有VSTS configs setting.xml的Maven存储库

时间:2018-07-13 10:41:56

标签: maven azure-devops

我正在导入一个使用其自己的存储库的项目,以替换该存储库,而我在VSTS中创建了自己的存储库。要将依存关系添加到我的存储库,我使用了以下命令和设置:

添加一个罐子

mvn deploy:deploy-file  -DgroupId=com.creactives.semanticservices -DartifactId=semantic-services-api -Dversion=1.0.0   *-Dpackaging=jar*  -Dfile=C:/lixo/web-xml-6.0.2.jar  -Durl=https://andreforte.pkgs.visualstudio.com/_packaging/MVNrepository/maven/v1 -DrepositoryId=andreforte-visualstudio.com-mvnrepository

添加插件

mvn deploy:deploy-file  -DgroupId=com.creactive -DartifactId=web-xml -Dversion=6.0.2  *-Dpackaging=maven-plugin*  -Dfile=C:/lixo/web-xml-6.0.2.jar  -Durl=https://andreforte.pkgs.visualstudio.com/_packaging/MVNrepository/maven/v1 -DrepositoryId=andreforte-visualstudio.com-mvnrepository

Settings.xml

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

 <servers>
        <server>
          <id>andreforte-visualstudio.com-mvnrepository</id>
          <configuration>
            <httpHeaders>
              <property>
                <name>Authorization</name>
                <!-- Treat this auth token like a password. Do not share it with anyone, including Microsoft support. -->
                <!-- The generated token expires on or before 11/10/2018 -->
                <value>Basic YW5kcmVmb3J0ZW1haWw6ZXlKMGVYQWlPaUpLVjFRaUxDSmhiR2NpT2lKU1V6STFOaUlzSW5nMWRDSTZJbTlQZG1ONk5VMWZOM0F0U0dwSlMyeEdXSG81TTNWZlZqQmFieUo5LmV5SnVZVzFsYVdRaU9pSXdZelJqTm1Vek5TMWpOVFpsTFRaak5Ea3RPRFF6WkMxalptTXdNR0l5WldZNVl6a2lMQ0p6WTNBaU9pSjJjMjh1WkhKdmNGOTNjbWwwWlNCMmMyOHVjR0ZqYTJGbmFXNW5YM2R5YVhSbElpd2lZWFZwSWpvaU16UTVPR05oTVdFdFpEZ3lZeTAwTkRjNUxXSTNZekV0WXpneFpESTFNbU5sWkRoaklpd2ljMmxrSWpvaU9ETmhZVGxrWWpBdE16QXpaQzAwWm1FMExXSmhaV0l0TmpZNFpHSmtaakV6TkRWbUlpd2lhWE56SWpvaVlYQndMblp6YzNCekxuWnBjM1ZoYkhOMGRXUnBieTVqYjIwaUxDSmhkV1FpT2lKaGNIQXVkbk56Y0hNdWRtbHpkV0ZzYzNSMVpHbHZMbU52Ylh4MmMyODZOVEJoT1RSbU1tSXRZakV5WXkwME56UTVMVGsxTkRBdE1tWXdZMkV6WXpJMk9ETTNJaXdpYm1KbUlqb3hOVE14TkRjMU5qZzRMQ0psZUhBaU9qRTFNemt5TlRFMk9EaDkuZmxXX195Rmk0LWtVaGlwNl9kekt2c05wMEJlb0hhQVd3R3cyQU5hemo0TkdOVThPdFFSYUx4YlI4QTAtMERzc0k5S0ZPS3R0aHo1Y25HR2hBdnNCOC13LU0tbGhxRVZHRTlXS2RuMGxxWDEtLTZtRVNPVUE4aDF1aU5yUm8wcWFBa3ptRWRSRzlINFExd2M5Y1VlVDJvbGhiVU5XdUFXNGZqU3I5SGV0VFVMVTFhTkJadk15VDhscE1oZlRHLUNkYlZqVkJuU2hIVkl4dFV3Yy1EX3RmYUtlemlaYXNwNWlYc0YxVGcySGI0ekJjd2UxRE1tSDBIeE4yTW9qRFVlM2FvbkMzRGpobll3aURvOGFadUpiQUtYYjBHMmg4UGlMU0p5amVoS24wbmhMUFNncm9YdFB3d3pTWkw5eE9FVVByblR0SUI2NDNyR0hVTFBUcklBNkxR</value>
              </property>
            </httpHeaders>
          </configuration>
        </server>
    </servers>
</settings> 

当我在intellij IDEA中下载依赖项时,我得到了所有添加为-Dpackaging = jar的依赖项。在这种情况下,它是我无法导入的插件(web-xml),我已经尝试过使用(Dpackaging = maven-plugin),然后将其修改为-Dpackaging = jar,但也无法正常工作。有人可以帮我吗?

在pom.xml中配置web-xml-6.0.2.jar

<plugin>
     <groupId>com.creactives</groupId>
        <artifactId>web-xml</artifactId>
        <version>6.0.2</version>
        <executions>
          <execution>
            <id>web-xml-creation</id>
            <goals>
              <goal>web-xml</goal>
            </goals>
            <phase>prepare-package</phase>
         </execution>
     </executions>
</plugin>

0 个答案:

没有答案