You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by David Pratt <fa...@eastlink.ca> on 2008/01/26 17:01:19 UTC

Building Solr with Maven 2 - Solr-19

Hi I am trying to build solr from solr-19 poms from the issue tracker.

I've tried both of the most recent poms but pehaps it is my inexperience 
with maven that may be the issue. I have been reading up on maven but 
perhaps I am missing something.

For the combined pom.xml (Jan 9 2008, Ryan McKinley) I placed it in the 
source directory and ran:

mvn clean install

The build failed indicating issues with the following files with 
serveral line numbes in the following files. I've only cut and pasted 
the first line of each

src/java/org/apache/solr/handler/component/ShardRequest.java:[60,0] 
'class' or 'interface' expected
src/java/src/test/org/apache/solr/TestDistributedSearch.java:[129,0] 
'class' or 'interface' expected
src/java/src/java/org/apache/solr/handler/component/ShardDoc.java:[273,0] 
'class' or 'interface' expected

the trace running mvn -e is below. In any case, this was unsuccessful.

For the pom that does the builds with solr in separate packages 
(solr-test-maven.zip, Dec 27 2007, Ryan McKinley) I unzipped the folders 
and the two poms to the source directory and ran

mvn clean install
mvn jetty:run

It build successfully - see result below. Problem was how to run it. mvn 
jetty:run did not launch the server. Am i missing a step? Any hints 
would be helpful.

Many thanks.

Regards,
David




Build using combined pom.xml:

[INFO] 
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.BuildFailureException: Compilation failure
         at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:560)
         at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
         at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
         at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
         at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
         at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
         at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at 
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
         at 
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.CompilationFailureException: 
Compilation failure
         at 
org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:516)
         at 
org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114)
         at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:447)
         at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
         ... 16 more
[INFO] 
------------------------------------------------------------------------
[INFO] Total time: 23 seconds
[INFO] Finished at: Sat Jan 26 02:00:52 AST 2008
[INFO] Final Memory: 6M/21M
[INFO] 
------------------------------------------------------------------------

Build using solr-test-maven.zip:

/Users/davidpratt/.m2/repository/org/apache/lucene/solr/solr-server/1.3-SNAPSHOT/solr-server-1.3-SNAPSHOT-tests.jar
[INFO]
[INFO]
[INFO] 
------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
------------------------------------------------------------------------
[INFO] Solr Parent ........................................... SUCCESS 
[31.160s]
[INFO] Solr Common ........................................... SUCCESS 
[15.464s]
[INFO] Solr Client ........................................... SUCCESS 
[7.087s]
[INFO] Solr Core ............................................. SUCCESS 
[9.945s]
[INFO] Solr Server ........................................... SUCCESS 
[5.514s]
[INFO] 
------------------------------------------------------------------------
[INFO] 
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] 
------------------------------------------------------------------------
[INFO] Total time: 1 minute 15 seconds
[INFO] Finished at: Sat Jan 26 10:38:32 AST 2008
[INFO] Final Memory: 12M/25M
[INFO] 
------------------------------------------------------------------------

Re: Building Solr with Maven 2 - Solr-19

Posted by Ryan McKinley <ry...@gmail.com>.
run:  ant example

or it come pre packaged in a nightly build


David Pratt wrote:
> Hi Ryan. Thanks for your reply. I don't see anywhere that we have 
> created a war for the example app to use. Jetty will run but it does not 
> have an app to run.
> 
> Regards,
> David
> 
> Ryan McKinley wrote:
>> aaah -- mvn jetty:run does not work with that pom
>>
>> you can run the example server from the example directory using "java 
>> -jar start.jar"
>>
>> check:
>> http://lucene.apache.org/solr/tutorial.html
>>
>> ryan
>>
>>
>> David Pratt wrote:
>>> Hey Ryan. You were right about SOLR-303. I checked out trunk from 
>>> svn, patched source, ran the pom and manually ran the commons pom and 
>>> it all built fine. Only trouble is I am not providing the right 
>>> incantation for maven to start the server. This I am sure will all 
>>> seem very simple once I have got this working at least the first time 
>>> but I need a hint :-) Many thanks.
>>>
>>> Regards,
>>> David
>>>
>>>
>>> Ryan McKinley wrote:
>>>> I just posted the pom.xml I am using with the current trunk code.  
>>>> Give that a go.
>>>>
>>>>
>>>>> src/java/org/apache/solr/handler/component/ShardRequest.java:[60,0] 
>>>>> 'class' or 'interface' expected
>>>>> src/java/src/test/org/apache/solr/TestDistributedSearch.java:[129,0] 
>>>>> 'class' or 'interface' expected
>>>>> src/java/src/java/org/apache/solr/handler/component/ShardDoc.java:[273,0] 
>>>>> 'class' or 'interface' expected
>>>>
>>>> This is not in trunk yet -- my guess is you are applying a SOLR-303 
>>>> patch that is not in sync.
>>>>
>>>> make sure 'ant' works before trying to debug maven  (for now)
>>>>
>>>> ryan
>>>>
>>>
>>
> 


Re: Building Solr with Maven 2 - Solr-19

Posted by David Pratt <fa...@eastlink.ca>.
Hi Ryan. Thanks for your reply. I don't see anywhere that we have 
created a war for the example app to use. Jetty will run but it does not 
have an app to run.

Regards,
David

Ryan McKinley wrote:
> aaah -- mvn jetty:run does not work with that pom
> 
> you can run the example server from the example directory using "java 
> -jar start.jar"
> 
> check:
> http://lucene.apache.org/solr/tutorial.html
> 
> ryan
> 
> 
> David Pratt wrote:
>> Hey Ryan. You were right about SOLR-303. I checked out trunk from svn, 
>> patched source, ran the pom and manually ran the commons pom and it 
>> all built fine. Only trouble is I am not providing the right 
>> incantation for maven to start the server. This I am sure will all 
>> seem very simple once I have got this working at least the first time 
>> but I need a hint :-) Many thanks.
>>
>> Regards,
>> David
>>
>>
>> Ryan McKinley wrote:
>>> I just posted the pom.xml I am using with the current trunk code.  
>>> Give that a go.
>>>
>>>
>>>> src/java/org/apache/solr/handler/component/ShardRequest.java:[60,0] 
>>>> 'class' or 'interface' expected
>>>> src/java/src/test/org/apache/solr/TestDistributedSearch.java:[129,0] 
>>>> 'class' or 'interface' expected
>>>> src/java/src/java/org/apache/solr/handler/component/ShardDoc.java:[273,0] 
>>>> 'class' or 'interface' expected
>>>
>>> This is not in trunk yet -- my guess is you are applying a SOLR-303 
>>> patch that is not in sync.
>>>
>>> make sure 'ant' works before trying to debug maven  (for now)
>>>
>>> ryan
>>>
>>
> 

Re: Building Solr with Maven 2 - Solr-19

Posted by Ryan McKinley <ry...@gmail.com>.
aaah -- mvn jetty:run does not work with that pom

you can run the example server from the example directory using "java 
-jar start.jar"

check:
http://lucene.apache.org/solr/tutorial.html

ryan


David Pratt wrote:
> Hey Ryan. You were right about SOLR-303. I checked out trunk from svn, 
> patched source, ran the pom and manually ran the commons pom and it all 
> built fine. Only trouble is I am not providing the right incantation for 
> maven to start the server. This I am sure will all seem very simple once 
> I have got this working at least the first time but I need a hint :-) 
> Many thanks.
> 
> Regards,
> David
> 
> 
> Ryan McKinley wrote:
>> I just posted the pom.xml I am using with the current trunk code.  
>> Give that a go.
>>
>>
>>> src/java/org/apache/solr/handler/component/ShardRequest.java:[60,0] 
>>> 'class' or 'interface' expected
>>> src/java/src/test/org/apache/solr/TestDistributedSearch.java:[129,0] 
>>> 'class' or 'interface' expected
>>> src/java/src/java/org/apache/solr/handler/component/ShardDoc.java:[273,0] 
>>> 'class' or 'interface' expected
>>
>> This is not in trunk yet -- my guess is you are applying a SOLR-303 
>> patch that is not in sync.
>>
>> make sure 'ant' works before trying to debug maven  (for now)
>>
>> ryan
>>
> 


Re: Building Solr with Maven 2 - Solr-19

Posted by David Pratt <fa...@eastlink.ca>.
Hey Ryan. You were right about SOLR-303. I checked out trunk from svn, 
patched source, ran the pom and manually ran the commons pom and it all 
built fine. Only trouble is I am not providing the right incantation for 
maven to start the server. This I am sure will all seem very simple once 
I have got this working at least the first time but I need a hint :-) 
Many thanks.

Regards,
David


Ryan McKinley wrote:
> I just posted the pom.xml I am using with the current trunk code.  Give 
> that a go.
> 
> 
>> src/java/org/apache/solr/handler/component/ShardRequest.java:[60,0] 
>> 'class' or 'interface' expected
>> src/java/src/test/org/apache/solr/TestDistributedSearch.java:[129,0] 
>> 'class' or 'interface' expected
>> src/java/src/java/org/apache/solr/handler/component/ShardDoc.java:[273,0] 
>> 'class' or 'interface' expected
> 
> This is not in trunk yet -- my guess is you are applying a SOLR-303 
> patch that is not in sync.
> 
> make sure 'ant' works before trying to debug maven  (for now)
> 
> ryan
> 

Re: Building Solr with Maven 2 - Solr-19

Posted by Ryan McKinley <ry...@gmail.com>.
I just posted the pom.xml I am using with the current trunk code.  Give 
that a go.


> src/java/org/apache/solr/handler/component/ShardRequest.java:[60,0] 
> 'class' or 'interface' expected
> src/java/src/test/org/apache/solr/TestDistributedSearch.java:[129,0] 
> 'class' or 'interface' expected
> src/java/src/java/org/apache/solr/handler/component/ShardDoc.java:[273,0] 
> 'class' or 'interface' expected

This is not in trunk yet -- my guess is you are applying a SOLR-303 
patch that is not in sync.

make sure 'ant' works before trying to debug maven  (for now)

ryan