dongtan5811 2015-03-21 08:54
浏览 371
已采纳

无法使用maven生成php库项目

Hi I'm trying to create a PHP library project using Maven. I've followed all the instructions from Maven for php. I'm working on a windows 8.1 machine. Here's what i've doen

  • Installed Maven 3.3.1
  • Installed php 5.5.12

I've also put the following in the settings.xml file in my .m2 repo.

<settings>
    <profiles>
        <profile>
            <id>profile-php-maven</id>
            <pluginRepositories>
                <pluginRepository>
                    <id>release-repo1.php-maven.org</id>
                    <name>PHP-Maven 2 Release Repository</name>
                    <url>http://repos.php-maven.org/releases</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                </pluginRepository>
                <pluginRepository>
                    <id>snapshot-repo1.php-maven.org</id>
                    <name>PHP-Maven 2 Snapshot Repository</name>
                    <url>http://repos.php-maven.org/snapshots</url>
                    <releases>
                        <enabled>false</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </pluginRepository>
            </pluginRepositories>
            <repositories>
                <repository>
                    <id>release-repo1.php-maven.org</id>
                    <name>PHP-Maven 2 Release Repository</name>
                    <url>http://repos.php-maven.org/releases</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                </repository>
                <repository>
                    <id>snapshot-repo1.php-maven.org</id>
                    <name>PHP-Maven 2 Snapshot Repository</name>
                    <url>http://repos.php-maven.org/snapshots</url>
                    <releases>
                        <enabled>false</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </repository>
            </repositories>
        </profile>
    </profiles>

    <activeProfiles>
        <activeProfile>profile-php-maven</activeProfile>
    </activeProfiles>
</settings>

But when I execute the below command

mvn archetype:generate -DarchetypeGroupId=org.phpmaven -DarchetypeArtifactId=php5-lib-archetype -DarchetypeVersion=2.0.2 -DgroupId=org.sample -DartifactId=my-app -Dversion=0.0.1-SNAPSHOT

I get the following error

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (default-cli) on project standalone-pom: The desired archetype does not exist (org.phpmaven:php5-lib-archetype:2.0.2) -> [Help 1]

Looks like the archetype is not found in the default repository.

please advise

Thanks,

  • 写回答

1条回答 默认 最新

  • duandgfh0506 2015-08-12 17:34
    关注

    Maven for PHP is no longer supported. Last changes:

    I would recommend changing tools. Maybe Phing?

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 乌班图ip地址配置及远程SSH
  • ¥15 怎么让点阵屏显示静态爱心,用keiluVision5写出让点阵屏显示静态爱心的代码,越快越好
  • ¥15 PSPICE制作一个加法器
  • ¥15 javaweb项目无法正常跳转
  • ¥15 VMBox虚拟机无法访问
  • ¥15 skd显示找不到头文件
  • ¥15 机器视觉中图片中长度与真实长度的关系
  • ¥15 fastreport table 怎么只让每页的最下面和最顶部有横线
  • ¥15 java 的protected权限 ,问题在注释里
  • ¥15 这个是哪里有问题啊?