简体   繁体   English

如何解决 pom.xml - android eclipse 应用程序中的错误?

[英]How to resolve error in pom.xml - android eclipse application?

I have error in pom.xml file.我在 pom.xml 文件中有错误。 I don't understand what means xml elements in this file.我不明白这个文件中的 xml 元素是什么意思。 I'm using eclipse's maven plugin version 1.4.0.我正在使用 Eclipse 的 maven 插件版本 1.4.0。 Is there problem in pom.xml elements, versions of plugins, platforms... The code in pom.xml file is: pom.xml 元素、插件版本、平台是否有问题... 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>at.axtesys</groupId>
    <artifactId>soljoy</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>apk</packaging>
    <name>soljoy</name>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <platform.version>4.1.1.4</platform.version>
    <android.plugin.version>3.9.0-rc.1</android.plugin.version>
</properties>

<repositories>
    <repository>
        <id>codehaus</id>
        <url>http://repository.codehaus.org/org/codehaus</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>com.google.android</groupId>
        <artifactId>android</artifactId>
        <version>${platform.version}</version>
        <scope>provided</scope>
    </dependency>

    <dependency>
        <groupId>org.codehaus.jackson</groupId>
        <artifactId>jackson-mapper-asl</artifactId>
        <version>1.9.13</version>
    </dependency>
    <dependency>
        <groupId>com.loopj.android</groupId>
        <artifactId>android-async-http</artifactId>
        <version>1.4.4</version>
        <type>jar</type>
    </dependency>

    <dependency>
        <groupId>com.github.tony19</groupId>
        <artifactId>logback-android-core</artifactId>
        <version>1.1.1-2</version>
    </dependency>
    <dependency>
        <groupId>com.github.tony19</groupId>
        <artifactId>logback-android-classic</artifactId>
        <version>1.1.1-2</version>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.7.6</version>
    </dependency>

</dependencies>

<build>
    <finalName>${project.artifactId}</finalName>
    <sourceDirectory>src</sourceDirectory>
    <pluginManagement>
        <plugins>
            <plugin>
                <groupId>com.jayway.maven.plugins.android.generation2</groupId>
                <artifactId>android-maven-plugin</artifactId>
                <version>${android.plugin.version}</version>
                <extensions>true</extensions>
            </plugin>
        </plugins>
    </pluginManagement>
    <plugins>
        <plugin>
            <groupId>com.jayway.maven.plugins.android.generation2</groupId>
            <artifactId>android-maven-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>deploy</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
                <sdk>
                    <platform>19</platform>
                </sdk>
                <undeployBeforeDeploy>true</undeployBeforeDeploy>
            </configuration>
        </plugin>
    </plugins>
</build>

Error is:错误是:

Failure to transfer org.apache.maven.wagon:wagon-provider-api:pom:2.10 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.wagon:wagon-provider- api:pom:2.10 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org

Is problem in some configuration parametar or versions of maven plugin in pom.xml file and my eclipse version of plugin? pom.xml 文件和我的 eclipse 插件版本中的某些配置参数或 maven 插件版本是否存在问题?

The error contains the Maven coordinates org.apache.maven.wagon:wagon-provider- api:pom:2.10 - notice the space between provider- and api ? The error contains the Maven coordinates org.apache.maven.wagon:wagon-provider- api:pom:2.10 - notice the space between provider- and api ? Might this be the culprit?这可能是罪魁祸首吗?

If this is not the issue (and just a copy'n'paste problem) I'd check if the artifact can be fetched if you force its re-fetch via the -U Maven option.如果这不是问题(只是复制粘贴问题),我会检查如果您通过-U Maven 选项强制重新获取工件是否可以获取。

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

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