Pavan Andhukuri
Pavan Andhukuri

Reputation: 1617

WSO2 car package ignoring dependencies of Web Application

I am using WSO2 Developer Studio and currently have a Web Application and a WSO2 Composite Application Project. The Car Project contains the web application as a dependency. I also have included tiles dependency to the maven pom file of my web application with scope as "compile"

The problem that I am facing right now is, when I am doing a Maven --> Install on my web application, the war file generated in target folder contains all the tiles related jars in the lib folder under WEB-INF. But when I try to deploy the car file to WSO2 Application server, the war file created does not contain the required libraries and hence, the deployment of my war file is failing.

Is there something that I'm missing?

Update

Following is the pom.xml I am using

<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.dh.hrs</groupId>
  <artifactId>HRS_WEB</artifactId>
  <version>1.0.0</version>
  <packaging>war</packaging>
  <name>HRS</name>
  <properties>
    <CApp.type>web/application</CApp.type>
  </properties>
  <dependencies>
    <dependency>
      <groupId>javax</groupId>
      <artifactId>javaee-web-api</artifactId>
      <version>6.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.wso2.carbon</groupId>
        <artifactId>org.wso2.carbon.utils</artifactId>
        <version>4.2.0</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.apache.tiles</groupId>
        <artifactId>tiles-core</artifactId>
        <version>3.0.5</version>
    </dependency>
  </dependencies>
  <repositories>
    <repository>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>daily</updatePolicy>
        <checksumPolicy>ignore</checksumPolicy>
      </releases>
      <id>wso2-nexus</id>
      <url>http://maven.wso2.org/nexus/content/groups/wso2-public/</url>
    </repository>
    <repository>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>daily</updatePolicy>
        <checksumPolicy>ignore</checksumPolicy>
      </releases>
      <id>java.net2</id>
      <name>Repository hosting the jee6 artifacts</name>
      <url>http://download.java.net/maven/2</url>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>daily</updatePolicy>
        <checksumPolicy>ignore</checksumPolicy>
      </releases>
      <id>wso2-nexus</id>
      <url>http://maven.wso2.org/nexus/content/groups/wso2-public/</url>
    </pluginRepository>
  </pluginRepositories>
  <build>
    <finalName>hrs</finalName>    
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.8</version>
        <configuration />
      </plugin>
      <plugin>
        <artifactId>maven-war-plugin</artifactId>
        <version>2.4</version>
        <executions>
          <execution>
            <id>war</id>
            <phase>package</phase>
            <goals>            
              <goal>war</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <warSourceDirectory>WebContent</warSourceDirectory>          
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.1</version>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>

Upvotes: 3

Views: 693

Answers (0)

Related Questions