Hi Everyone,

I am currently looking at upgraded from Jetty 7 to Jetty 9 and I am stuck
on the JSTL tags. I have scoured the internet and can see various
solutions, ultimately come back to getting the jstl jar into the web-inf
folder and all is well. However that doesn't appear to work for me.

This is how I am building (Via Maven) my self-executing WAR:

<profile>
            <id>Jetty_9</id>
            <properties>
                <jetty9.version>9.0.4.v20130625</jetty9.version>
            </properties>
            <dependencies>
                <dependency>
                    <groupId>ch.qos.logback</groupId>
                    <artifactId>logback-classic</artifactId>
                    <version>${logback.version}</version>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>ch.qos.logback</groupId>
                    <artifactId>logback-access</artifactId>
                    <version>${logback.version}</version>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>ch.qos.logback</groupId>
                    <artifactId>logback-core</artifactId>
                    <version>${logback.version}</version>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                    <version>${slf4j.version}</version>
                    <scope>provided</scope>
                </dependency>

                <dependency>
                    <groupId>org.eclipse.jetty.orbit</groupId>
                    <artifactId>javax.servlet</artifactId>
                    <version>3.0.0.v201112011016</version>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>jetty-webapp</artifactId>
                    <version>${jetty9.version}</version>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>jetty-plus</artifactId>
                    <version>${jetty9.version}</version>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>jetty-jsp</artifactId>
                    <version>${jetty9.version}</version>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <version>2.3.2</version>
                        <configuration>
                            <source>${compileSource}</source>
                            <target>${compileSource}</target>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <version>1.7</version>
                        <executions>
                            <execution>
                                <id>main-class-placement</id>
                                <phase>prepare-package</phase>
                                <configuration>
                                    <target>
                                        <move
todir="${project.build.directory}/${project.build.finalName}/">
                                            <fileset
dir="${project.build.directory}/classes/">
                                                <include name="Main.class"/>
                                            </fileset>
                                        </move>
                                    </target>
                                </configuration>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-dependency-plugin</artifactId>
                        <version>2.6</version>
                        <executions>
                            <execution>
                                <id>jetty-classpath</id>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>unpack-dependencies</goal>
                                </goals>
                                <configuration>
                                    <includeGroupIds>
                                        org.eclipse.jetty,org.slf4j,ch.qos
                                    </includeGroupIds>
                                    <includeScope>provided</includeScope>
                                    <excludes>META-INF/*</excludes>
                                    <outputDirectory>

${project.build.directory}/${project.build.finalName}
                                    </outputDirectory>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-war-plugin</artifactId>
                        <version>2.3</version>
                        <configuration>
                            <archive>
                                <manifest>
                                    <mainClass>Main</mainClass>
                                </manifest>
                            </archive>
                        </configuration>
                        <executions>
                            <execution>
                                <id>default-war</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>war</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

I also have:

<profile>
            <id>Jetty_9_Plugin</id>
            <properties>
                <jetty9.version>9.0.4.v20130625</jetty9.version>
            </properties>
            <dependencies>
                <dependency>
                    <groupId>org.eclipse.jetty.orbit</groupId>
                    <artifactId>javax.servlet</artifactId>
                    <version>3.0.0.v201112011016</version>
                    <scope>provided</scope>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <version>2.3.2</version>
                        <configuration>
                            <excludes>
                                <exclude>Main.java</exclude>
                            </excludes>
                            <source>${compileSource}</source>
                            <target>${compileSource}</target>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.eclipse.jetty</groupId>
                        <artifactId>jetty-maven-plugin</artifactId>
                        <version>${jetty9.version}</version>
                        <configuration>
                            <webAppConfig>

<descriptor>${basedir}/src/main/webapp/WEB-INF/web.xml</descriptor>

<jettyEnvXml>${server.environment.location}</jettyEnvXml>
                            </webAppConfig>
                            <systemProperties>
                                <systemProperty>
                                    <name>logback.configurationFile</name>

<value>${logback.configurationFile}</value>
                                </systemProperty>
                            </systemProperties>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

which runs as expected with the mvn jetty:run command.

Any suggestions would be greatly welcome.

Cheers

James
_______________________________________________
jetty-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/jetty-users

Reply via email to