douhuan1950 2014-04-25 18:13
浏览 96

Maven PHP Basic存储库

Whatever I try I can not get a basic working maven environment for php, despite all efforts I have found on the internet. To start with the basic Settings.xml in the .m2 repository gives errors because that repo is not there anymore, so I use

<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>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>
            <repository>
               <id>snapshot-nexus.org</id>
               <name>Nexus repo</name>
               <url>http://nexus.php-maven.org/content/repositories/php-maven-plugin-snapshots</url>
               <releases>
                  <enabled>false</enabled>
               </releases>
               <snapshots>
                  <enabled>true</enabled>
               </snapshots>
            </repository>
         </repositories>
      </profile>
   </profiles>

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

and furthermore the pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project>
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.phpmaven</groupId>
        <artifactId>php-parent-pom</artifactId>
        <version>2.0.2</version>
    </parent>

    <properties>
        <phpmaven.release.number>2.0.2</phpmaven.release.number>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <phpunit.version>3.6.10</phpunit.version>
    </properties>

    <groupId>nict.sample</groupId>
    <artifactId>mvn-nict-webapp</artifactId>
    <version>2.0.2-SNAPSHOT</version>
    <packaging>php</packaging>

    <name>PHP 5 web Project</name>
    <description>Sample PHP 5 web project.</description>
    <url>http://www.php-maven.org</url>
    <inceptionYear>2008</inceptionYear>

    <build>
        <plugins>
            <plugin>
                <groupId>org.phpmaven</groupId>
                <artifactId>maven-php-plugin</artifactId>
                <!-- version>${phpmaven.plugin.version}</version -->
                <extensions>true</extensions>
                <configuration></configuration>
            </plugin>

            <!-- <plugin>
                <groupId>org.sample</groupId>
                <artifactId>own-plugin</artifactId>
                <version>1.0-SNAPSHOT</version>
                <extensions>true</extensions>
            </plugin> -->

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.0</version>
                <inherited>true</inherited>
                <configuration>
                    <reportPlugins>
                        <plugin>
                            <groupId>org.phpmaven</groupId>
                            <artifactId>maven-php-plugin</artifactId>
                            <version>${phpmaven.plugin.version}</version>
                            <reportSets>
                                <reportSet>
                                    <reports>
                                        <report>phpdocumentor</report>
                                        <report>phpunit-coverage</report>
                                        <report>phpunit</report>
                                    </reports>
                                </reportSet>
                            </reportSets>
                        </plugin>
                    </reportPlugins>
                </configuration>
            </plugin>

        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>de.phpunit</groupId>
            <artifactId>PHPUnit</artifactId>
            <version>${phpunit.version}</version>
            <scope>test</scope>
            <type>phar</type>
        </dependency>
    </dependencies>
</project>

What on earth is going wrong. It seems so simple and yet no result. Is the PHP maven project stopt in 2012, I see no updates on the repo-site

  • 写回答

3条回答 默认 最新

报告相同问题?

悬赏问题

  • ¥15 乘性高斯噪声在深度学习网络中的应用
  • ¥15 运筹学排序问题中的在线排序
  • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
  • ¥30 求一段fortran代码用IVF编译运行的结果
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥30 python代码,帮调试,帮帮忙吧