3

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>
Community
  • 1
  • 1
Pavan Andhukuri
  • 1,547
  • 3
  • 23
  • 49
  • your question does not carry sufficient information to trace the problem. can you paste here, error log here. – Govinnage Rasika Perera Jan 25 '15 at 14:21
  • Hi Rasika, I am sorry I currently do not have the error log. The basic issue is that when I deploy to WSO2 developer studio using car package, the maven dependencies in the web application (the one which car is eventually deploying) are not being packaged. I can help you reproduce the problem in case if there is some disconnect. Thanks. – Pavan Andhukuri Jan 26 '15 at 07:26
  • Can you post your webapp pom.xml file content please. – Eranda Feb 20 '15 at 17:28
  • Hi, added the same in the question. thanks. – Pavan Andhukuri Feb 23 '15 at 06:33
  • HI @Eranda , any update on the question? – Pavan Andhukuri Apr 06 '15 at 07:01
  • Hi, Does your WebContent directory contains the files you were mentioned missing? If you need to add more resources out of this directory you can please refer https://maven.apache.org/plugins/maven-war-plugin/examples/adding-filtering-webresources.html. – Eranda Apr 11 '15 at 12:41
  • Hi Eranda, It is not about the files or resources, if you see the pom I've updated, I have added apache tiles dependency to the WSO2 web application, the dependency gets packaged when I make a war out of the application. But when I try to package and deploy using WSO2 CAR package (including the war package), the dependencies are ignored, they are missing from the target war created. Please let me know if you need any more info. I can share an email with you with the details. Thanks. – Pavan Andhukuri Apr 12 '15 at 06:50

0 Answers0