PayPal - The safer, easier way to pay online!

Prepare Maven 3 for PHP for Maven

Requirements

PHP

Ensure that PHP and pear executables are found via PATH variable. Ensure that the requirements are installed correctly. We need at least PHP 5.2.0 because of built in phar-support. See The php manual for details. Due to some bugs on PHAR support you should use the newest php version.

Prepare Maven 3

First, download Maven and follow the installation instructions. Then, go to the settings.xml (~/.m2 on Unix/Mac OS X and C:\Documents and Settings\username\.m2 on Windows) and add the PHP for Maven repository. If there is no settings.xml you must create the settings.xml file first.

<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>

NOTICE: The snapshots of the maven plugins are not present in the public repository. You should never depend on snapshots of maven build plugins. If you want to try out snapshots you need to add repository http://nexus.php-maven.org/content/repositories/php-maven-plugin-snapshots to your settings.xml.

Finally, your php.exe must be part of the system path.