我尝试通过运行 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-sdkbin
ATLAS Maven Home: C:atlassian-plugin-sdkapache-maven
--------
Executing: "C:atlassian-plugin-sdkapache-mavenbinmvn.bat" --version -gs C:a
tlassian-plugin-sdkapache-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 FilesJavajdk1.6.0_38jre
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>
我的绒球.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>
Atlassian 插件 SDK 的 4.2.20 版本仅与 Maven 2.1.0 兼容 - 因此请勿将 Maven 更新到 3.2.1。 如果您确实更新了 Maven,则还需要将 Atlassian 插件 SDK 更新到版本 5.x。
至于您的设置.xml,请尝试将其完全删除。Atlassian 插件 SDK 捆绑了预配置的设置.xml其中包含为您指定的所有必需配置(C:a
tlassian-plugin-sdkapache-mavenconfsettings.xml
)。如果您需要自定义设置.xml用于其他Maven开发目的,则需要将设置与SDK附带的设置进行协调,并确保不会错误地覆盖任何内容。
我的设置中的存储库.xml:
<pluginRepository>
<snapshots>
<enabled>true</enabled>
</snapshots>
<id>maven-plugin-repo</id>
<url>hhttp://search.maven.org/#browse%7C-1081192444</url>
</pluginRepository>
你 hhttp://search.maven.org/#browse%7C-1081192444 有错误,应该 http://search.maven.org/#browse%7C-1081192444