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 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?