I'm trying to port the chat demo to iJetty3 and Cometd 2.4.2 I think I have all the code updated for Cometd, but when I download and install the war onto my phone, I get several class not found errors relating to the classes contained in the cometd-java-server dependency. I've got the jar unpacker and dex steps in my maven build, and I see the classes in dex output, so I know they are getting compiled into the classes.dex/zip. I also see that the classes.zip is placed under WEB-INF/lib. I also see the dalvikvm unzipping the classes.zip in the android log, immediately followed by all the class not found errors. I even did a dexdump on the classes.dex and found the classes it was complaining about. I'm really stumped here. If anyone can offer some clarification, that would be helpful. Here's my pom, if it helps:
<?xml version="1.0" encoding="UTF-8"?>
<parent>
<groupId>org.mortbay.ijetty</groupId>
<artifactId>example-webapps-parent</artifactId>
<version>3.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>chat</artifactId>
<name>CometD Chat</name>
<version>3.2-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
<cometd.version>2.4.2</cometd.version>
</properties>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>${android.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-android</artifactId>
<version>1.6.1-RC1</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.cometd.java</groupId>
<artifactId>cometd-java-server</artifactId>
<version>2.4.2</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
<verbose>false</verbose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<id>unpack-dependencies</id>
<phase>generate-sources</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<failOnMissingClassifierArtifact>false</failOnMissingClassifierArtifact>
<excludeArtifactIds>servlet-api,android</excludeArtifactIds>
<excludeTransitive>true</excludeTransitive>
<outputDirectory>${project.build.directory}/generated-classes</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<!-- Convert the compiled classes into a clases.dex. -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2</version>
<executions>
<execution>
<id>generate-dex</id>
<phase>process-classes</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<!-- executable>${env.ANDROID_HOME}/platform-tools/dx</executable -->
<executable>java</executable>
<arguments>
<!-- <argument>-JXmx1024M</argument> -->
<argument>-jar</argument>
<argument>${env.ANDROID_HOME}/platform-tools/lib/dx.jar</argument>
<argument>--dex</argument>
<argument>--verbose</argument>
<argument>--core-library</argument>
<argument>--output=${project.build.directory}/classes.dex</argument>
<argument>--positions=lines</argument>
<argument>${project.build.directory}/classes/</argument>
<argument>${project.build.directory}/generated-classes/</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>copydex</id>
<phase>process-classes</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<mkdir
dir="${project.build.directory}/${project.artifactId}-${project.version}/WEB-INF/lib" />
<jar
basedir="${project.build.directory}"
update="true"
includes="classes.dex"
destfile="${project.build.directory}/${project.artifactId}-${project.version}/WEB-INF/lib/classes.zip" />
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
I know I'm probably missing something obvious. If you see something, thanks in advance for letting me know.