lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adeel Qureshi <adeelmahm...@gmail.com>
Subject Re: using maven to deploy solr on tomcat
Date Tue, 16 Apr 2013 14:47:30 GMT
the problem is i need to deploy it on servers where i dont know what the
absolute path will be .. basically my goal is to load solr with a different
set of configuration files based on the environment its in. Is there a a
better different way to do this


On Mon, Apr 15, 2013 at 11:29 PM, Shawn Heisey <solr@elyograg.org> wrote:

> On 4/15/2013 2:33 PM, Adeel Qureshi wrote:
> > <Environment name="solr/home" override="true" type="java.lang.String"
> > value="src/main/resources/solr-dev"/>
> >
> > but this leads to absolute path of
> >
> > INFO: Using JNDI solr.home: src/main/resources/solr-dev
> > INFO: looking for solr.xml:
> > C:\springsource\sts-2.8.1.RELEASE\src\main\resources\solr-dev\solr.xml
>
> If you use a relative path for the solr home as you have done, it will
> be relative to the current working directory.  The CWD can vary
> depending on how tomcat gets started.  In your case, the CWD seems to be
> "C:\springsource\sts-2.8.1.RELEASE".  If you change the CWD in the
> tomcat startup, you will probably have to set the TOMCAT_HOME
> environment variable for tomcat to start correctly, so I don't recommend
> doing that.
>
> It is usually best to choose an absolute path for the solr home.  Solr
> will find solr.xml there, which it will use to find the rest of your
> config(s).  All paths in solr.xml and other solr config files can be
> relative.
>
> What you are seeing as an absolute path is likely the current working
> directory plus your solr home setting.
>
> Thanks,
> Shawn
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message