Hi
I am fairly new to configuring maven and i need to execute a goal of a
plugin but it wont execute when i do mvn process-test-resources. It seems
that the plugin goal is somehow unbound from the plugin phase.

I am attaching pom.xml here.

thanks for the help.
<project xmlns="http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";>
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.xyz.sm.qatools</groupId>
    <artifactId>dashboard</artifactId>
    <packaging>war</packaging>
    <version>2.5.0.0_RC4-SNAPSHOT</version>
    <name>dashboard</name>


    <properties>
        <spring.version>3.0.0.RELEASE</spring.version>
        <compileSource>1.6</compileSource>
        <jersey-version>1.3</jersey-version>
        <!-- ; delimited -->
        <memcached.servers>localhost:11211</memcached.servers>
        <!-- in milliseconds -->
        <memcached.expiration>600000</memcached.expiration>
        <hibernate.annotations.version>3.3.0.ga</hibernate.annotations.version>
        <hibernate.version>3.2.6.ga</hibernate.version>
        <jdbc.test.database>dashboard_db_test</jdbc.test.database>
        <jdbc.test.driver.classname>com.mysql.jdbc.Driver</jdbc.test.driver.classname>
        <jdbc.test.host>localhost</jdbc.test.host>
        <jdbc.test.port>3306</jdbc.test.port>
        <jdbc.test.password>${jdbc.test.username}</jdbc.test.password>
        <jdbc.test.url>
            <![CDATA[jdbc:mysql://localhost:3306/${jdbc.test.database}?createDatabaseIfNotExist=true&amp;useUnicode=true&amp;characterEncoding=utf-8&amp;zeroDateTimeBehavior=convertToNull]]></jdbc.test.url>
        <jdbc.test.username>bugzilla_user</jdbc.test.username>
        <jdbc.artifactid>mysql-connector-java</jdbc.artifactid>
        <jdbc.groupid>mysql</jdbc.groupid>
        <jdbc.mysql.version>5.1.6</jdbc.mysql.version>
    </properties>


    <dependencies>

       

        <dependency>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-json</artifactId>
            <version>${jersey-version}</version>
        </dependency>

        <dependency>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-server</artifactId>
            <version>${jersey-version}</version>
        </dependency>

        <dependency>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-client</artifactId>
            <version>${jersey-version}</version>
        </dependency>


        <dependency>
            <groupId>commons-beanutils</groupId>
            <artifactId>commons-beanutils</artifactId>
            <version>1.7.0</version>
        </dependency>


        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
            <version>3.2</version>
        </dependency>


        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.3</version>
        </dependency>

        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.1</version>

            <exclusions>
                <exclusion>
                    <groupId>avalon-framework</groupId>
                    <artifactId>avalon-framework</artifactId>
                </exclusion>

                <exclusion>
                    <groupId>javax.servlet</groupId>
                    <artifactId>servlet-api</artifactId>
                </exclusion>

                <exclusion>
                    <groupId>logkit</groupId>
                    <artifactId>logkit</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>commons-validator</groupId>
            <artifactId>commons-validator</artifactId>
            <version>1.3.1</version>

            <exclusions>
                <exclusion>
                    <groupId>commons-digester</groupId>
                    <artifactId>commons-digester</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>net.sf.ezmorph</groupId>
            <artifactId>ezmorph</artifactId>
            <version>1.0.4</version>
        </dependency>

        <dependency>
            <groupId>jfree</groupId>
            <artifactId>jcommon</artifactId>
            <version>1.0.12</version>
        </dependency>

        <dependency>
            <groupId>jfree</groupId>
            <artifactId>jfreechart</artifactId>
            <version>1.0.8a</version>
        </dependency>

        <dependency>
            <groupId>net.sf.json-lib</groupId>
            <artifactId>json-lib</artifactId>
            <version>2.3</version>
            <classifier>jdk15</classifier>
        </dependency>

        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.8</version>
        </dependency>


        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>${spring.version}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
            <version>${spring.version}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context-support</artifactId>
            <version>${spring.version}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>${spring.version}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-tx</artifactId>
            <version>${spring.version}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-orm</artifactId>
            <version>${spring.version}</version>
        </dependency>


        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.3</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>taglibs</groupId>
            <artifactId>standard</artifactId>
            <version>1.1.2</version>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
            <version>1.1.2</version>
        </dependency>

        <dependency>
            <groupId>org.apache.tomcat</groupId>
            <artifactId>dbcp</artifactId>
            <version>6.0.18</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate</artifactId>
            <version>${hibernate.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>asm</groupId>
                    <artifactId>asm</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>asm</groupId>
                    <artifactId>asm-attrs</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>cglib</groupId>
                    <artifactId>cglib</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>asm</groupId>
            <artifactId>asm</artifactId>
            <version>3.1</version>
        </dependency>


        <dependency>
            <groupId>cglib</groupId>
            <artifactId>cglib-nodep</artifactId>
            <version>2.2</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>javax.persistence</groupId>
            <artifactId>persistence-api</artifactId>
            <version>1.0</version>
        </dependency>

        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-annotations</artifactId>
            <version>${hibernate.annotations.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.tika</groupId>
            <artifactId>tika-core</artifactId>
            <version>0.7</version>
        </dependency>

        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-commons-annotations</artifactId>
            <version>${hibernate.annotations.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>asm</groupId>
                    <artifactId>asm</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>asm</groupId>
                    <artifactId>asm-attrs</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>javax.transaction</groupId>
            <artifactId>jta</artifactId>
            <version>1.0.1B</version>
        </dependency>

        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>4.0.2.GA</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <version>1.5.10</version>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.5.10</version>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>com.sun.jersey.contribs</groupId>
            <artifactId>jersey-spring</artifactId>
            <version>${jersey-version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-beans</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-context</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-web</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-aop</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.aspectj</groupId>
                    <artifactId>aspectjrt</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.aspectj</groupId>
                    <artifactId>aspectjweaver</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.aspectj</groupId>
                    <artifactId>aspectjweaver</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>2.1.1</version>
<scope>provided</scope>
</dependency>

        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>5.8</version>

            <scope>test</scope>
            <classifier>jdk15</classifier>

            <exclusions>
                <exclusion>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>net.sf.opencsv</groupId>
            <artifactId>opencsv</artifactId>
            <version>2.0</version>
        </dependency>

        <dependency>
            <groupId>org.jmock</groupId>
            <artifactId>jmock</artifactId>
            <version>2.5.1</version>
            <scope>test</scope>

            <exclusions>
                <exclusion>
                    <groupId>junit</groupId>
                    <artifactId>junit-dep</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.jmock</groupId>
            <artifactId>jmock-legacy</artifactId>
            <version>2.5.1</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.objenesis</groupId>
            <artifactId>objenesis</artifactId>
            <version>1.0</version>
            <scope>test</scope>
        </dependency>

        
        <dependency>
            <groupId>org.dbunit</groupId>
            <artifactId>dbunit</artifactId>
            <version>2.2.3</version>
            <scope>test</scope>

            <exclusions>
             <exclusion>
               <groupId>junit-addons</groupId>
               <artifactId>junit-addons</artifactId>
             </exclusion>

             <exclusion>
               <groupId>poi</groupId>
               <artifactId>poi</artifactId>
             </exclusion>
           </exclusions>
        </dependency>
    </dependencies>

    <issueManagement>
        <system>Bugzilla</system>
        <url><![CDATA[http://bug.corp.xyz.com/enter_bug.cgi?product=Cornerstone&component=Dashboard]]></url>
    </issueManagement>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <links>
                        <link>http://java.sun.com/javase/6/docs/api/</link>
                        <link>http://static.springframework.org/spring/docs/2.5.x/api</link>
                        <link>http://java.sun.com/javaee/5/docs/api/</link>
                        <link>http://www.jfree.org/jfreechart/api/javadoc</link>
                    </links>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <configuration>
                    <threshold>High</threshold>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <configuration>
                    <targetJdk>${compileSource}</targetJdk>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>

            <!--
                  <plugin>
                    <groupId>net.sf.jmd</groupId>
                    <artifactId>maven-crap4j-plugin</artifactId>
                  </plugin>
            -->
        </plugins>
    </reporting>

    <build>
        <finalName>${dashboard.war.filename}</finalName>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.0-beta-8</version>
                    <configuration>
                        <goals>install</goals>
                        <scmCommentPrefix>Ticket: ${bugzilla.ticket}</scmCommentPrefix>
                        <releaseProfiles>${release.profile}</releaseProfiles>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>tomcat-maven-plugin</artifactId>
                    <version>1.0-beta-1</version>
                    <configuration>
                        <path>/${project.build.finalName}</path>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>mysql</groupId>
                            <artifactId>mysql-connector-java</artifactId>
                            <version>5.1.6</version>
                        </dependency>
                    </dependencies>
                </plugin>

                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <debug>true</debug>
                        <source>${compileSource}</source>
                        <target>${compileSource}</target>
                    </configuration>
                </plugin>

                <plugin>
                    <artifactId>maven-eclipse-plugin</artifactId>
                    <configuration>
                        <wtpversion>1.5</wtpversion>
                        <wtpContextName>Dashboard</wtpContextName>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-idea-plugin</artifactId>
                    <configuration>
                        <jdkLevel>1.6</jdkLevel>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-war-plugin</artifactId>
                    <configuration>

                        <webResources>
                            <resource>
                                <targetPath>/</targetPath>
                                <filtering>true</filtering>
                                <directory>src/main/webapp/</directory>
                            </resource>

                            <resource>
                                <targetPath>META-INF</targetPath>
                                <filtering>true</filtering>
                                <directory>src/main/webapp/META-INF</directory>
                                <includes>
                                    <include>**/*.xml</include>
                                </includes>
                            </resource>

                            <resource>
                                <targetPath>WEB-INF/classes</targetPath>
                                <directory>${dashboard.bugzilla.spring.file.directory}</directory>
                                <includes>
                                    <include>**/*.xml</include>
                                </includes>
                            </resource>

                            <resource>
                                <targetPath>WEB-INF/classes</targetPath>
                                <filtering>true</filtering>
                                <directory>src/main/resources</directory>
                                <includes>
                                    <include>**/*.xml</include>
                                </includes>
                            </resource>


                            <resource>
                                <directory>${basedir}/yinst</directory>
                                <targetPath>META-INF</targetPath>
                                <filtering>true</filtering>
                                <includes>
                                    <include>*.yicf</include>
                                </includes>
                            </resource>

                            <resource>
                                <directory>${dashboard.background.image.dir}</directory>
                                <targetPath>/</targetPath>
                                <includes>
                                    <include>*.jpg</include>
                                </includes>
                            </resource>
                        </webResources>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>sql-maven-plugin</artifactId>
                    <version>1.3</version>

                    <configuration>
                        <driver>${jdbc.test.driver.classname}</driver>
                        <username>${jdbc.test.username}</username>
                        <password>${jdbc.test.password}</password>
                        <url>${jdbc.test.url}</url>
                        <autocommit>true</autocommit>
                        <srcFiles>
                            <srcFile>${basedir}/src/test/resources/create-schema-prerequisite.sql</srcFile>
                            <srcFile>${basedir}/src/test/resources/test_db_schema.sql</srcFile>
                        </srcFiles>
                        <outputFile>${basedir}/target/sql-schema.out</outputFile>    

                    </configuration>

                    <executions>
                        <execution>
                            <id>create-schema</id>
                            <phase>process-test-resources</phase>
                            <goals>
                                <goal>execute</goal>
                            </goals>
                        </execution>
                    </executions>
                                                        
                    <dependencies>
                        <dependency>
                            <groupId>${jdbc.groupid}</groupId>
                            <artifactId>${jdbc.artifactid}</artifactId>
                            <version>${jdbc.mysql.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>


                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>dbunit-maven-plugin</artifactId>
                    <version>1.0-beta-1</version>
                    <configuration>
                        <driver>${jdbc.test.driver.classname}</driver>
                        <username>${jdbc.test.username}</username>
                        <password>${jdbc.test.password}</password>
                        <url>${jdbc.test.url}</url>
                        <src>src/test/resources/dbunit-data.xml</src>
                        <type>CLEAN_INSERT</type>
                    </configuration>

                    <executions>
                        <execution>
                            <id>test-compile</id>
                            <phase>test-compile</phase>
                            <goals>
                                <goal>operation</goal>
                            </goals>
                        </execution>
                    </executions>

                    <dependencies>
                        <dependency>
                            <groupId>${jdbc.groupid}</groupId>
                            <artifactId>${jdbc.artifactid}</artifactId>
                            <version>${jdbc.mysql.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>

            </plugins>
        </pluginManagement>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>

        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
                <filtering>true</filtering>
                <excludes><exclude>binary/*</exclude>
                </excludes>
            </testResource>
        </testResources>
    </build>
    <profiles>
        <profile>
            <id>biren</id>
            <properties>
                <dashboard.db.username>bugzilla_user</dashboard.db.username>
                <dashboard.db.password>dashboardDBBiren.dbpw</dashboard.db.password>
                <dashboard.db.host>localhost</dashboard.db.host>
                <dashboard.db.port>3306</dashboard.db.port>
                <dashboard.db.name>bugzilla_dashboard</dashboard.db.name>
                <bugzilla.db.username>bdashboard</bugzilla.db.username>
                <bugzilla.db.password>production_test.dbpw</bugzilla.db.password>
                <bugzilla.db.host>sp1-bd-db-001.adx.corp.sp1.xyz.com</bugzilla.db.host>
                <bugzilla.db.port>3306</bugzilla.db.port>
                <dashboard.bugzillatype>xyz_BUGZILLA</dashboard.bugzillatype>
                <dashboard.background.image.dir>src/main/env/prod</dashboard.background.image.dir>
                <dashboard.war.filename>Dashboard</dashboard.war.filename>
                <dashboard.bugzilla.spring.file.directory>src/main/bugzilla/xyz
                </dashboard.bugzilla.spring.file.directory>
            </properties>

        </profile>



    </profiles>

    <repositories>
        <repository>
            <id>jmd.sourceforge.net</id>
            <name>crap4j repo</name>
            <url>http://jmd.sourceforge.net/m2repository/</url>
            <layout>default</layout>
        </repository>
    </repositories>
</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to