Using a struts2 modular project, there are no .class files generated either
by doing a mvn clean compile from the web directory (it says "No sources to
compile" which is a lie) or by attempting to clean + rebuild the project
within Eclipse. Therefore, I can't run unit tests or run or install the
webapp. 

It's working ok for the core project (my java files are being compiled).

Here is my webapp pom - nothing unusual I don't think.

------
<?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/maven-v4_0_0.xsd";>

    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>uk.co.enjoyholidays</groupId>
        <artifactId>holidays</artifactId>
        <version>1.0-SNAPSHOT</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>holidays-webapp</artifactId>
    <packaging>war</packaging>
    <name>AppFuse Modular Application - Web (Struts 2)</name>

    <build>
        <plugins>
        <plugin>  <artifactId>maven-clean-plugin</artifactId> 
<configuration>  <filesets>  <fileset> 
<directory>src/main/webapp/WEB-INF</directory>  <includes> 
<include>lib</include>  <include>classes</include>  </includes> 
<followSymlinks>false</followSymlinks>  </fileset>  </filesets> 
</configuration>  </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>dbunit-maven-plugin</artifactId>
                <version>1.0-beta-1</version>
                <configuration>
                   
<dataTypeFactoryName>${dbunit.dataTypeFactoryName}</dataTypeFactoryName>
                    <driver>${jdbc.driverClassName}</driver>
                    <username>${jdbc.username}</username>
                    <password>${jdbc.password}</password>
                    <url>${jdbc.url}</url>
                    <src>src/test/resources/sample-data.xml</src>
                    <type>${dbunit.operation.type}</type>
                    <schema>${dbunit.schema}</schema>
                    <skip>${maven.test.skip}</skip>
                </configuration>
                <executions>
                    <execution>
                        <id>test-compile</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>operation</goal>
                        </goals>
                    </execution>
                    <execution>
                        <!-- Runs before integration tests and jetty:run-war
-->
                        <id>test</id>
                        <phase>test</phase>
                        <goals>
                            <goal>operation</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>${jdbc.groupId}</groupId>
                        <artifactId>${jdbc.artifactId}</artifactId>
                        <version>${jdbc.version}</version>
                    </dependency>
        <dependency>
            <groupId>${pom.parent.groupId}</groupId>
            <artifactId>${pom.parent.artifactId}-core</artifactId>
            <version>${pom.parent.version}</version>
        </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>maven-jetty-plugin</artifactId>
                <version>6.1.9</version>
                <configuration>
                    <contextPath>/</contextPath>
                    <scanIntervalSeconds>3</scanIntervalSeconds>
                    <scanTargetPatterns>
                        <scanTargetPattern>
                            <directory>src/main/webapp/WEB-INF</directory>
                            <excludes>
                                <exclude>**/*.jsp</exclude>
                            </excludes>
                            <includes>
                                <include>**/*.properties</include>
                                <include>**/*.xml</include>
                            </includes>
                        </scanTargetPattern>
                    </scanTargetPatterns>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.0.2</version>
                <configuration>
                    <dependentWarExcludes>
                       
**/jdbc.properties,**/hibernate.cfg.xml,**/sql-map-config.xml,**/web.xml,WEB-INF/classes/META-INF/**
                    </dependentWarExcludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>native2ascii-maven-plugin</artifactId>
                <version>1.0-alpha-1</version>
                <configuration>
                    <dest>target/classes</dest>
                    <src>src/main/resources</src>
                </configuration>
                <executions>
                    <execution>
                        <id>native2ascii-utf8</id>
                        <goals>
                            <goal>native2ascii</goal>
                        </goals>
                        <configuration>
                            <encoding>UTF8</encoding>
                            <includes>
                                ApplicationResources_ko.properties,
                                ApplicationResources_no.properties,
                                ApplicationResources_tr.properties,
                                ApplicationResources_zh*.properties
                            </includes>
                        </configuration>
                    </execution>
                    <execution>
                        <id>native2ascii-8859_1</id>
                        <goals>
                            <goal>native2ascii</goal>
                        </goals>
                        <configuration>
                            <encoding>8859_1</encoding>
                            <includes>
                                ApplicationResources_de.properties,
                                ApplicationResources_fr.properties,
                                ApplicationResources_nl.properties,
                                ApplicationResources_pt*.properties
                            </includes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <excludes>
                    <exclude>ApplicationResources_de.properties</exclude>
                    <exclude>ApplicationResources_fr.properties</exclude>
                    <exclude>ApplicationResources_ko.properties</exclude>
                    <exclude>ApplicationResources_nl.properties</exclude>
                    <exclude>ApplicationResources_no.properties</exclude>
                    <exclude>ApplicationResources_pt*.properties</exclude>
                    <exclude>ApplicationResources_tr.properties</exclude>
                    <exclude>ApplicationResources_zh*.properties</exclude>
                    <exclude>applicationContext-resources.xml</exclude>
                    <exclude>struts.xml</exclude>
                </excludes>
                <filtering>true</filtering>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>applicationContext-resources.xml</include>
                    <include>struts.xml</include>
                </includes>
                <filtering>false</filtering>
            </resource>
        </resources>
        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
                <filtering>true</filtering>
            </testResource>
            <testResource>
                <directory>src/main/webapp</directory>
                <filtering>true</filtering>
                <includes>
                    <include>**/*.xml</include>
                </includes>
            </testResource>
        </testResources>
    </build>

    <!-- Dependencies calculated by AppFuse when running full-source plugin
-->
    <dependencies>
        <dependency>
            <groupId>${jdbc.groupId}</groupId>
            <artifactId>${jdbc.artifactId}</artifactId>
            <version>${jdbc.version}</version>
        </dependency>
        <dependency>
            <groupId>${pom.parent.groupId}</groupId>
            <artifactId>${pom.parent.artifactId}-core</artifactId>
            <version>${pom.parent.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-dbcp</groupId>
            <artifactId>commons-dbcp</artifactId>
            <version>${commons.dbcp.version}</version>
            <exclusions>
                <exclusion>
                    <artifactId>xercesImpl</artifactId>
                    <groupId>xerces</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>commons-fileupload</groupId>
            <artifactId>commons-fileupload</artifactId>
            <version>${commons.fileupload.version}</version>
            <exclusions>
                <exclusion>
                    <artifactId>commons-io</artifactId>
                    <groupId>commons-io</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>displaytag</groupId>
            <artifactId>displaytag</artifactId>
            <version>${displaytag.version}</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>${servlet.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
            <version>${jstl.version}</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jsp-api</artifactId>
            <version>${jsp.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>opensymphony</groupId>
            <artifactId>clickstream</artifactId>
            <version>${clickstream.version}</version>
        </dependency>
        <dependency>
            <groupId>opensymphony</groupId>
            <artifactId>oscache</artifactId>
            <version>${oscache.version}</version>
        </dependency>
        <dependency>
            <groupId>opensymphony</groupId>
            <artifactId>sitemesh</artifactId>
            <version>${sitemesh.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-io</artifactId>
            <version>${commons.io.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.struts</groupId>
            <artifactId>struts2-core</artifactId>
            <version>${struts.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.struts</groupId>
            <artifactId>struts2-codebehind-plugin</artifactId>
            <version>${struts.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.struts</groupId>
            <artifactId>struts2-spring-plugin</artifactId>
            <version>${struts.version}</version>
            <exclusions>
                <exclusion>
                    <artifactId>spring-beans</artifactId>
                    <groupId>org.springframework</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>spring-core</artifactId>
                    <groupId>org.springframework</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>spring-context</artifactId>
                    <groupId>org.springframework</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>spring-web</artifactId>
                    <groupId>org.springframework</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.directwebremoting</groupId>
            <artifactId>dwr</artifactId>
            <version>${dwr.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aop</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-taglibs</artifactId>
            <version>${spring.security.version}</version>
            <exclusions>
                <exclusion>
                    <artifactId>spring-web</artifactId>
                    <groupId>org.springframework</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>spring-support</artifactId>
                    <groupId>org.springframework</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.subethamail</groupId>
            <artifactId>subethasmtp-wiser</artifactId>
            <version>${wiser.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.tuckey</groupId>
            <artifactId>urlrewritefilter</artifactId>
            <version>${urlrewrite.version}</version>
            <exclusions>
                <exclusion>
                    <artifactId>ant</artifactId>
                    <groupId>ant</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>struts-menu</groupId>
            <artifactId>struts-menu</artifactId>
            <version>${struts.menu.version}</version>
            <exclusions>
                <exclusion>
                    <artifactId>xml-apis</artifactId>
                    <groupId>xml-apis</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>taglibs</groupId>
            <artifactId>standard</artifactId>
            <version>${jstl.version}</version>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>integration-test</id>
            <activation>
                <property>
                    <name>!maven.test.skip</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.cargo</groupId>
                        <artifactId>cargo-maven2-plugin</artifactId>
                        <version>0.3</version>
                        <configuration>
                            <wait>${cargo.wait}</wait>
                            <container>
                               
<containerId>${cargo.container}</containerId>
                                <!--home>${cargo.container.home}</home-->
                                <zipUrlInstaller>
                                    <url>${cargo.container.url}</url>
                                    <installDir>${installDir}</installDir>
                                </zipUrlInstaller>
                            </container>
                            <configuration>
                               
<home>${project.build.directory}/${cargo.container}/container</home>
                                <properties>
                                   
<cargo.hostname>${cargo.host}</cargo.hostname>
                                   
<cargo.servlet.port>${cargo.port}</cargo.servlet.port>
                                </properties>
                            </configuration>
                        </configuration>
                        <executions>
                            <execution>
                                <id>start-container</id>
                                <phase>pre-integration-test</phase>
                                <goals>
                                    <goal>start</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>stop-container</id>
                                <phase>post-integration-test</phase>
                                <goals>
                                    <goal>stop</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <version>1.1</version>
                        <configuration>
                            <tasks>
                                <taskdef
resource="webtest_base_relaxed.taskdef">
                                    <classpath
refid="maven.test.classpath"/>
                                </taskdef>
                                <mkdir dir="target/webtest-data"/>
                                <!-- Delete old results file if it exists
-->
                                <delete
file="target/webtest-data/web-tests-result.xml"/>
                                <!-- This is so the default will be used if
no test case is specified -->
                                <property name="test"
value="run-all-tests"/>
                                <echo level="info">Testing
'${project.build.finalName}' with locale '${user.language}'
                                </echo>
                                <ant
antfile="src/test/resources/web-tests.xml" target="${test}">
                                    <property name="user.language"
value="${user.language}"/>
                                    <property name="webapp.name"
value="${project.build.finalName}"/>
                                    <property name="host"
value="${cargo.host}"/>
                                    <property name="port"
value="${cargo.port}"/>
                                </ant>
                            </tasks>
                        </configuration>
                        <executions>
                            <execution>
                                <phase>integration-test</phase>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                            </execution>
                        </executions>
                        <dependencies>
                            <dependency>
                                <groupId>com.canoo.webtest</groupId>
                                <artifactId>webtest</artifactId>
                                <version>${webtest.version}</version>
                                <!-- groovy-all doesn't have a pom in
central repo -->
                                <!-- exclude groovy to prevent trying to
fetch pom -->
                                <exclusions>
                                    <exclusion>
                                        <groupId>groovy</groupId>
                                        <artifactId>groovy-all</artifactId>
                                    </exclusion>
                                </exclusions>
                            </dependency>
                        </dependencies>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>




Mike Horwitz wrote:
> 
> Please could you post details of the errors you receive and maybe we can
> help?
> 
> Mike
> 
> On 17/06/2008, Jonny Cavell <[EMAIL PROTECTED]> wrote:
>>
>>
>> Hi
>>
>> Attempting to install or test-compile a Struts2 modular application
>> (which
>> has previously had mvn war:inplace run) from the command line has started
>> to
>> spontaneously fail with compilation errors which do not occur when I run
>> the
>> same test from Eclipse.
>>
>> For example, the included StaticFilterTest passes fine when run from
>> Eclipse, but mvn clean test-compile on the command line from the web dir
>> results in compilation errors such as:
>>
>> filter\StaticFilterTest.java:[12,21] cannot find symbol
>> symbol  : class StaticFilter
>>
>> This has suddenly started happening and I have no idea why. No amount of
>> removing the test-classes dir etc. works - I cannot install and test
>> (although mvn compile works fine).
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/test-compile-not-working-from-the-command-line-tp17916468s2369p17916468.html
>> Sent from the AppFuse - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/cannot-resolve-classes-generated-from-Java-Resources--%3E-Java-when-running-webapp%27s-test-compile-tp17916468s2369p17955777.html
Sent from the AppFuse - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to