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 Lance Norskog <go...@gmail.com> on 2012/03/25 00:56:05 UTC

"ant test" and contribs

What do I need to add so that a contrib/project/src/test/ directory
can find the classes in contrib/project/src/java? I've gotten the ant
files to where 'ant test-contrib' works. But 'ant test' fails: it
cannot compile the test classes after building the jars for
contrib/project. Any hints?

-- 
Lance Norskog
goksron@gmail.com

RE: "ant test" and contribs

Posted by Steven A Rowe <sa...@syr.edu>.
Check out solr/contrib/analysis-extras/build.xml

-----Original Message-----
From: Lance Norskog [mailto:goksron@gmail.com] 
Sent: Monday, March 26, 2012 2:14 AM
To: solr-user@lucene.apache.org
Subject: Re: "ant test" and contribs

Ah! It is more complex. There is code and a library jar in lucene/contrib/module and a solr module that uses it in solr/contrib/module. I had to copy the library from lucene/contrib/module/jar to lucene/contrib/module/jar or else the solr contrib part would not compile.

There does not seem to be any contrib that does this. There are lucene/contrib parts that export jars. But there is no solr/contrib that needs one of those jars, is there?

On Sat, Mar 24, 2012 at 5:05 PM, Steven A Rowe <sa...@syr.edu> wrote:
> Hi Lance,
>
> Are you adding a new solr/contrib/project/?  If so, why not use the build.xml file from a sibling project?  E.g. try starting from solr/contrib/velocity/build.xml - it is very simple and enables all build steps by importing solr/contrib/contrib-build.xml.
>
> solr/contrib/contrib-build.xml imports solr/common-build.xml; 
> solr/common-build.xml imports lucene/contrib/contrib-build.xml; and 
> lucene/contrib/contrib-build.xml imports lucene/common-build.xml.
>
> Simple!
>
> Steve
>
> -----Original Message-----
> From: Lance Norskog [mailto:goksron@gmail.com]
> Sent: Saturday, March 24, 2012 7:56 PM
> To: solr-user
> Subject: "ant test" and contribs
>
> What do I need to add so that a contrib/project/src/test/ directory can find the classes in contrib/project/src/java? I've gotten the ant files to where 'ant test-contrib' works. But 'ant test' fails: it cannot compile the test classes after building the jars for contrib/project. Any hints?
>
> --
> Lance Norskog
> goksron@gmail.com



--
Lance Norskog
goksron@gmail.com

Re: "ant test" and contribs

Posted by Lance Norskog <go...@gmail.com>.
Ah! It is more complex. There is code and a library jar in
lucene/contrib/module and a solr module that uses it in
solr/contrib/module. I had to copy the library from
lucene/contrib/module/jar to lucene/contrib/module/jar or else the
solr contrib part would not compile.

There does not seem to be any contrib that does this. There are
lucene/contrib parts that export jars. But there is no solr/contrib
that needs one of those jars, is there?

On Sat, Mar 24, 2012 at 5:05 PM, Steven A Rowe <sa...@syr.edu> wrote:
> Hi Lance,
>
> Are you adding a new solr/contrib/project/?  If so, why not use the build.xml file from a sibling project?  E.g. try starting from solr/contrib/velocity/build.xml - it is very simple and enables all build steps by importing solr/contrib/contrib-build.xml.
>
> solr/contrib/contrib-build.xml imports solr/common-build.xml;
> solr/common-build.xml imports lucene/contrib/contrib-build.xml;
> and lucene/contrib/contrib-build.xml imports lucene/common-build.xml.
>
> Simple!
>
> Steve
>
> -----Original Message-----
> From: Lance Norskog [mailto:goksron@gmail.com]
> Sent: Saturday, March 24, 2012 7:56 PM
> To: solr-user
> Subject: "ant test" and contribs
>
> What do I need to add so that a contrib/project/src/test/ directory can find the classes in contrib/project/src/java? I've gotten the ant files to where 'ant test-contrib' works. But 'ant test' fails: it cannot compile the test classes after building the jars for contrib/project. Any hints?
>
> --
> Lance Norskog
> goksron@gmail.com



-- 
Lance Norskog
goksron@gmail.com

RE: "ant test" and contribs

Posted by Steven A Rowe <sa...@syr.edu>.
Hi Lance,

Are you adding a new solr/contrib/project/?  If so, why not use the build.xml file from a sibling project?  E.g. try starting from solr/contrib/velocity/build.xml - it is very simple and enables all build steps by importing solr/contrib/contrib-build.xml.

solr/contrib/contrib-build.xml imports solr/common-build.xml;
solr/common-build.xml imports lucene/contrib/contrib-build.xml;
and lucene/contrib/contrib-build.xml imports lucene/common-build.xml.

Simple!

Steve

-----Original Message-----
From: Lance Norskog [mailto:goksron@gmail.com] 
Sent: Saturday, March 24, 2012 7:56 PM
To: solr-user
Subject: "ant test" and contribs

What do I need to add so that a contrib/project/src/test/ directory can find the classes in contrib/project/src/java? I've gotten the ant files to where 'ant test-contrib' works. But 'ant test' fails: it cannot compile the test classes after building the jars for contrib/project. Any hints?

--
Lance Norskog
goksron@gmail.com