Hi

The correct test jar sits in the target folder of the Web project.
However the one in the local repository looks likes an empty module
jar. I have attached the relevant files from the local repo.




On Tue, May 17, 2011 at 5:51 PM, Kiren Pillay <[email protected]> wrote:
> Hi
>
> I have a multi-module maven web project which builds a war file.
> Withing the WAR module I have some unit tests as well. I noticed now
> that when I build the application from the root directory, the
> test-jar is built, but does not get copied to the local repository.
> Another test-jar is being placed in there for some reason.
>
> If I had to build the war module by itself, which is 3 levels down,
> the correct test-jar is installed in my local repository.
>
> This looks like some kind of configuration issue.
>
> Regards
> Kiren
>
>
> Parent pom (Incorrect Behaviour)
>
> <?xml version="1.0" encoding="UTF-8"?>
> <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/xsd/maven-4.0.0.xsd";>
>
>    <modelVersion>4.0.0</modelVersion>
>
>    <groupId>za.co.vodacom.pams</groupId>
>    <artifactId>pams-main</artifactId>
>    <version>1.1.0-QA-SNAPSHOT</version>
>    <packaging>pom</packaging>
>    <name>PAMS - Main</name>
>
>    <modules>
>        <module>core</module>
>        <module>business_services</module>
>    </modules>
>
>    <properties>
>        <pams.version>1.1.0-QA-SNAPSHOT</pams.version>
>        <fcaps.version>1.0.0-QA-SNAPSHOT</fcaps.version>
>        <spring.version>3.0.5.RELEASE</spring.version>
>        <slf4j.version>1.6.1</slf4j.version>
>
>        <log4j.version>1.2.12</log4j.version>
>        <junit.version>4.8.1</junit.version>
>        <java.source.version>1.6</java.source.version>
>        <java.target.version>1.6</java.target.version>
>
>        <cxf.version>2.3.3</cxf.version>
>        <httpclient.version>3.1</httpclient.version>
>        <jsr311.version>1.1.1</jsr311.version>
>        <xmlBeans.version>2.5.0</xmlBeans.version>
>        <tandem.jdbc.version>8.9.26</tandem.jdbc.version>
>        <hibernate.version>3.3.2.GA</hibernate.version>
>        <slf4j.version>1.6.1</slf4j.version>
>        <slf4j.log4j.version>slf4j-log4j12</slf4j.log4j.version>
>        <jtds.jdbc.version>1.2.2</jtds.jdbc.version>
>
>    </properties>
>    <organization>
>    </organization>
>    <build>
>       <!-- Maven test JAR plugin, DONT remove -->
>        <plugins>
>
>            <plugin>
>                <artifactId>maven-jar-plugin</artifactId>
>                <version>2.3.1</version>
>                <executions>
>                    <execution>
>                        <goals>
>                            <goal>test-jar</goal>
>                        </goals>
>                        <phase>test-compile</phase>
>                    </execution>
>
>                </executions>
>                                <!--<configuration>
>                                        
> <outputDirectory>${basedir}\target</outputDirectory>
>                                </configuration>
>                        -->
>            </plugin>
>
>        </plugins>
>    </build>
>    <dependencyManagement>
>
>        <dependencies>
>
>
>                        <!-- SLF -->
>            <dependency>
>                <groupId>org.slf4j</groupId>
>                <artifactId>slf4j-api</artifactId>
>                <version>${slf4j.version}</version>
>            </dependency>
>
>            <dependency>
>                <groupId>org.slf4j</groupId>
>                <artifactId>jcl-over-slf4j</artifactId>
>                <version>${slf4j.version}</version>
>            </dependency>
>
>            <dependency>
>                <groupId>org.slf4j</groupId>
>                <artifactId>${slf4j.log4j.version}</artifactId>
>                <version>${slf4j.version}</version>
>            </dependency>
>
>                        <!-- Tandem JDBC Driver -->
>            <dependency>
>                <groupId>com.tandem.t4jdbc</groupId>
>                <artifactId>t4sqlmx</artifactId>
>                <version>${tandem.jdbc.version}</version>
>                <exclusions>
>                    <exclusion>
>                        <groupId>commons-logging</groupId>
>                        <artifactId>commons-logging</artifactId>
>                    </exclusion>
>                </exclusions>
>            </dependency>
>
>                        <!-- Hibernate -->
>
>            <dependency>
>                <groupId>org.hibernate</groupId>
>                <artifactId>hibernate-core</artifactId>
>                <version>${hibernate.version}</version>
>                <exclusions>
>                    <exclusion>
>                        <groupId>commons-logging</groupId>
>                        <artifactId>commons-logging</artifactId>
>                    </exclusion>
>                </exclusions>
>            </dependency>
>            <dependency>
>                <groupId>org.hibernate</groupId>
>                <artifactId>hibernate-entitymanager</artifactId>
>                <version>${hibernate.version}</version>
>                <exclusions>
>                    <exclusion>
>                        <groupId>cglib</groupId>
>                        <artifactId>cglib</artifactId>
>                    </exclusion>
>                    <exclusion>
>                        <groupId>dom4j</groupId>
>                        <artifactId>dom4j</artifactId>
>                    </exclusion>
>                </exclusions>
>            </dependency>
>
>
>
>                        <!--  3rd Party -->
>                        <!--  Log4J     -->
>            <dependency>
>                <groupId>log4j</groupId>
>                <artifactId>log4j</artifactId>
>                <version>${log4j.version}</version>
>            </dependency>
>
>                        <!--  JUnit     -->
>            <dependency>
>                <groupId>junit</groupId>
>                <artifactId>junit</artifactId>
>                <version>${junit.version}</version>
>                <scope>compile</scope>
>            </dependency>
>
>                        <!--  Spring      -->
>            <dependency>
>                <groupId>org.springframework</groupId>
>                <artifactId>spring-test</artifactId>
>                <version>${spring.version}</version>
>            </dependency>
>
>            <dependency>
>                <groupId>org.springframework</groupId>
>                <artifactId>spring-core</artifactId>
>                <version>${spring.version}</version>
>            </dependency>
>
>            <dependency>
>                <groupId>org.springframework</groupId>
>                <artifactId>spring-beans</artifactId>
>                <version>${spring.version}</version>
>            </dependency>
>
>            <dependency>
>                <groupId>org.springframework</groupId>
>                <artifactId>spring-context</artifactId>
>                <version>${spring.version}</version>
>            </dependency>
>
>        </dependencies>
>
>    </dependencyManagement>
>
>    <distributionManagement>
>        <repository>
>            <id>vodacom-releases-local</id>
>            <name>vodacom-releases-local</name>
>            <url>http://bcx-repo/artifactory/vodacom-releases-local</url>
>        </repository>
>        <snapshotRepository>
>            <id>vodacom-snapshots-local</id>
>            <name>vodacom-snapshots-local</name>
>            <url>http://bcx-repo/artifactory/vodacom-snapshots-local</url>
>        </snapshotRepository>
>    </distributionManagement>
>
>    <ciManagement>
>        <system>continuum</system>
>        <url>http://bcx-repo/continuum</url>
>    </ciManagement>
>
>    <scm>
>        
> <connection>scm:svn:http://bcx-svn/svn/vodacom.za/pams/server/branches/V1-1-0-QA/</connection>
>        
> <developerConnection>scm:svn:http://bcx-svn/svn/vodacom.za/pams/server/branches/V1-1-0-QA/</developerConnection>
>    </scm>
>
>
>
>    <reporting>
>        <plugins>
> <!-- Plugins used for Hudson -->
>
>            <plugin>
>                <groupId>org.apache.maven.plugins</groupId>
>                <artifactId>maven-checkstyle-plugin</artifactId>
>                <version>2.2</version>
>
>            </plugin>
>            <!-- this is to solve the Hudson Memory issues -->
>            <plugin>
>                <groupId>org.apache.maven.plugins</groupId>
>                <artifactId>maven-surefire-plugin</artifactId>
>                <version>2.7.1</version>
>                <configuration>
>          <excludes>
>            <exclude>**/Abstract*.java</exclude>
>            <exclude>**/TestPAMSInfoService.java</exclude>
>            <exclude>**/TestAirtimeTransferRegistrationQuery.java</exclude>
>            <exclude>**/TetsRest.java</exclude>
>            <exclude>**/TestQuerySubscriberINProfile.java</exclude>
>          </excludes>
>
>
>                    <forkMode>pertest</forkMode>
>                    <argLine>-Xmx512m -XX:MaxPermSize=512m</argLine>
>
>                </configuration>
>            </plugin>
>
>
>
>            <plugin>
>                <groupId>org.apache.maven.plugins</groupId>
>                <artifactId>maven-project-info-reports-plugin</artifactId>
>                <version>2.0.1</version>
>            </plugin>
>            <plugin>
>                <groupId>org.codehaus.mojo</groupId>
>                <artifactId>jdepend-maven-plugin</artifactId>
>            </plugin>
>            <plugin>
>                <artifactId>maven-pmd-plugin</artifactId>
>                <configuration>
>                    <sourceEncoding>utf-8</sourceEncoding>
>                    <minimumTokens>10</minimumTokens>
>                    <includeTests>false</includeTests>
>                    <targetJdk>1.6</targetJdk>
>                    <targetJdk>${maven.compiler.target}</targetJdk>
>                </configuration>
>            </plugin>
>
>            <plugin>
>                <groupId>org.codehaus.mojo</groupId>
>                <artifactId>findbugs-maven-plugin</artifactId>
>                <version>2.3.1</version>
>                <configuration>
>                    <xmlOutput>true</xmlOutput>
>                    <findbugsXmlOutput>true</findbugsXmlOutput>
>                    <findbugsXmlWithMessages>true</findbugsXmlWithMessages>
>                    <threshold>Default</threshold>
>
>                    <debug>false</debug>
>                    <relaxed>false</relaxed>
>                    <maxHeap>1024</maxHeap>
>                </configuration>
>            </plugin>
>            <plugin>
>                <groupId>org.codehaus.mojo</groupId>
>                <artifactId>taglist-maven-plugin</artifactId>
>                <configuration>
>                    <tags>
>                        <tag>TODO</tag>
>                        <tag>FIXME</tag>
>                        <tag>@todo</tag>
>                        <tag>@deprecated</tag>
>                    </tags>
>                </configuration>
>            </plugin>
>            <plugin>
>                <groupId>org.codehaus.mojo</groupId>
>                <artifactId>cobertura-maven-plugin</artifactId>
>                <configuration>
>                    <formats>
>                        <format>xml</format>
>                    </formats>
>                </configuration>
>            </plugin>
>        </plugins>
>    </reporting>
>
> </project>
>

Attachment: pams-bs-webapp-1.1.0-QA-SNAPSHOT-tests.jar
Description: application/java-archive

Attachment: pams-bs-webapp-1.1.0-QA-SNAPSHOT.pom
Description: application/maven-pom

<?xml version="1.0" encoding="UTF-8"?>
<metadata>
  <groupId>za.co.vodacom.pams.business</groupId>
  <artifactId>pams-bs-webapp</artifactId>
  <version>1.1.0-QA-SNAPSHOT</version>
  <versioning>
    <snapshot>
      <localCopy>true</localCopy>
    </snapshot>
    <lastUpdated>20110517154618</lastUpdated>
  </versioning>
</metadata>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to