目标com.liferay.maven.plugins的执行默认值:liferay-maven-plugin:6.1.1:build-css失败

时间:2014-06-06 12:48:53

标签: java eclipse maven liferay

我正在尝试在Liferay中构建简单的第一个插件项目。我从site下载了Eclipse for Liferay。当我使用maven pom.xml构建项目时,我收到错误。在下面找到pom.xml的详细信息和错误详细信息。

我的 pom.xml

<?xml version="1.0"?>

<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.example.plugins</groupId>
<artifactId>HelloLiferay</artifactId>
<packaging>war</packaging>
<name>HelloLiferay Portlet</name>
<version>1.0</version>
<properties>
    <liferay.version>6.1.1</liferay.version>
    <liferay.maven.plugin.version>6.1.1</liferay.maven.plugin.version>
</properties>
<build>
    <plugins>
        <plugin>
            <groupId>com.liferay.maven.plugins</groupId>
            <artifactId>liferay-maven-plugin</artifactId>
            <version>${liferay.maven.plugin.version}</version>
            <executions>
                <execution>
                    <phase>generate-sources</phase>
                    <goals>
                        <goal>build-css</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <autoDeployDir>${liferay.auto.deploy.dir}</autoDeployDir>
                <appServerDeployDir>${liferay.app.server.deploy.dir}</appServerDeployDir>
                <appServerLibGlobalDir>${liferay.app.server.lib.global.dir}</appServerLibGlobalDir>
                <appServerPortalDir>${liferay.app.server.portal.dir}</appServerPortalDir>
                <liferayVersion>${liferay.version}</liferayVersion>
                <pluginType>portlet</pluginType>
            </configuration>
        </plugin>
        <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.5</version>
            <configuration>
                <encoding>UTF-8</encoding>
                <source>1.6</source>
                <target>1.6</target>
            </configuration>
        </plugin>
        <plugin>
            <artifactId>maven-resources-plugin</artifactId>
            <version>2.5</version>
            <configuration>
                <encoding>UTF-8</encoding>
            </configuration>
        </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>
                                        com.liferay.maven.plugins
                                    </groupId>
                                    <artifactId>
                                        liferay-maven-plugin
                                    </artifactId>
                                    <versionRange>
                                        [${liferay.maven.plugin.version},)
                                    </versionRange>
                                    <goals>
                                        <goal>build-css</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <ignore></ignore>
                                </action>
                            </pluginExecution>
                        </pluginExecutions>
                    </lifecycleMappingMetadata>
                </configuration>
            </plugin>
        </plugins>
    </pluginManagement>
</build>
<dependencies>
    <dependency>
        <groupId>com.liferay.portal</groupId>
        <artifactId>portal-service</artifactId>
        <version>${liferay.version}</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>com.liferay.portal</groupId>
        <artifactId>util-bridges</artifactId>
        <version>${liferay.version}</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>com.liferay.portal</groupId>
        <artifactId>util-taglib</artifactId>
        <version>${liferay.version}</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>com.liferay.portal</groupId>
        <artifactId>util-java</artifactId>
        <version>${liferay.version}</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>javax.portlet</groupId>
        <artifactId>portlet-api</artifactId>
        <version>2.0</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>servlet-api</artifactId>
        <version>2.4</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>javax.servlet.jsp</groupId>
        <artifactId>jsp-api</artifactId>
        <version>2.0</version>
        <scope>provided</scope>
    </dependency>
</dependencies>
</project>

错误详情

Failed to execute goal com.liferay.maven.plugins:liferay-maven-plugin:6.1.1:build-css (default) on project HelloLiferay: Execution default of goal com.liferay.maven.plugins:liferay-maven-plugin:6.1.1:build-css failed: Plugin com.liferay.maven.plugins:liferay-maven-plugin:6.1.1 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.apache.jackrabbit:jackrabbit-core:jar:2.1.2, concurrent:concurrent:jar:1.3.4, commons-dbcp:commons-dbcp:jar:1.2.2, commons-pool:commons-pool:jar:1.3, org.apache.jackrabbit:jackrabbit-api:jar:2.1.2, org.apache.jackrabbit:jackrabbit-jcr-commons:jar:2.1.2, org.apache.jackrabbit:jackrabbit-spi-commons:jar:2.1.2, org.apache.jackrabbit:jackrabbit-spi:jar:2.1.2, org.apache.tika:tika-parsers:jar:0.6, org.apache.commons:commons-compress:jar:1.0, org.apache.poi:poi:jar:3.6, org.apache.poi:poi-scratchpad:jar:3.6, org.apache.poi:poi-ooxml:jar:3.6, org.apache.poi:poi-ooxml-schemas:jar:3.6, org.apache.xmlbeans:xmlbeans:jar:2.3.0, org.apache.geronimo.specs:geronimo-stax-api_1.0_spec:jar:1.0.1, asm:asm:jar:3.1, com.drewnoakes:metadata-extractor:jar:2.4.0-beta-1, org.apache.pdfbox:pdfbox:jar:1.0.0, org.apache.pdfbox:fontbox:jar:1.0.0, org.apache.pdfbox:jempbox:jar:1.0.0, org.apache.lucene:lucene-core:jar:2.4.1, org.apache.derby:derby:jar:10.5.3.0_1, org.apache.tika:tika-core:jar:0.9, org.apache.tomcat:tomcat-jdbc:jar:7.0.22, org.apache.tomcat:tomcat-juli:jar:7.0.22, org.jruby:jruby:jar:1.6.4, wsdl4j:wsdl4j:jar:1.6.2: Could not transfer artifact org.apache.jackrabbit:jackrabbit-core:jar:2.1.2 from/to central (http://repo.maven.apache.org/maven2): repo.maven.apache.org: Unknown host repo.maven.apache.org -> [Help 1]

帮助/建议任何解决方案。如何解决。

1 个答案:

答案 0 :(得分:0)

你的问题是

Could not transfer artifact org.apache.jackrabbit:jackrabbit-core:jar:2.1.2 from/to central (http://repo.maven.apache.org/maven2): repo.maven.apache.org: Unknown host repo.maven.apache.org -> [Help 1]

可能重复来自: Error in resolving buildtime dependencies while installing CloudStack on ubuntu. 要么 Maven install error: Dependency could not be resolved

检查您的settings.xml存储库位置和代理。