Jetty 8 and Maven Jetty Plugin jetty:run-war not working

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Jetty 8 and Maven Jetty Plugin jetty:run-war not working

rowatt
Ive' been trying to run a very simple servlet 3.0 with no web.xml using spring 3.1 (see source code below). When I use the maven jetty plugin by calling

mvn clean jetty:run-war

the spring 3.1 SpringServletContainerInitializer servlet is detected but it does not call the onStartup method of my XyzWebApplicationInitializer. But if I run the following:

mvn clean jetty:run

then my XyzWebApplicationInitializer servlet is detected and the "TESTING" message is printed to stdout.

Is this a bug or what have I done wrong?
Thanks, shane.

com.xyz.jetty.XyzWebApplicationInitializer.java
package com.xyz.jetty;

import org.springframework.web.WebApplicationInitializer;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;

public class XyzWebApplicationInitializer implements WebApplicationInitializer {
  public void onStartup(ServletContext servletContext) throws ServletException {
    System.out.println("TESTING");
  }
}

POM.XML
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.xyz</groupId>
  <artifactId>xyz-jetty</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>war</packaging>
  <name>Xyz Jetty</name>
  <dependencies>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-webmvc</artifactId>
      <version>3.1.1.RELEASE</version>
    </dependency>
    <dependency>
      <groupId>org.mortbay.jetty</groupId>
      <artifactId>servlet-api</artifactId>
      <version>3.0.20100224</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.6</source>
          <target>1.6</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <version>2.1.1</version>
        <configuration>
          <failOnMissingWebXml>false</failOnMissingWebXml>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>jetty-maven-plugin</artifactId>
        <version>8.1.1.v20120215</version>
      </plugin>
    </plugins>
  </build>
</project>
Reply | Threaded
Open this post in threaded view
|

Re: Jetty 8 and Maven Jetty Plugin jetty:run-war not working

Jan Bartel-3
I have recently fixed a problem with jetty-8 whereby dynamically
adding a servlet could cause all the servlets to be initialized before
any of the context listeners were called. Here's the reference:
https://jira.codehaus.org/browse/JETTY-1495

However, I don't see how that problem could have been manifested
differently in mvn jetty:run and mvn jetty:run-war.

If you have a small test case, please post it.

thanks
Jan

On 17 March 2012 18:15, rowatt <[hidden email]> wrote:

> Ive' been trying to run a very simple servlet 3.0 with no web.xml using
> spring 3.1 (see source code below). When I use the maven jetty plugin by
> calling
>
> /mvn clean jetty:run-war/
>
> the spring 3.1 SpringServletContainerInitializer servlet is detected but it
> does not call the onStartup method of my XyzWebApplicationInitializer. But
> if I run the following:
>
> /mvn clean jetty:run/
>
> then my XyzWebApplicationInitializer servlet is detected and the "TESTING"
> message is printed to stdout.
>
> Is this a bug or what have I done wrong?
> Thanks, shane.
>
> *com.xyz.jetty.XyzWebApplicationInitializer.java*
> package com.xyz.jetty;
>
> import org.springframework.web.WebApplicationInitializer;
> import javax.servlet.ServletContext;
> import javax.servlet.ServletException;
>
> public class XyzWebApplicationInitializer implements
> WebApplicationInitializer {
>  public void onStartup(ServletContext servletContext) throws
> ServletException {
>    System.out.println("TESTING");
>  }
> }
>
> *POM.XML*
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0"
>         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd"
>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>  <modelVersion>4.0.0</modelVersion>
>  <groupId>com.xyz</groupId>
>  <artifactId>xyz-jetty</artifactId>
>  <version>0.0.1-SNAPSHOT</version>
>  <packaging>war</packaging>
>  <name>Xyz Jetty</name>
>  <dependencies>
>    <dependency>
>      <groupId>org.springframework</groupId>
>      <artifactId>spring-webmvc</artifactId>
>      <version>3.1.1.RELEASE</version>
>    </dependency>
>    <dependency>
>      <groupId>org.mortbay.jetty</groupId>
>      <artifactId>servlet-api</artifactId>
>      <version>3.0.20100224</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.6</source>
>          <target>1.6</target>
>        </configuration>
>      </plugin>
>      <plugin>
>        <groupId>org.apache.maven.plugins</groupId>
>        <artifactId>maven-war-plugin</artifactId>
>        <version>2.1.1</version>
>        <configuration>
>          <failOnMissingWebXml>false</failOnMissingWebXml>
>        </configuration>
>      </plugin>
>      <plugin>
>        <groupId>org.mortbay.jetty</groupId>
>        <artifactId>jetty-maven-plugin</artifactId>
>        <version>8.1.1.v20120215</version>
>      </plugin>
>    </plugins>
>  </build>
> </project>
>
> --
> View this message in context: http://jetty.4.n6.nabble.com/Jetty-8-and-Maven-Jetty-Plugin-jetty-run-war-not-working-tp4627356p4627356.html
> Sent from the Jetty Support mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Jetty 8 and Maven Jetty Plugin jetty:run-war not working

rowatt
Hi Jan,

Below are the instructions for recreating the issue I see.

Create a maven project:

mvn archetype:generate -B -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.0 -DgroupId=com.gcpgroup -DartifactId=gcp-jetty -Dversion=1.0

Remove the sample App.java and AppTest.java from created project:

cd gcp-jetty
rm –f src/main/java/com/gcpgroup/App.java
rm –f src/test/java/com/gcpgroup/AppTest.java

Replace the pom.xml with this:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.gcpgroup</groupId>
  <artifactId>gcp-jetty</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>war</packaging>
  <name>GCP Jetty</name>
  <dependencies>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-webmvc</artifactId>
      <version>3.1.1.RELEASE</version>
    </dependency>
    <dependency>
      <groupId>org.mortbay.jetty</groupId>
      <artifactId>servlet-api</artifactId>
      <version>3.0.20100224</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.6</source>
          <target>1.6</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <version>2.1.1</version>
        <configuration>
          <failOnMissingWebXml>false</failOnMissingWebXml>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>jetty-maven-plugin</artifactId>
        <version>8.1.1.v20120215</version>
      </plugin>
    </plugins>
  </build>
</project>

Put the following java file in src/main/java/com/gcpgroup/
package com.gcpgroup;

import org.springframework.web.WebApplicationInitializer;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;

public class XyzWebApplicationInitializer implements WebApplicationInitializer {
  public void onStartup(ServletContext servletContext) throws ServletException {
    System.out.println("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");
  }
}

Run the jetty:run command and grep for the test string:

mvn clean jetty:run 2>&1 | grep @@@@

You will see in stdout the following string which means XyzWebApplicationInitializer was called:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Run the jetty:run-war command and grep for the test string:

mvn clean jetty:run-war 2>&1 | grep @@@@

This command will not output the test string and hence XyzWebApplicationInitializer was not called.

I hope this helps. Let me know if you need more information,

Thanks, Shane.
Reply | Threaded
Open this post in threaded view
|

Re: Jetty 8 and Maven Jetty Plugin jetty:run-war not working

Jan Bartel-3
Hi Rowatt,

That message got a bit garbled - the "replace the pom with this" was
missing, as was the java class.

Any chance you could generate the project then zip it and attach it?

thanks
Jan

On 19 March 2012 11:54, rowatt <[hidden email]> wrote:

> Hi Jan,
>
> Below are the instructions for recreating the issue I see.
>
> *Create a maven project:*
>
> mvn archetype:generate -B -DarchetypeGroupId=org.apache.maven.archetypes
> -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.0
> -DgroupId=com.gcpgroup -DartifactId=gcp-jetty -Dversion=1.0
>
> *Remove the sample App.java and AppTest.java from created project:*
>
> cd gcp-jetty
> rm –f src/main/java/com/gcpgroup/App.java
> rm –f src/test/java/com/gcpgroup/AppTest.java
>
> *Replace the pom.xml with this:*
>
>
>
> *Put the following java file in src/main/java/com/gcpgroup/*
>
>
> *Run the jetty:run command and grep for the test string:*
>
> mvn clean jetty:run 2>&1 | grep @@@@
>
> *You will see in stdout the following string which means
> XyzWebApplicationInitializer was called:*
>
> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
>
> *Run the jetty:run-war command and grep for the test string:*
>
> mvn clean jetty:run-war 2>&1 | grep @@@@
>
> *This command will not output the test string and hence
> XyzWebApplicationInitializer was not called.*
>
> I hope this helps. Let me know if you need more information,
>
> Thanks, Shane.
>
> --
> View this message in context: http://jetty.4.n6.nabble.com/Jetty-8-and-Maven-Jetty-Plugin-jetty-run-war-not-working-tp4627356p4631715.html
> Sent from the Jetty Support mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Jetty 8 and Maven Jetty Plugin jetty:run-war not working

rowatt
Shane Rowatt
Architect
T
M
F
E
W
+61 7 3252 1650
+61 401 550 697
+61 7 3252 1350
[hidden email]
gcpgroup.com
GCP Brisbane
24 Chester Street
Newstead QLD 4006
Australia
GCP Australia Limited   |   Sydney   |   Brisbane   |   Singapore   |   London
Important Notice:
The information in this email and/or any of the attachments may contain Confidential, Legally Privileged and/or Copyright material of GCP Australia Limited or third parties. 

If you are not an authorised recipient of this email, please contact GCP Australia Limited immediately by return email or by telephone on +61 7 3252 1650 and delete the email from your system. We do not accept any liability in connection with any computer virus, data corruption, interruption or any damage generally as a result of transmission of this email.

On 19/03/12 12:41 PM, "Jan Bartel-3 [via Jetty]" <[hidden email]> wrote:

Hi Rowatt,

That message got a bit garbled - the "replace the pom with this" was
missing, as was the java class.

Any chance you could generate the project then zip it and attach it?

thanks
Jan

On 19 March 2012 11:54, rowatt <[hidden email]> wrote:

> Hi Jan,
>
> Below are the instructions for recreating the issue I see.
>
> *Create a maven project:*
>
> mvn archetype:generate -B -DarchetypeGroupId=org.apache.maven.archetypes
> -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.0
> -DgroupId=com.gcpgroup -DartifactId=gcp-jetty -Dversion=1.0
>
> *Remove the sample App.java and AppTest.java from created project:*
>
> cd gcp-jetty
> rm –f src/main/java/com/gcpgroup/App.java
> rm –f src/test/java/com/gcpgroup/AppTest.java
>
> *Replace the pom.xml with this:*
>
>
>
> *Put the following java file in src/main/java/com/gcpgroup/*
>
>
> *Run the jetty:run command and grep for the test string:*
>
> mvn clean jetty:run 2>&1 | grep @@@@
>
> *You will see in stdout the following string which means
> XyzWebApplicationInitializer was called:*
>
> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
>
> *Run the jetty:run-war command and grep for the test string:*
>
> mvn clean jetty:run-war 2>&1 | grep @@@@
>
> *This command will not output the test string and hence
> XyzWebApplicationInitializer was not called.*
>
> I hope this helps. Let me know if you need more information,
>
> Thanks, Shane.
>
> --
> View this message in context: http://jetty.4.n6.nabble.com/Jetty-8-and-Maven-Jetty-Plugin-jetty-run-war-not-working-tp4627356p4631715.html
> Sent from the Jetty Support mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email





If you reply to this email, your message will be added to the discussion below:
http://jetty.4.n6.nabble.com/Jetty-8-and-Maven-Jetty-Plugin-jetty-run-war-not-working-tp4627356p4631872.html
To unsubscribe from Jetty 8 and Maven Jetty Plugin jetty:run-war not working, click here.
NAML
Reply | Threaded
Open this post in threaded view
|

Re: Jetty 8 and Maven Jetty Plugin jetty:run-war not working

rowatt
In reply to this post by Jan Bartel-3
Hi Jan,

Attached is the little tar gzip of the maven project with the XyzWebApplicationInitializer code in it.

Thanks for looking at this issue,
Shane Rowatt
Architect
T
M
F
E
W
+61 7 3252 1650
+61 401 550 697
+61 7 3252 1350
[hidden email]
gcpgroup.com
GCP Brisbane
24 Chester Street
Newstead QLD 4006
Australia
GCP Australia Limited   |   Sydney   |   Brisbane   |   Singapore   |   London
Important Notice:
The information in this email and/or any of the attachments may contain Confidential, Legally Privileged and/or Copyright material of GCP Australia Limited or third parties. 

If you are not an authorised recipient of this email, please contact GCP Australia Limited immediately by return email or by telephone on +61 7 3252 1650 and delete the email from your system. We do not accept any liability in connection with any computer virus, data corruption, interruption or any damage generally as a result of transmission of this email.

On 19/03/12 12:41 PM, "Jan Bartel-3 [via Jetty]" <[hidden email]> wrote:

Hi Rowatt,

That message got a bit garbled - the "replace the pom with this" was
missing, as was the java class.

Any chance you could generate the project then zip it and attach it?

thanks
Jan

On 19 March 2012 11:54, rowatt <[hidden email]> wrote:

> Hi Jan,
>
> Below are the instructions for recreating the issue I see.
>
> *Create a maven project:*
>
> mvn archetype:generate -B -DarchetypeGroupId=org.apache.maven.archetypes
> -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.0
> -DgroupId=com.gcpgroup -DartifactId=gcp-jetty -Dversion=1.0
>
> *Remove the sample App.java and AppTest.java from created project:*
>
> cd gcp-jetty
> rm –f src/main/java/com/gcpgroup/App.java
> rm –f src/test/java/com/gcpgroup/AppTest.java
>
> *Replace the pom.xml with this:*
>
>
>
> *Put the following java file in src/main/java/com/gcpgroup/*
>
>
> *Run the jetty:run command and grep for the test string:*
>
> mvn clean jetty:run 2>&1 | grep @@@@
>
> *You will see in stdout the following string which means
> XyzWebApplicationInitializer was called:*
>
> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
>
> *Run the jetty:run-war command and grep for the test string:*
>
> mvn clean jetty:run-war 2>&1 | grep @@@@
>
> *This command will not output the test string and hence
> XyzWebApplicationInitializer was not called.*
>
> I hope this helps. Let me know if you need more information,
>
> Thanks, Shane.
>
> --
> View this message in context: http://jetty.4.n6.nabble.com/Jetty-8-and-Maven-Jetty-Plugin-jetty-run-war-not-working-tp4627356p4631715.html
> Sent from the Jetty Support mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email





If you reply to this email, your message will be added to the discussion below:
http://jetty.4.n6.nabble.com/Jetty-8-and-Maven-Jetty-Plugin-jetty-run-war-not-working-tp4627356p4631872.html
To unsubscribe from Jetty 8 and Maven Jetty Plugin jetty:run-war not working, click here.
NAML

gcp-jetty.tar.gz (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Jetty 8 and Maven Jetty Plugin jetty:run-war not working

Jan Bartel-3
Hi Rowatt,

https://jira.codehaus.org/browse/JETTY-1499

Fixed!

thanks
Jan

On 19 March 2012 13:48, rowatt <[hidden email]> wrote:
Hi Jan,

Attached is the little tar gzip of the maven project with the XyzWebApplicationInitializer code in it.

Thanks for looking at this issue,
Shane Rowatt
Architect
T
M
F
E
W
<a href="tel:%2B61%207%203252%201650" value="+61732521650" target="_blank">+61 7 3252 1650
<a href="tel:%2B61%20401%20550%20697" value="+61401550697" target="_blank">+61 401 550 697
<a href="tel:%2B61%207%203252%201350" value="+61732521350" target="_blank">+61 7 3252 1350
[hidden email]
gcpgroup.com
GCP Brisbane
24 Chester Street
Newstead QLD 4006
Australia
GCP Australia Limited   |   Sydney   |   Brisbane   |   Singapore   |   London
Important Notice:
The information in this email and/or any of the attachments may contain Confidential, Legally Privileged and/or Copyright material of GCP Australia Limited or third parties. 

If you are not an authorised recipient of this email, please contact GCP Australia Limited immediately by return email or by telephone on <a href="tel:%2B61%207%203252%201650" value="+61732521650" target="_blank">+61 7 3252 1650 and delete the email from your system. We do not accept any liability in connection with any computer virus, data corruption, interruption or any damage generally as a result of transmission of this email.

On 19/03/12 12:41 PM, "Jan Bartel-3 [via Jetty]" <[hidden email]> wrote:

Hi Rowatt,

That message got a bit garbled - the "replace the pom with this" was
missing, as was the java class.

Any chance you could generate the project then zip it and attach it?

thanks
Jan

On 19 March 2012 11:54, rowatt <[hidden email]> wrote:

> Hi Jan,
>
> Below are the instructions for recreating the issue I see.
>
> *Create a maven project:*
>
> mvn archetype:generate -B -DarchetypeGroupId=org.apache.maven.archetypes
> -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.0
> -DgroupId=com.gcpgroup -DartifactId=gcp-jetty -Dversion=1.0
>
> *Remove the sample App.java and AppTest.java from created project:*
>
> cd gcp-jetty
> rm –f src/main/java/com/gcpgroup/App.java
> rm –f src/test/java/com/gcpgroup/AppTest.java
>
> *Replace the pom.xml with this:*
>
>
>
> *Put the following java file in src/main/java/com/gcpgroup/*
>
>
> *Run the jetty:run command and grep for the test string:*
>
> mvn clean jetty:run 2>&1 | grep @@@@
>
> *You will see in stdout the following string which means
> XyzWebApplicationInitializer was called:*
>
> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
>
> *Run the jetty:run-war command and grep for the test string:*
>
> mvn clean jetty:run-war 2>&1 | grep @@@@
>
> *This command will not output the test string and hence
> XyzWebApplicationInitializer was not called.*
>
> I hope this helps. Let me know if you need more information,
>
> Thanks, Shane.
>
> --
> View this message in context: http://jetty.4.n6.nabble.com/Jetty-8-and-Maven-Jetty-Plugin-jetty-run-war-not-working-tp4627356p4631715.html
> Sent from the Jetty Support mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email





If you reply to this email, your message will be added to the discussion below:
http://jetty.4.n6.nabble.com/Jetty-8-and-Maven-Jetty-Plugin-jetty-run-war-not-working-tp4627356p4631872.html
To unsubscribe from Jetty 8 and Maven Jetty Plugin jetty:run-war not working, click here.
NAML

gcp-jetty.tar.gz (1K) Download Attachment
Sent from the Jetty Support mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: Jetty 8 and Maven Jetty Plugin jetty:run-war not working

rowatt
Wow that was quick. Thank you very much Jan. One last question, when will the 8.1.3 jetty maven plugin be released and pushed into maven repos?

Thanks, Shane.
Shane Rowatt
Architect
T
M
F
E
W
+61 7 3252 1650
+61 401 550 697
+61 7 3252 1350
[hidden email]
gcpgroup.com
GCP Brisbane
24 Chester Street
Newstead QLD 4006
Australia
GCP Australia Limited   |   Sydney   |   Brisbane   |   Singapore   |   London
Important Notice:
The information in this email and/or any of the attachments may contain Confidential, Legally Privileged and/or Copyright material of GCP Australia Limited or third parties. 

If you are not an authorised recipient of this email, please contact GCP Australia Limited immediately by return email or by telephone on +61 7 3252 1650 and delete the email from your system. We do not accept any liability in connection with any computer virus, data corruption, interruption or any damage generally as a result of transmission of this email.

On 19/03/12 4:56 PM, "Jan Bartel-3 [via Jetty]" <[hidden email]> wrote:

Hi Rowatt,

https://jira.codehaus.org/browse/JETTY-1499

Fixed!

thanks
Jan

On 19 March 2012 13:48, rowatt <[hidden email]> wrote:
Hi Jan,

Attached is the little tar gzip of the maven project with the XyzWebApplicationInitializer code in it.

Thanks for looking at this issue,
Shane Rowatt
Architect
T
M
F
E
W
<a href="tel:%2B61%207%203252%201650" value="+61732521650" target="_blank">+61 7 3252 1650
<a href="tel:%2B61%20401%20550%20697" value="+61401550697" target="_blank">+61 401 550 697
<a href="tel:%2B61%207%203252%201350" value="+61732521350" target="_blank">+61 7 3252 1350
[hidden email]
gcpgroup.com
GCP Brisbane
24 Chester Street
Newstead QLD 4006
Australia
GCP Australia Limited   |   Sydney   |   Brisbane   |   Singapore   |   London
Important Notice:
The information in this email and/or any of the attachments may contain Confidential, Legally Privileged and/or Copyright material of GCP Australia Limited or third parties. 

If you are not an authorised recipient of this email, please contact GCP Australia Limited immediately by return email or by telephone on <a href="tel:%2B61%207%203252%201650" value="+61732521650" target="_blank">+61 7 3252 1650 and delete the email from your system. We do not accept any liability in connection with any computer virus, data corruption, interruption or any damage generally as a result of transmission of this email.

On 19/03/12 12:41 PM, "Jan Bartel-3 [via Jetty]" <[hidden email]> wrote:

Hi Rowatt,

That message got a bit garbled - the "replace the pom with this" was
missing, as was the java class.

Any chance you could generate the project then zip it and attach it?

thanks
Jan

On 19 March 2012 11:54, rowatt <[hidden email]> wrote:

> Hi Jan,
>
> Below are the instructions for recreating the issue I see.
>
> *Create a maven project:*
>
> mvn archetype:generate -B -DarchetypeGroupId=org.apache.maven.archetypes
> -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.0
> -DgroupId=com.gcpgroup -DartifactId=gcp-jetty -Dversion=1.0
>
> *Remove the sample App.java and AppTest.java from created project:*
>
> cd gcp-jetty
> rm –f src/main/java/com/gcpgroup/App.java
> rm –f src/test/java/com/gcpgroup/AppTest.java
>
> *Replace the pom.xml with this:*
>
>
>
> *Put the following java file in src/main/java/com/gcpgroup/*
>
>
> *Run the jetty:run command and grep for the test string:*
>
> mvn clean jetty:run 2>&1 | grep @@@@
>
> *You will see in stdout the following string which means
> XyzWebApplicationInitializer was called:*
>
> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
>
> *Run the jetty:run-war command and grep for the test string:*
>
> mvn clean jetty:run-war 2>&1 | grep @@@@
>
> *This command will not output the test string and hence
> XyzWebApplicationInitializer was not called.*
>
> I hope this helps. Let me know if you need more information,
>
> Thanks, Shane.
>
> --
> View this message in context: http://jetty.4.n6.nabble.com/Jetty-8-and-Maven-Jetty-Plugin-jetty-run-war-not-working-tp4627356p4631715.html
> Sent from the Jetty Support mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email





If you reply to this email, your message will be added to the discussion below:
http://jetty.4.n6.nabble.com/Jetty-8-and-Maven-Jetty-Plugin-jetty-run-war-not-working-tp4627356p4631872.html
To unsubscribe from Jetty 8 and Maven Jetty Plugin jetty:run-war not working, click here.
NAML

gcp-jetty.tar.gz (1K) Download Attachment
Sent from the Jetty Support mailing list archive at Nabble.com.




If you reply to this email, your message will be added to the discussion below:
http://jetty.4.n6.nabble.com/Jetty-8-and-Maven-Jetty-Plugin-jetty-run-war-not-working-tp4627356p4632237.html
To unsubscribe from Jetty 8 and Maven Jetty Plugin jetty:run-war not working, click here.
NAML