Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Urgent: Problems with Maven Jetty Plugin

if your using jetty6 you need to use maven-jetty-plugin, jetty7 is
jetty-maven-plugin, there was a naming change in there to adhere with
maven plugin naming conventions

jesse

--
jesse mcconnell
jesse.mcconnell@xxxxxxxxx



On Wed, Jul 22, 2009 at 16:29, Marco Tedone<marco.tedone@xxxxxxxxxxxxxx> wrote:
> It has nothing to do with my setting. I couldn't have dreamed of specifying
> 7.0.0.M4 version anywhere (and a grep confirmed that). As an additional
> demonstration, I actually found a configuration that works (well, except
> from the security realm):
>
> <dependency>
>                        <groupId>org.eclipse.jetty</groupId>
>                        <artifactId>jetty-webapp</artifactId>
>                        <version>7.0.0.M1</version>
>                        <scope>provided</scope>
>                </dependency>
> ...
>
> <build>
>                                <plugins>
>                                        <plugin>
>
> <groupId>org.mortbay.jetty</groupId>
>
> <artifactId>jetty-maven-plugin</artifactId>
>
> <version>7.0.0.1beta0</version>
>                                                <configuration>
>
> <contextPath>/fido-web</contextPath>
>                                                        <connectors>
>                                                                <connector
> implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
>
> <port>8787</port>
>                                                                </connector>
>                                                        </connectors>
>
>
>                                                </configuration>
>                                        </plugin>
>                                </plugins>
>                        </build>
> ...
>
> When running the plugin with this configuration it runs under the right
> context(fido-web) and under the correct port, meaning that my configuration
> is correct. The only thing I can't get to work is the security realm. I get
> the following exception:
>
> java.lang.IllegalStateException: No LoginService for
> org.eclipse.jetty.security.authentication.BasicAuthenticator@1c45731 in
> ConstraintSecurityHandler@1388e5e@/fido-web
>
> Even by specifying the following:
>
> <userRealms>
>                                                                <userRealm
> implementation="org.eclipse.jetty.security.HashLoginService">
>
> <name>fido-secure</name>
>
> <config>src/test/resources/realm.properties</config>
>                                                                </userRealm>
>                                                        </userRealms>
>
> I get the same message
>
> -----Original Message-----
> From: jetty-users-bounces@xxxxxxxxxxx
> [mailto:jetty-users-bounces@xxxxxxxxxxx] On Behalf Of Jesse McConnell
> Sent: 22 July 2009 22:23
> To: JETTY user mailing list
> Subject: Re: [jetty-users] Urgent: Problems with Maven Jetty Plugin
>
> that makes no sense to me...
>
> grep through your project pom.xml's for 7.0.0.M4 and see if anything
> was added in there..
>
> check your properties as well maybe
>
> jesse
>
> --
> jesse mcconnell
> jesse.mcconnell@xxxxxxxxx
>
>
>
> On Wed, Jul 22, 2009 at 16:04, Marco Tedone<marco.tedone@xxxxxxxxxxxxxx>
> wrote:
>> 2.0.9
>>
>> -----Original Message-----
>> From: jetty-users-bounces@xxxxxxxxxxx
>> [mailto:jetty-users-bounces@xxxxxxxxxxx] On Behalf Of Jesse McConnell
>> Sent: 22 July 2009 22:02
>> To: JETTY user mailing list
>> Subject: Re: [jetty-users] Urgent: Problems with Maven Jetty Plugin
>>
>> what maven version are you using?
>>
>> --
>> jesse mcconnell
>> jesse.mcconnell@xxxxxxxxx
>>
>>
>>
>> On Wed, Jul 22, 2009 at 16:00, Marco Tedone<marco.tedone@xxxxxxxxxxxxxx>
>> wrote:
>>> Yes.
>>>
>>> I deleted the whole org.mortbay and org.eclipse folders from my
>> repository.
>>>
>>> In my configuration I have now:
>>>
>>> <dependency>
>>>                        <groupId>org.mortbay.jetty</groupId>
>>>                        <artifactId>jetty</artifactId>
>>>                        <version>6.1.19</version>
>>>                        <scope>provided</scope>
>>> </dependency>
>>>
>>> ...
>>>
>>>
>>> <profile>
>>>                        <id>jetty-test</id>
>>>                        <build>
>>>                                <plugins>
>>>                                        <plugin>
>>>
>>> <groupId>org.mortbay.jetty</groupId>
>>>
>>> <artifactId>maven-jetty-plugin</artifactId>
>>>                                                <version>6.1.19</version>
>>>                                                <configuration>
>>>
>>> <scanIntervalSeconds>10</scanIntervalSeconds>
>>>
>>>                                                        <!-- configure the
>>> container                 -->
>>>
>>> <jettyConfig>src/test/resources/jetty.xml
>>>                    </jettyConfig>
>>>
>>>                                                        <!-- configure the
>>> container-->
>>>                                                        <connectors>
>>>                                                                <connector
>>> implementation="org.mortbay.jetty.nio.SelectChannelConnector">
>>>
>>> <port>8787</port>
>>>
>>> <maxIdleTime>60000</maxIdleTime>
>>>
>>  </connector>
>>>                                                        </connectors>
>>>
>>>                                                <userRealms>
>>>            <userRealm
>>> implementation="org.mortbay.jetty.security.HashUserRealm">
>>>              <name>fido-secure</name>
>>>              <config>src/test/resources/realm.properties</config>
>>>            </userRealm>
>>>          </userRealms>
>>>
>>>                                                </configuration>
>>>
>>>                                        </plugin>
>>>                                </plugins>
>>>                        </build>
>>>
>>> And it downloads a lot of stuff, including 7.0.0.M4 which I haven't
>>> specified anywhere. It must be the plugin which indicates that.
>>>
>>> Below follows partial screenshot of what happens on my box with a clean
>>> Maven repository and the configuration above.
>>>
>>>
>>>
>>>
>>>
>>> [snip]
>>> Downloading:
>>>
>>
> http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-server/7.0.0.M4/jetty-
>>> server-7.0.0.M4.jar
>>> 233K downloaded
>>> Downloading:
>>>
>>
> http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-continuation/7.0.0.M4/
>>> jetty-continuation-7.0.0.M4.jar
>>> 18K downloaded
>>> Downloading:
>>>
>>
> http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-http/7.0.0.M4/jetty-ht
>>> tp-7.0.0.M4.jar
>>> 102K downloaded
>>> Downloading:
>>>
>>
> http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-io/7.0.0.M4/jetty-io-7
>>> .0.0.M4.jar
>>> 60K downloaded
>>> Downloading:
>>>
>>
> http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-plus/7.0.0.M4/jetty-pl
>>> us-7.0.0.M4.jar
>>> 70K downloaded
>>> Downloading:
>>>
>>
> http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-jndi/7.0.0.M4/jetty-jn
>>> di-7.0.0.M4.jar
>>> 28K downloaded
>>> Downloading:
>>>
>>
> http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-jmx/7.0.0.M4/jetty-jmx
>>> -7.0.0.M4.jar
>>> 33K downloaded
>>> Downloading:
>>>
>>
> http://repo1.maven.org/maven2/org/mortbay/jetty/jsp-2.1-glassfish/9.1.1.B60.
>>> 25.p1/jsp-2.1-glassfish-9.1.1.B60.25.p1.jar
>>> 1001K downloaded
>>> Downloading:
>>> http://repo1.maven.org/maven2/org/eclipse/jdt/core/3.1.1/core-3.1.1.jar
>>> 3483K downloaded
>>> Downloading:
>>>
>>
> http://repo1.maven.org/maven2/org/mortbay/jetty/jsp-api-2.1-glassfish/9.1.1.
>>> B60.25.p1/jsp-api-2.1-glassfish-9.1.1.B60.25.p1.jar
>>> 131K downloaded
>>> Downloading:
>>>
>>
> http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-annotations/7.0.0.M4/j
>>> etty-annotations-7.0.0.M4.jar
>>> 31K downloaded
>>> Downloading:
>>>
>>
> http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-start/7.0.0.M4/jetty-s
>>> tart-7.0.0.M4.jar
>>> 20K downloaded
>>> [INFO] [jetty:run]
>>> [INFO] Configuring Jetty for project: fido-web
>>> [INFO] Webapp source directory =
> C:\Projects\fido\fido-web\src\main\webapp
>>> [INFO] Reload Mechanic: automatic
>>> [INFO] Classes = C:\Projects\fido\fido-web\target\classes
>>> 2009-07-22 21:56:08.750::INFO:  Logging to STDERR via
>>> org.eclipse.jetty.util.log.StdErrLog
>>> [INFO] Context path = /
>>> [INFO] Tmp directory = C:\Projects\fido\fido-web\target\work
>>> [INFO] Web defaults = org/eclipse/jetty/webapp/webdefault.xml
>>> [INFO] Web overrides =  none
>>> [INFO] web.xml file =
>>> C:\Projects\fido\fido-web\src\main\webapp\WEB-INF\web.xml
>>> [INFO] Webapp directory = C:\Projects\fido\fido-web\src\main\webapp
>>> [INFO] Starting jetty 7.0.0.M4 ...
>>> [/snip]
>>>
>>> -----Original Message-----
>>> From: jetty-users-bounces@xxxxxxxxxxx
>>> [mailto:jetty-users-bounces@xxxxxxxxxxx] On Behalf Of Jesse McConnell
>>> Sent: 22 July 2009 21:44
>>> To: JETTY user mailing list
>>> Subject: Re: [jetty-users] Urgent: Problems with Maven Jetty Plugin
>>>
>>> jetty-6.1.19 should be the latest stable version in jetty6....
>>>
>>> but your saying that hardcoding that version in your plugin
>>> declaration is downloading jetty7 artifacts?
>>>
>>> jesse
>>>
>>> --
>>> jesse mcconnell
>>> jesse.mcconnell@xxxxxxxxx
>>>
>>>
>>>
>>> On Wed, Jul 22, 2009 at 15:39, Marco Tedone<marco.tedone@xxxxxxxxxxxxxx>
>>> wrote:
>>>> Dear all,
>>>>
>>>> Since last week I was happily running my project using the Maven Jetty
>>>> Plugin. I had the following configuration:
>>>>
>>>> <build>
>>>> ...
>>>>        <dependency>
>>>>                <groupId>org.mortbay.jetty</groupId>
>>>>                <artifactId>jetty</artifactId>
>>>>                <version>6.0.0rc4</version>
>>>>                <scope>provided</scope>
>>>>        </dependency>
>>>> </build>
>>>>
>>>> ...
>>>>
>>>> <profile>
>>>>                        <id>jetty-test</id>
>>>>                        <build>
>>>>                                <plugins>
>>>>                                        <plugin>
>>>>
>>>> <groupId>org.mortbay.jetty</groupId>
>>>>
>>>> <artifactId>maven-jetty-plugin</artifactId>
>>>>
>>>>                                                <configuration>
>>>>
>>>> <scanIntervalSeconds>10</scanIntervalSeconds>
>>>>
>>>>
>>>>                                                        <!-- configure
> the
>>>> container                 -->
>>>>
>>>> <jettyConfig>src/test/resources/jetty.xml</jettyConfig>
>>>>
>>>>                                                        <!-- configure
> the
>>>> container-->
>>>>                                                        <connectors>
>>>>
>  <connector
>>>> implementation="org.mortbay.jetty.nio.SelectChannelConnector">
>>>>
>>>> <port>8787</port>
>>>>
>>>> <maxIdleTime>60000</maxIdleTime>
>>>>
>>>  </connector>
>>>>                                                        </connectors>
>>>>
>>>>                                                        <userRealms>
>>>>
>  <userRealm
>>>> implementation="org.mortbay.jetty.security.HashUserRealm">
>>>>
>>>> <name>fido-secure</name>
>>>>
>>>> <config>src/test/resources/realm.properties</config>
>>>>
>>>  </userRealm>
>>>>                                                        </userRealms>
>>>>
>>>>                                                </configuration>
>>>>
>>>>                                        </plugin>
>>>>                                </plugins>
>>>>                        </build>
>>>> </profile>
>>>>
>>>> Everything was working brilliantly. I launched mvn jetty:run -P
>> jetty-test
>>>> and Jetty started on port 8787 with the application context fido-web.
>>>> Yesterday I re-launched the application and I saw Maven downloading
> loads
>>> of
>>>> org.eclipse.jetty.* stuff, especially for version 7.0.0.M4. Since then
>> the
>>>> Maven Jetty Plugin doesn't work any more. Please note that even if I
>>>> indicate version 6.1.10 (the stable one) when running Jetty it still
>>>> downloads version 7.0.0.M4.
>>>>
>>>> I guess that the default maven-jetty-plugin on the repository redirects
>> to
>>>> the new Jetty 7 hosted at Eclipse. The problem is that when running the
>>>> plugin the following don't work anymore:
>>>>
>>>> 1) The context is not recognised
>>>> 2) The port is not recognised
>>>> 3) The Security realm is not recognised
>>>>
>>>> I have also tried to run the instructions at the following page:
>>>> http://wiki.eclipse.org/Jetty/Starting/Upgrade_from_Jetty_6_to_Jetty_7
>>>> (followed the suggestions, which indicated to use version 7.0.0.M1) but
> I
>>>> couldn't find that version on the repository.
>>>>
>>>> I'm documenting my MSc project (where I'm using the Maven Jetty Plugin)
>>> and
>>>> I would need to get Jetty up and running pronto. Could someone who has
>>>> fiddled with the new version of the Maven Jetty Plugin tell me how to
>>>> configure it so that it works? Alternatively, could you tell me how to
>>> force
>>>> Maven to use the stable version 6.1.10?
>>>>
>>>>
>>>> _______________________________________________
>>>> jetty-users mailing list
>>>> jetty-users@xxxxxxxxxxx
>>>> https://dev.eclipse.org/mailman/listinfo/jetty-users
>>>>
>>>
>>>
>>> _______________________________________________
>>> jetty-users mailing list
>>> jetty-users@xxxxxxxxxxx
>>> https://dev.eclipse.org/mailman/listinfo/jetty-users
>>>
>> _______________________________________________
>> jetty-users mailing list
>> jetty-users@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/jetty-users
>>
>>
>> _______________________________________________
>> jetty-users mailing list
>> jetty-users@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/jetty-users
>>
> _______________________________________________
> jetty-users mailing list
> jetty-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/jetty-users
>
>
> _______________________________________________
> jetty-users mailing list
> jetty-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/jetty-users
>


Back to the top