Hi,
Settings.xml
<settings>
<mirrors>
<mirror>
<!--This sends everything else to /public -->
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>
http://sxgio.servehttp.com/nexus/content/groups/public</url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>nexus</id>
<!--Enable snapshots for the built in central repo to direct -->
<!--all requests to nexus via the mirror -->
<repositories>
<repository>
<id>central</id>
<url>
http://central</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>
http://central</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<!--make the profile active all the time -->
<activeProfile>nexus</activeProfile>
</activeProfiles>
</settings>
If you want to create a Zend Project :
mvn archetype:generate -DarchetypeGroupId=org.phpmaven -DarchetypeArtifactId=php5-zend-archetype -DarchetypeVersion=2.0.2 -DgroupId=org.sample -DartifactId=my-app -Dversion=0.0.1-SNAPSHOT
[INFO] Generating project in Interactive mode
[INFO] Archetype repository missing. Using the one from [org.phpmaven:php5-zend-archetype:2.0.2] found in catalog local
Downloading:
http://sxgio.servehttp.com/nexus/content/groups/public/org/phpmaven/php5-zend-archetype/2.0.2/php5-zend-archetype-2.0.2.jar[WARNING] Checksum validation failed, no checksums available from the repository for
http://sxgio.servehttp.com/nexus/content/groups/public/org/phpmaven/php5-zend-archetype/2.0.2/php5-zend-archetype-2.0.2.jarDownloaded:
http://sxgio.servehttp.com/nexus/content/groups/public/org/phpmaven/php5-zend-archetype/2.0.2/php5-zend-archetype-2.0.2.jar (9 KB at 2.9 KB/sec)
Downloading:
http://sxgio.servehttp.com/nexus/content/groups/public/org/phpmaven/php5-zend-archetype/2.0.2/php5-zend-archetype-2.0.2.pom[WARNING] Checksum validation failed, no checksums available from the repository for
http://sxgio.servehttp.com/nexus/content/groups/public/org/phpmaven/php5-zend-archetype/2.0.2/php5-zend-archetype-2.0.2.pomDownloaded:
http://sxgio.servehttp.com/nexus/content/groups/public/org/phpmaven/php5-zend-archetype/2.0.2/php5-zend-archetype-2.0.2.pom (2 KB at 0.7 KB/sec)
[INFO] Using property: groupId = org.sample
[INFO] Using property: artifactId = my-app
[INFO] Using property: version = 0.0.1-SNAPSHOT
[INFO] Using property: package = org.sample
Confirm properties configuration:
groupId: org.sample
artifactId: my-app
version: 0.0.1-SNAPSHOT
package: org.sample
Y: : Y
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype: php5-zend-archetype:2.0.2
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: org.sample
[INFO] Parameter: artifactId, Value: my-app
[INFO] Parameter: version, Value: 0.0.1-SNAPSHOT
[INFO] Parameter: package, Value: org.sample
[INFO] Parameter: packageInPathFormat, Value: org/sample
[INFO] Parameter: package, Value: org.sample
[INFO] Parameter: version, Value: 0.0.1-SNAPSHOT
[INFO] Parameter: groupId, Value: org.sample
[INFO] Parameter: artifactId, Value: my-app
[INFO] project created from Archetype in dir: /home/smartin/Temp/my-app
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3:31.038s
[INFO] Finished at: Thu Nov 28 11:41:51 CET 2013
[INFO] Final Memory: 10M/120M
[INFO] ------------------------------------------------------------------------
PHP5-Web
mvn archetype:generate -DarchetypeGroupId=org.phpmaven -DarchetypeArtifactId=php5-web-archetype -DarchetypeVersion=2.0.2 -DgroupId=org.sample -DartifactId=my-app-2 -Dversion=0.0.1-SNAPSHOT
APSHOT
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom <<<
[INFO]
[INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Interactive mode
[INFO] Archetype repository missing. Using the one from [org.phpmaven:php5-web-archetype:2.0.2] found in catalog local
Downloading:
http://sxgio.servehttp.com/nexus/content/groups/public/org/phpmaven/php5-web-archetype/2.0.2/php5-web-archetype-2.0.2.jar[WARNING] Checksum validation failed, no checksums available from the repository for
http://sxgio.servehttp.com/nexus/content/groups/public/org/phpmaven/php5-web-archetype/2.0.2/php5-web-archetype-2.0.2.jarDownloaded:
http://sxgio.servehttp.com/nexus/content/groups/public/org/phpmaven/php5-web-archetype/2.0.2/php5-web-archetype-2.0.2.jar (38 KB at 9.6 KB/sec)
Downloading:
http://sxgio.servehttp.com/nexus/content/groups/public/org/phpmaven/php5-web-archetype/2.0.2/php5-web-archetype-2.0.2.pom[WARNING] Checksum validation failed, no checksums available from the repository for
http://sxgio.servehttp.com/nexus/content/groups/public/org/phpmaven/php5-web-archetype/2.0.2/php5-web-archetype-2.0.2.pomDownloaded:
http://sxgio.servehttp.com/nexus/content/groups/public/org/phpmaven/php5-web-archetype/2.0.2/php5-web-archetype-2.0.2.pom (2 KB at 0.7 KB/sec)
[INFO] Using property: groupId = org.sample
[INFO] Using property: artifactId = my-app-2
[INFO] Using property: version = 0.0.1-SNAPSHOT
[INFO] Using property: package = org.sample
Confirm properties configuration:
groupId: org.sample
artifactId: my-app-2
version: 0.0.1-SNAPSHOT
package: org.sample
Y: :
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype: php5-web-archetype:2.0.2
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: org.sample
[INFO] Parameter: artifactId, Value: my-app-2
[INFO] Parameter: version, Value: 0.0.1-SNAPSHOT
[INFO] Parameter: package, Value: org.sample
[INFO] Parameter: packageInPathFormat, Value: org/sample
[INFO] Parameter: package, Value: org.sample
[INFO] Parameter: version, Value: 0.0.1-SNAPSHOT
[INFO] Parameter: groupId, Value: org.sample
[INFO] Parameter: artifactId, Value: my-app-2
[INFO] project created from Archetype in dir: /home/smartin/Temp/my-app-2
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.434s
[INFO] Finished at: Thu Nov 28 11:43:31 CET 2013
[INFO] Final Memory: 12M/148M
[INFO] ------------------------------------------------------------------------
PHP Library
mvn archetype:generate -DarchetypeGroupId=org.phpmaven -DarchetypeArtifactId=php5-lib-archetype -DarchetypeVersion=2.0.2 -DgroupId=org.sample -DartifactId=my-app-3 -Dversion=0.0.1-SNAPSHOT
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom <<<
[INFO]
[INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Interactive mode
[INFO] Archetype repository missing. Using the one from [org.phpmaven:php5-lib-archetype:2.0.2] found in catalog local
Downloading:
http://sxgio.servehttp.com/nexus/content/groups/public/org/phpmaven/php5-lib-archetype/2.0.2/php5-lib-archetype-2.0.2.jar[WARNING] Checksum validation failed, no checksums available from the repository for
http://sxgio.servehttp.com/nexus/content/groups/public/org/phpmaven/php5-lib-archetype/2.0.2/php5-lib-archetype-2.0.2.jarDownloaded:
http://sxgio.servehttp.com/nexus/content/groups/public/org/phpmaven/php5-lib-archetype/2.0.2/php5-lib-archetype-2.0.2.jar (4 KB at 1.0 KB/sec)
Downloading:
http://sxgio.servehttp.com/nexus/content/groups/public/org/phpmaven/php5-lib-archetype/2.0.2/php5-lib-archetype-2.0.2.pom[WARNING] Checksum validation failed, no checksums available from the repository for
http://sxgio.servehttp.com/nexus/content/groups/public/org/phpmaven/php5-lib-archetype/2.0.2/php5-lib-archetype-2.0.2.pomDownloaded:
http://sxgio.servehttp.com/nexus/content/groups/public/org/phpmaven/php5-lib-archetype/2.0.2/php5-lib-archetype-2.0.2.pom (2 KB at 0.7 KB/sec)
[INFO] Using property: groupId = org.sample
[INFO] Using property: artifactId = my-app-3
[INFO] Using property: version = 0.0.1-SNAPSHOT
[INFO] Using property: package = org.sample
Confirm properties configuration:
groupId: org.sample
artifactId: my-app-3
version: 0.0.1-SNAPSHOT
package: org.sample
Y: :
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype: php5-lib-archetype:2.0.2
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: org.sample
[INFO] Parameter: artifactId, Value: my-app-3
[INFO] Parameter: version, Value: 0.0.1-SNAPSHOT
[INFO] Parameter: package, Value: org.sample
[INFO] Parameter: packageInPathFormat, Value: org/sample
[INFO] Parameter: package, Value: org.sample
[INFO] Parameter: version, Value: 0.0.1-SNAPSHOT
[INFO] Parameter: groupId, Value: org.sample
[INFO] Parameter: artifactId, Value: my-app-3
[INFO] project created from Archetype in dir: /home/smartin/Temp/my-app-3
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.118s
[INFO] Finished at: Thu Nov 28 11:45:37 CET 2013
[INFO] Final Memory: 12M/148M
[INFO] ------------------------------------------------------------------------
Note that this nexus mirror could be added to your pom.xml files rather than add to your settings.xml. Later this year I will put all the artifacts in OpenStack with nexus.
Hope this helps.
Regards.
Sergio.