java classes not found in WEB-INF in maven build

2k Views Asked by At

I am working on a project using flex and Java at the back end. It's a web-app project. The thing is when i compile it through Eclipse it's well and good. But when i use maven to build the war, i don't get class files inside my WEB-INF\classes folder. Had anyone come across with such a problem, i don't get any errors, but still there is no class files.

I had attached my POM file here

<?xml version="1.0" ?>
<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.abc.def</groupId>
    <artifactId>abc-cde</artifactId>
    <version>0.1</version>
    <packaging>war</packaging>

    <name>abc-cde</name>

    <build>
        <sourceDirectory>src/clv_web_flex/Mxmls</sourceDirectory>
        <plugins>
            <plugin>
                <!-- Plugin runs on Maven version 3.0.3 and so on -->
                <groupId>org.sonatype.flexmojos</groupId>
                <artifactId>flexmojos-maven-plugin</artifactId>
                <version>4.2-beta</version>
                <extensions>true</extensions>
                <executions>
                    <execution>
                        <goals>
                            <goal>copy-flex-resources</goal>
                        </goals>
                        <configuration>
                            <stripVersion>true</stripVersion>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.2</version>
                <configuration>
                    <!-- Excludes jar file in WAR -->
                    <packagingIncludes>WEB-INF/lib/*.jar</packagingIncludes>
                    <webResources>
                        <resource>
                            <!-- this is relative to the pom.xml directory -->
                            <directory>WebContent</directory>
                        </resource>
                    </webResources>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>com.adobe.flexunit</groupId>
            <artifactId>flexunit</artifactId>
            <version>0.85</version>
            <type>swc</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>flex-framework</artifactId>
            <version>4.5.1.21328</version>
            <type>pom</type>
        </dependency>
        <dependency>
            <groupId>org.springframework.flex</groupId>
            <artifactId>spring-flex-core</artifactId>
            <version>1.5.2.RELEASE</version>
        </dependency> 
        <dependency>
            <groupId>com.adobe.blazeds</groupId>
            <artifactId>blazeds-common</artifactId>
            <version>3.2.0.3978</version>
        </dependency>
        <dependency>
            <groupId>com.adobe.blazeds</groupId>
            <artifactId>blazeds-core</artifactId>
            <version>3.2.0.3978</version>
        </dependency>
        <dependency>
            <groupId>com.adobe.blazeds</groupId>
            <artifactId>blazeds-proxy</artifactId>
            <version>3.2.0.3978</version>
        </dependency>
        <dependency>
            <groupId>com.adobe.blazeds</groupId>
            <artifactId>blazeds-remoting</artifactId>
            <version>3.2.0.3978</version>
        </dependency>
        <dependency>
            <groupId>com.adobe.blazeds</groupId>
            <artifactId>cfgatewayadapter</artifactId>
            <version>0.020108</version>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.16</version>
        </dependency>
        <dependency>
            <groupId>com.adobe.blazeds</groupId>
            <artifactId>flex-messaging-common</artifactId>
            <version>4.0.0.14931</version>
        </dependency>
        <dependency>
            <groupId>com.adobe.blazeds</groupId>
            <artifactId>flex-messaging-core</artifactId>
            <version>4.0.0.14931</version>
        </dependency>
        <dependency>
            <groupId>com.adobe.blazeds</groupId>
            <artifactId>flex-messaging-opt</artifactId>
            <version>4.0.0.14931</version>
        </dependency>
        <dependency>
            <groupId>com.adobe.blazeds</groupId>
            <artifactId>flex-messaging-proxy</artifactId>
            <version>4.0.0.14931</version>
        </dependency>
        <dependency>
            <groupId>com.adobe.blazeds</groupId>
            <artifactId>flex-messaging-remoting</artifactId>
            <version>4.0.0.14931</version>
        </dependency>
        <dependency>
            <groupId>com.adobe.blazeds</groupId>
            <artifactId>flex-rds-server</artifactId>
            <version>272564</version>
        </dependency>
        <dependency>
            <groupId>javax.mail</groupId>
            <artifactId>mail</artifactId>
            <version>1.4.5</version>
        </dependency>
        <dependency>
            <groupId>taglibs</groupId>
            <artifactId>standard</artifactId>
            <version>1.1.2</version>
        </dependency>
        <dependency>
            <groupId>xalan</groupId>
            <artifactId>xalan</artifactId>
            <version>2.4.1</version>
        </dependency>
    </dependencies>

    <repositories>
        <repository>
            <id>spring-external</id>
            <name>Spring External Repository</name>
            <url>http://maven.springframework.org/external</url>
        </repository>
        <repository>
            <id>flex-mojos-repository</id>
            <url>http://repository.sonatype.org/content/groups/flexgroup</url>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>flex-mojos-plugin-repository</id>
            <url>http://repository.sonatype.org/content/groups/flexgroup</url>
        </pluginRepository>
    </pluginRepositories>
</project>

I run mvn install plugin.Thanks in Advance!

1

There are 1 best solutions below

0
On

If you are trying to remove the JAR files while not removing the other files, you should replace <packagingIncludes>WEB-INF/lib/*.jar</packagingIncludes> with <packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes>