[jetty-dev] [jira] (JETTY-1516) Jetty mavn plugin run-forked doesn't respect configuration set using file from contextXml option

"Jan Bartel (JIRA)" <[email protected]>
Newsgroups gmane.comp.java.jetty.general
Message-ID <482435658.82878.1337268543166.JavaMail.j2ee-jira@codehaus01.managed.contegix.com>
    [ https://jira.codehaus.org/browse/JETTY-1516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=299000#comment-299000 ] 

Jan Bartel edited comment on JETTY-1516 at 5/17/12 10:27 AM:
-------------------------------------------------------------

Stepan,

The values that are set via the configuration parameters such as contextPath, webXml, tmpDirectory etc must override those that are set inside the context.xml file, as that behaviour is standard throught the jetty maven plugin.

It is true that they will always be set to some value, as default values are provided for them via the maven parameter declaration annotations. However, if you don't like the default values, then you should be able to specify the values you want. 

It seems that you want to be able to specify multiple locations for the base resource of the webapp. If I change the plugin so that you can specify multiple directories as comma separated list, will that meet your requirements?

Jan
                
      was (Author: janb):
    Stepan,

The values that are set via the configuration parameters such as contextPath, webXml, tmpDirectory etc must override those that are set inside the context.xml file, as that behaviour is standard throught the jetty maven plugin.

It is true that they will always be set to some value, as default values are provided for them via the maven parameter declaration annotations. However, if you don't like the default values, then you should be able to specify the values you want. Which ones in particular are you unable to set values for?
                  
> Jetty mavn plugin run-forked doesn't respect configuration set using file from contextXml option
> ------------------------------------------------------------------------------------------------
>
>                 Key: JETTY-1516
>                 URL: https://jira.codehaus.org/browse/JETTY-1516
>             Project: Jetty
>          Issue Type: Bug
>          Components: Maven
>    Affects Versions: 8.1.3
>         Environment: all
>            Reporter: Stepan Vavra
>
> If one sets option 'contextXml' with a Jetty configuration file where are specified options such as:
> 1. context path
> 2. temporary directory
> 3. base dir
> these options are silently overridden with properties from the 'fork.props' file.
> The biggest problem is that run-forked goal doesn't support multiple web app resources at all!
> I suggest:
> 1. to check whether JettyWebAppContext instance has already set fields in method org.mortbay.jetty.plugin.Starter.configureWebApp() and set a field only if it is null
> 2. or to run method configureWebApp() in the org.mortbay.jetty.plugin.Starter.configureJetty method before the JettyWebAppContext instance is populated using 'contextXml' option
> Looking at wiki page I believe it says that for instance 'contextPath', if set, will override configuration inside contextXml file. But it's not true. It always overrides it because the field in the Mojo is always initialized with a value and as a result it's always set in the JettyWebAppContext instance.
> I think it's fair enough to just show a warning message if an option collides but to use the one from the contextXml file. Although I would not show a warning in case that the mojo is using default values.
> Shall I fix this bug by myself and commit it?
> Thanks for your support!
> Stepan

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

    http://xircles.codehaus.org/manage_email
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.