You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2009/06/19 23:58:07 UTC

[jira] Commented: (SOLR-1173) Let contrib projects modify web.xml when running dist-war

    [ https://issues.apache.org/jira/browse/SOLR-1173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12722041#action_12722041 ] 

Hoss Man commented on SOLR-1173:
--------------------------------

FWIW: I'd prefer we not go down this route.

contribs (as a general rule) should be jars that can be built and dropped into a solr lib directly and used as is. If contribs start customizing the web.xml to include in Servlet Filters or Servlets then we either wind up with a single solr.war that *must* include that contrib (and it's dependencies) to function properly or multiple different war files that contain permutations of solr with various contribs baked into them.


Anything add on code that needs to modify the web.xml shouldn't be considered a simple plugin ... it should be considered "expert" level modifications.

If i understand the motivation for this, it's that an expert user (jacob) has private modifications (not intended for being committed into the ASF repository) and is requesting modifications to the solr build files to make this modifications possible when he builds his own version of solr -- not when using an official build.

This doesn't seem like something that needs to be in the solr build files -- if you're going to compile solr yourself anyway, then modifying the web.xml can be done just as easily in a build file at a "higher" level the solr as it can be at a "lower" level like a contrib.  ie: instead of...

{code}
svn co https://svn.apache.org/repos/asf/lucene/solr/trunk/ solr
cp my-private-contrib solr/contirb/my-private-contrib
cd solr
ant dist
{code}

...(where my-private-contrib/build.xml has the xmltask options you describe) you could just as easily do something like...

{code}
svn co https://svn.apache.org/repos/asf/lucene/solr/trunk/ solr
cp my-private-contrib solr/contirb/my-private-contrib
ant -f some-other-antfile-with-xmltask-commands.xml
cd solr
ant dist
{code}


In short: since what you want to do is already possible another way, I'd rather not make the change you are proposing because it could be inadvertently abused in future commits.




> Let contrib projects modify web.xml when running dist-war
> ---------------------------------------------------------
>
>                 Key: SOLR-1173
>                 URL: https://issues.apache.org/jira/browse/SOLR-1173
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Jacob Singh
>             Fix For: 1.5
>
>         Attachments: xmltask_contrib_build.diff, xmltask_contrib_build.diff
>
>
> Original problem:
> I just wrote a Servlet Filter to handle authentication for our
> service.  Here's what I did:
> 1. Created a dir in contrib
> 2. Put my project in there, I took the dataimporthandler build.xml as
> an example and modified it to suit my needs.  Worked great!
> 3. ant dist now builds my jar and includes it
> I now need to modify web.xml to add my filter-mapping, init params,
> etc.  How can I do this cleanly?  Or do I need to manually open up the
> archive and edit it and then re-war it?
> In common-build I don't see a target for dist-war, so don't see how it
> is possible...
> See: http://mail-archives.apache.org/mod_mbox/lucene-solr-user/200905.mbox/%3C4ED43C6D-320D-4E0D-835D-4366B0F08D0E@ehatchersolutions.com%3E

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.