我尝试通过运行atlas-cli pi命令来编译我的自定义jira插件。当我使用存储库http://repo1.maven.org/maven2/时,它工作正常。现在它变成了http://search.maven.org/#browse%7C-1081192444
这是错误的文本:
[ERROR] Unable to complete running command: pi
java.lang.RuntimeException: org.apache.maven.plugin.MojoExecutionException: Unab
le to execute mojo
at org.twdata.maven.cli.commands.ExecuteGoalCommand.run(ExecuteGoalComma
nd.java:112)
at org.twdata.maven.cli.commands.ExecuteGoalCommand.run(ExecuteGoalComma
nd.java:107)
at org.twdata.maven.cli.CliShell.interpretCommand(CliShell.java:48)
at org.twdata.maven.cli.CliShell.run(CliShell.java:29)
at org.twdata.maven.cli.AbstractCliMojo.displayShell(AbstractCliMojo.jav
a:170)
at org.twdata.maven.cli.AbstractCliMojo.access$000(AbstractCliMojo.java:
22)
Caused by: com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectExc
eption: Connection refused: connect
at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle
(URLConnectionClientHandler.java:126)
at com.atlassian.maven.plugins.pdk.InstallPluginMojo$BasicAuthFilter.han
dle(InstallPluginMojo.java:425)
at com.sun.jersey.api.client.Client.handle(Client.java:365)
我的版本:
ATLAS Version: 4.2.20
ATLAS Home: C:\atlassian-plugin-sdk
ATLAS Scripts: C:\atlassian-plugin-sdk\bin
ATLAS Maven Home: C:\atlassian-plugin-sdk\apache-maven
--------
Executing: "C:\atlassian-plugin-sdk\apache-maven\bin\mvn.bat" --version -gs C:\a
tlassian-plugin-sdk\apache-maven/conf/settings.xml
Apache Maven 2.1.0 (r755702; 2009-03-18 22:10:27+0300)
Java version: 1.6.0_38
Java home: C:\Program Files\Java\jdk1.6.0_38\jre
Default locale: ru_RU, platform encoding: Cp1251
OS name: "windows 7" version: "6.1" arch: "amd64" Family: "windows"
我刚刚发现pom.xml中的版本可能是错误的。但是当我在pom.xml中编写另一个版本时,我得到了错误:
ERROR] BUILD ERROR
[INFO] -----------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
拜托,有谁能帮忙吗?
我的设置.xml中的存储库:
<pluginRepository>
<snapshots>
<enabled>true</enabled>
</snapshots>
<id>maven-plugin-repo</id>
<url>hhttp://search.maven.org/#browse%7C-1081192444</url>
</pluginRepository>
我的pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.atlassian.plugins.tutorial</groupId>
<artifactId>xproduct-admin-ui-plugin</artifactId>
<version>1.0</version>
<organization>
<name>Example Company</name>
<url>http://www.example.com/</url>
</organization>
<name>xproduct-admin-ui-plugin</name>
<description>This plugin has an admin UI that can be used in any Atlassian product.</description>
<packaging>atlassian-plugin</packaging>
<dependencies>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>com.atlassian.sal</groupId>
<artifactId>sal-api</artifactId>
<version>2.0.16</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-api</artifactId>
<version>6.0.8</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-core</artifactId>
<version>6.0.8</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.atlassian.templaterenderer</groupId>
<artifactId>atlassian-template-renderer-api</artifactId>
<version>1.4.4-m1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.6</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.8.5</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-amps-plugin</artifactId>
<version>4.2.20</version>
<extensions>true</extensions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
com.atlassian.maven.plugins
</groupId>
<artifactId>
maven-jira-plugin
</artifactId>
<versionRange>
[4.2.10,)
</versionRange>
<goals>
<goal>
compress-resources
</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<properties>
<refapp.version>4.2.4</refapp.version>
</properties>
<repositories>
<repository>
<id>https-atlassian</id>
<url>https://maven.atlassian.com/repository/public/</url>
</repository>
</repositories>
</project>
2条答案
按热度按时间az31mfrm1#
Atlassian Plugin SDK版本4.2.20仅与Maven 2.1.0兼容-因此不要将Maven更新到3.2.1。如果您要更新Maven,则还需要将Atlassian Plugin SDK更新到版本5.x。
至于settings.xml,请尝试将其完全删除。Atlassian Plugin SDK附带了一个预配置的settings.xml,其中包含了为您指定的所有必需配置(位于
C:\a tlassian-plugin-sdk\apache-maven\conf\settings.xml
中)。如果您需要自定义settings.xml用于其他Maven开发目的,则需要将您的设置与SDK附带的设置进行协调,并确保没有错误地覆盖任何内容。8hhllhi22#
我的设置.xml中的存储库:
您输入的网址有误,应该是http://search.maven.org/#browse%7C-1081192444