无法使用Maven下载Alfresco Artifacts

时间:2014-01-17 14:52:42

标签: maven alfresco

我一直在尝试构建一个项目(Alfresco 4.1.2),并且我一直在构建一个构建失败。 我有点迷失了...... 我已正确配置了setup.xml(使用存储库的凭据) 这是我的pom.xml 有人有线索吗?

<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>xxx</groupId>
<artifactId>xxx</artifactId>
<version>0.1</version>
<name>Project</name>

<properties>
    <alfresco.version>4.1.2</alfresco.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>

    <!-- Alfresco dependencies -->
    <dependency>
        <groupId>org.alfresco.enterprise</groupId>
        <artifactId>alfresco-core</artifactId>
        <version>${alfresco.version}</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.alfresco.enterprise</groupId>
        <artifactId>alfresco-data-model</artifactId>
        <version>${alfresco.version}</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.alfresco.enterprise</groupId>
        <artifactId>alfresco-repository</artifactId>
        <version>${alfresco.version}</version>
        <scope>provided</scope>
    </dependency>

    <!-- Junit -->
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.11</version>
        <scope>test</scope>
    </dependency>

    <!-- MOCKITO -->
    <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-all</artifactId>
        <version>1.9.0</version>
        <scope>test</scope>
    </dependency>

    <!-- DUMBSTER -->
    <dependency>
        <groupId>dumbster</groupId>
        <artifactId>dumbster</artifactId>
        <version>1.6</version>
        <scope>test</scope>
        <exclusions>
            <exclusion>
                <groupId>javax.activation</groupId>
                <artifactId>activation</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

    <!-- Gson: Java to Json conversion -->
    <dependency>
        <groupId>com.google.code.gson</groupId>
        <artifactId>gson</artifactId>
        <version>2.2.2</version>
    </dependency>

    <dependency>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <version>2.4.3</version>
        <scope>test</scope>
        <exclusions>
            <exclusion>
                <groupId>jtidy</groupId>
                <artifactId>jtidy</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

    <!-- DOCX4J dependencies -->
    <dependency>
        <groupId>org.docx4j</groupId>
        <artifactId>docx4j</artifactId>
        <version>2.8.1</version>
    </dependency>

    <dependency>
        <groupId>org.docx4j</groupId>
        <artifactId>xhtmlrenderer</artifactId>
        <version>1.0.0</version>
    </dependency>

    <dependency>
        <groupId>org.apache.xmlgraphics</groupId>
        <artifactId>xmlgraphics-commons</artifactId>
        <version>1.4</version>
    </dependency>

    <dependency>
        <groupId>org.apache.xmlgraphics</groupId>
        <artifactId>fop</artifactId>
        <version>0.93</version>
    </dependency>

    <dependency>
        <groupId>org.plutext</groupId>
        <artifactId>jaxb-xmldsig-core</artifactId>
        <version>1.0.0</version>
    </dependency>

    <dependency>
        <groupId>org.plutext</groupId>
        <artifactId>jaxb-xslfo</artifactId>
        <version>1.0.1</version>
    </dependency>

    <!-- JODA TIME -->
    <dependency>
        <groupId>joda-time</groupId>
        <artifactId>joda-time</artifactId>
        <version>1.2.1</version>
    </dependency>

    <!-- JOD CONVERTER -->
    <dependency>
        <groupId>com.artofsolving</groupId>
        <artifactId>jodconverter-core</artifactId>
        <version>3.0-alfresco-patched-20120820</version>
        <scope>provided</scope>
    </dependency>

    <!-- JTIDY -->
    <dependency>
        <groupId>net.sf.jtidy</groupId>
        <artifactId>jtidy</artifactId>
        <version>r938</version>
    </dependency>
</dependencies>

<!-- Repositories to download Alfresco dependencies -->
<repositories>
    <repository>
        <id>alfresco-private</id>
        <url>https://artifacts.alfresco.com/nexus/content/groups/private</url>
    </repository>
    <repository>
        <id>alfresco-thirdparty</id>
        <url>https://artifacts.alfresco.com/nexus/content/repositories/thirdparty</url>
    </repository>
    <repository>
        <id>alfresco-public-snapshots</id>
        <url>https://artifacts.alfresco.com/nexus/content/repositories/public-snapshots</url>
    </repository>
</repositories>

<!-- Build lifecycle -->
<build>
    <plugins>

        <!-- Load properties from build.properties file (in order to get Tomcat location) -->
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>properties-maven-plugin</artifactId>
            <version>1.0-alpha-2</version>
            <executions>
                <execution>
                    <phase>install</phase>
                    <goals>
                        <goal>read-project-properties</goal>
                    </goals>
                    <configuration>
                        <files>
                            <file>${basedir}/build.properties</file>
                        </files>
                    </configuration>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <artifactId>maven-resources-plugin</artifactId>
            <version>2.6</version>
            <!-- on "install" copy generated JAR to Alfresco Tomcat -->
            <executions>
                <execution>
                    <id>copy-jar-to-alfresco</id>
                    <phase>install</phase>
                    <goals>
                        <goal>copy-resources</goal>
                    </goals>
                    <configuration>
                        <outputDirectory>${tomcat.alfresco.webapps.alfresco}/WEB-INF/lib</outputDirectory>
                        <resources>
                            <resource>
                                <directory>${basedir}/target/</directory>
                                <includes>
                                    <include>${project.build.finalName}.jar</include>
                                </includes>
                            </resource>
                        </resources>
                    </configuration>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.0</version>
            <configuration>
                <source>1.6</source>
                <target>1.6</target>
                <encoding>UTF-8</encoding>
                <showWarnings>true</showWarnings>
            </configuration>
        </plugin>
        <!-- Disable default "install" phase (which copies the JAR into the local repository) -->
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-install-plugin</artifactId>
            <version>2.3.1</version>
            <executions>
                <execution>
                    <id>default-install</id>
                    <phase>none</phase>
                </execution>
            </executions>
        </plugin>


    <!--  copy dependencies to alfresco tomcat -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>2.6</version>
        <executions>
          <execution>
            <id>copy-dependencies</id>
            <phase>install</phase>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
            <configuration>
              <includeScope>runtime</includeScope>
              <outputDirectory>${tomcat.alfresco.lib}</outputDirectory>
              <overWriteReleases>false</overWriteReleases>
              <overWriteSnapshots>false</overWriteSnapshots>
              <overWriteIfNewer>true</overWriteIfNewer>
              <excludeTransitive>true</excludeTransitive> <!--  you have to be careful about jars copied in alfresco. Check that each jar does not exist already before copying them -->
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
    <pluginManagement>
        <plugins>
            <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
            <plugin>
                <groupId>org.eclipse.m2e</groupId>
                <artifactId>lifecycle-mapping</artifactId>
                <version>1.0.0</version>
                <configuration>
                    <lifecycleMappingMetadata>
                        <pluginExecutions>
                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>org.apache.maven.plugins</groupId>
                                    <artifactId>maven-dependency-plugin</artifactId>
                                    <versionRange>[2.6,)</versionRange>
                                    <goals>
                                        <goal>copy-dependencies</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <ignore></ignore>
                                </action>
                            </pluginExecution>
                        </pluginExecutions>
                    </lifecycleMappingMetadata>
                </configuration>
            </plugin>
        </plugins>
    </pluginManagement>
</build>

我在尝试构建时遇到此错误:

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8:57.331s
[INFO] Finished at: Fri Jan 17 16:41:56 EET 2014
[INFO] Final Memory: 11M/185M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project xxx: Could not resolve dependencies for project com.genia.alfresco.xxx:xxx-alfresco:jar:0.1: The following artifacts could not be resolved: jaxen:jaxen:jar:1.1.3, org.apache.chemistry.opencmis:chemistry-opencmis-commons-impl:jar:0.7.0, org.apache.httpcomponents:httpclient-cache:jar:4.1.1, org.codehaus.jackson:jackson-mapper-asl:jar:1.8.3, com.googlecode.mp4parser:isoparser:jar:1.0-RC-1, com.drewnoakes:metadata-extractor:jar:2.6.2, asm:asm-util:jar:3.2, edu.ucar:netcdf:jar:4.2, org.apache.chemistry.opencmis:chemistry-opencmis-server-bindings:jar:classes:0.7.0, org.apache.maven:maven-core:jar:2.0.6, org.apache.maven.wagon:wagon-ssh-common:jar:1.0-beta-2, classworlds:classworlds:jar:1.1, org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1, net.arnx:wmf2svg:jar:0.9.0, batik:batik-dom:jar:1.6-1, batik:batik-css:jar:1.6-1, batik:batik-xml:jar:1.6-1, batik:batik-parser:jar:1.6-1, batik:batik-bridge:jar:1.6-1, batik:batik-script:jar:1.6-1, batik:batik-awt-util:jar:1.6-1, batik:batik-util:jar:1.6-1, batik:batik-gui-util:jar:1.6-1, batik:batik-gvt:jar:1.6-1, batik:batik-transcoder:jar:1.6-1, batik:batik-extension:jar:1.6-1, batik:batik-ext:jar:1.6-1, xml-apis:xmlParserAPIs:jar:2.0.2, org.apache.avalon.framework:avalon-framework-api:jar:4.3.1, org.apache.avalon.framework:avalon-framework-impl:jar:4.3.1, org.plutext:jaxb-xmldsig-core:jar:1.0.0, org.plutext:jaxb-xslfo:jar:1.0.1, joda-time:joda-time:jar:1.2.1, net.sf.jtidy:jtidy:jar:r938: Could not transfer artifact jaxen:jaxen:jar:1.1.3 from/to central (http://repo1.maven.org/maven2): No response received after 60000 -> [Help 1]

0 个答案:

没有答案