compiling Solr

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

compiling Solr

Steve Pruitt
I have been following the instructions on the Solr Wiki for compiling Solr.  I started with the 6.6 source.  The only thing I did different was download the src directly.  I did not use Subversion.
I made through step 7 - Compile application with no problems.  However, the dist folder contains newly build snapshot jars, but no war file.
The last item in step 7 is copy the war file to the solr\example\webapps folder.  I have no solr\webapps folder either.
A webapp folder was created under \solr, but it contains only what looks like client parts.  The WEB-INF folder only has the web.xml file.

I noticed step 8 describes navigating to the solr\example directory and executing the start.jar.  But, there is no start.jar under example.  It's under solr\server.

Not sure what to do next.  I feel like I have missed a step, or something.

Thanks.

-Steve
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: compiling Solr

Daniel Collins
That page was last edited in 2014, things have moved on a little since then!
Solr doesn't produce a WAR file by default anymore, as running in a generic
servlet container isn't a supported configuration.  What is produced from
ant dist is effectively the exploded form of the WAR. You can still create
the war using ant dist-war, but that wiki page needs an overhaul!

If you want to play with Solr first, I think the better alternative is to
download the binary distribution, that has a number of examples that just
work out of the box.  Get used to what is in that distribution and explore
how that is laid out before you start to play with the code (just my
tuppence worth).

On 13 July 2017 at 21:16, Steve Pruitt <[hidden email]> wrote:

> I have been following the instructions on the Solr Wiki for compiling
> Solr.  I started with the 6.6 source.  The only thing I did different was
> download the src directly.  I did not use Subversion.
> I made through step 7 - Compile application with no problems.  However,
> the dist folder contains newly build snapshot jars, but no war file.
> The last item in step 7 is copy the war file to the solr\example\webapps
> folder.  I have no solr\webapps folder either.
> A webapp folder was created under \solr, but it contains only what looks
> like client parts.  The WEB-INF folder only has the web.xml file.
>
> I noticed step 8 describes navigating to the solr\example directory and
> executing the start.jar.  But, there is no start.jar under example.  It's
> under solr\server.
>
> Not sure what to do next.  I feel like I have missed a step, or something.
>
> Thanks.
>
> -Steve
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: compiling Solr

Shawn Heisey-2
In reply to this post by Steve Pruitt
On 7/13/2017 2:16 PM, Steve Pruitt wrote:
> I have been following the instructions on the Solr Wiki for compiling Solr.  I started with the 6.6 source.  The only thing I did different was download the src directly.  I did not use Subversion.
> I made through step 7 - Compile application with no problems.  However, the dist folder contains newly build snapshot jars, but no war file.

As noted by Daniel on your other reply, that page is very out of date.
This is more current:

https://wiki.apache.org/solr/HowToContribute

There has been no war file in the dist directory since version 5.0.0,
and there has been no war file produced *at all* since version 5.3.0.

https://wiki.apache.org/solr/WhyNoWar

If you run "ant server", then you will get a runnable server.  Once
that's done, type "bin/solr start" or "bin\solr start" to start Solr,
depending on the operating system.

I agree with Daniel on another point:  If you aren't intending to
immediately jump into editing the source code, then you should download
the binary distribution, which is ready to run right away.

You can also run "ant package" to create your own local copy of the
binary distribution with a SNAPSHOT version number.

Thanks,
Shawn

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: [EXTERNAL] - Re: compiling Solr

Steve Pruitt
My mistake.  I guess I thought compiling and creating the dist still created a war for the client.  The build was successful and of course the webapp folder was created.  Again, my error.

I am only building Solr because I want to learn more through direct observation how things work.  Hard to glean much from the JavaDocs.

My immediate concern is debugging (from IntelliJ)  two custom search components I am working on.

Thanks.

-S

-----Original Message-----
From: Shawn Heisey [mailto:[hidden email]]
Sent: Thursday, July 13, 2017 6:06 PM
To: [hidden email]
Subject: [EXTERNAL] - Re: compiling Solr

On 7/13/2017 2:16 PM, Steve Pruitt wrote:
> I have been following the instructions on the Solr Wiki for compiling Solr.  I started with the 6.6 source.  The only thing I did different was download the src directly.  I did not use Subversion.
> I made through step 7 - Compile application with no problems.  However, the dist folder contains newly build snapshot jars, but no war file.

As noted by Daniel on your other reply, that page is very out of date.
This is more current:

https://urldefense.proofpoint.com/v2/url?u=https-3A__wiki.apache.org_solr_HowToContribute&d=DwICaQ&c=ZgVRmm3mf2P1-XDAyDsu4A&r=ksx9qnQFG3QvxkP54EBPEzv1HHDjlk-MFO-7EONGCtY&m=L4vyJ1M3fKfl6vI6BIjWsg2z9KsxHuYzSaZXy4L-T2c&s=mFpiIPugnxZvDFFlBAUNAU_a9GUhcDCRHJ1AZtj7BM8&e= 

There has been no war file in the dist directory since version 5.0.0, and there has been no war file produced *at all* since version 5.3.0.

https://urldefense.proofpoint.com/v2/url?u=https-3A__wiki.apache.org_solr_WhyNoWar&d=DwICaQ&c=ZgVRmm3mf2P1-XDAyDsu4A&r=ksx9qnQFG3QvxkP54EBPEzv1HHDjlk-MFO-7EONGCtY&m=L4vyJ1M3fKfl6vI6BIjWsg2z9KsxHuYzSaZXy4L-T2c&s=O_5sS0kbtcPtQ2oTsB0H6K0Bp0K9lq4v0BBIJgX6YxY&e= 

If you run "ant server", then you will get a runnable server.  Once that's done, type "bin/solr start" or "bin\solr start" to start Solr, depending on the operating system.

I agree with Daniel on another point:  If you aren't intending to immediately jump into editing the source code, then you should download the binary distribution, which is ready to run right away.

You can also run "ant package" to create your own local copy of the binary distribution with a SNAPSHOT version number.

Thanks,
Shawn

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [EXTERNAL] - Re: compiling Solr

Erick Erickson
Steve:

Glad to hear it. BTW, I usually just attach to the server remotely
from my IDE rather than try to get Solr to run inside IntelliJ, I know
others run it all in the IDE though. You have to create a "remote"
configuration to run, then start Solr specially (pardon me if you know
all this) like:

bin/solr start  -p 8981 -s example/techproducts/solr -a
"-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=6900"

The "suspend -y" causes Solr to just sit there until you connect and
hit go, useful for debugging loading issues.

But I wouldn't necessarily even bother attaching to a remote session.
It's often far more directed to pick one of the junit tests (or create
one of your own) and debug through _that_ with no Solr running at all.
Plus if you're making changes it's faster to change code and re-run
the test than create a runnable Solr with the changes to debug. Of
course there are reasons you'd want to attach to a remote session, but
for diving into a particular bit of code the junit method is often
what I prefer.

FWIW,
Erick

On Fri, Jul 14, 2017 at 6:11 AM, Steve Pruitt <[hidden email]> wrote:

> My mistake.  I guess I thought compiling and creating the dist still created a war for the client.  The build was successful and of course the webapp folder was created.  Again, my error.
>
> I am only building Solr because I want to learn more through direct observation how things work.  Hard to glean much from the JavaDocs.
>
> My immediate concern is debugging (from IntelliJ)  two custom search components I am working on.
>
> Thanks.
>
> -S
>
> -----Original Message-----
> From: Shawn Heisey [mailto:[hidden email]]
> Sent: Thursday, July 13, 2017 6:06 PM
> To: [hidden email]
> Subject: [EXTERNAL] - Re: compiling Solr
>
> On 7/13/2017 2:16 PM, Steve Pruitt wrote:
>> I have been following the instructions on the Solr Wiki for compiling Solr.  I started with the 6.6 source.  The only thing I did different was download the src directly.  I did not use Subversion.
>> I made through step 7 - Compile application with no problems.  However, the dist folder contains newly build snapshot jars, but no war file.
>
> As noted by Daniel on your other reply, that page is very out of date.
> This is more current:
>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__wiki.apache.org_solr_HowToContribute&d=DwICaQ&c=ZgVRmm3mf2P1-XDAyDsu4A&r=ksx9qnQFG3QvxkP54EBPEzv1HHDjlk-MFO-7EONGCtY&m=L4vyJ1M3fKfl6vI6BIjWsg2z9KsxHuYzSaZXy4L-T2c&s=mFpiIPugnxZvDFFlBAUNAU_a9GUhcDCRHJ1AZtj7BM8&e=
>
> There has been no war file in the dist directory since version 5.0.0, and there has been no war file produced *at all* since version 5.3.0.
>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__wiki.apache.org_solr_WhyNoWar&d=DwICaQ&c=ZgVRmm3mf2P1-XDAyDsu4A&r=ksx9qnQFG3QvxkP54EBPEzv1HHDjlk-MFO-7EONGCtY&m=L4vyJ1M3fKfl6vI6BIjWsg2z9KsxHuYzSaZXy4L-T2c&s=O_5sS0kbtcPtQ2oTsB0H6K0Bp0K9lq4v0BBIJgX6YxY&e=
>
> If you run "ant server", then you will get a runnable server.  Once that's done, type "bin/solr start" or "bin\solr start" to start Solr, depending on the operating system.
>
> I agree with Daniel on another point:  If you aren't intending to immediately jump into editing the source code, then you should download the binary distribution, which is ready to run right away.
>
> You can also run "ant package" to create your own local copy of the binary distribution with a SNAPSHOT version number.
>
> Thanks,
> Shawn
>
Loading...