Unable to generate a php library project using maven

48 views
Skip to first unread message

Dinh Ngoc

unread,
Aug 26, 2015, 4:07:09 AM8/26/15
to Maven for 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 Linux Fedora 20 machine.

I installed:
- Maven Apache Maven 3.3.3.
- PHP 5.3.8

I've also put the following in the settings.xml file in my .m2 repo.
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                          http://maven.apache.org/xsd/settings-1.0.0.xsd">
        <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:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 30.304 s
[INFO] Finished at: 2015-08-26T14:45:35+07:00
[INFO] Final Memory: 19M/156M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4: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,


cypr...@gmail.com

unread,
Aug 27, 2015, 4:58:34 PM8/27/15
to Maven for PHP
Reply all
Reply to author
Forward
0 new messages