Skip to content

Commit

Permalink
Add gradle-relevant readme sections.
Browse files Browse the repository at this point in the history
  • Loading branch information
dweiss committed Jan 9, 2020
1 parent 0674fad commit 39ad06a
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ comprehensive documentation, visit:

(You do not need to do this if you downloaded a pre-built package)

### Building with Ant

Lucene and Solr are built using [Apache Ant](http://ant.apache.org/). To build
Lucene and Solr, run:

Expand All @@ -58,6 +60,29 @@ following command from the `solr/` directory:

`ant server`

### Building with Gradle

There is ongoing work (see [LUCENE-9077](https://issues.apache.org/jira/browse/LUCENE-9077))
to switch the legacy ant-based build system to [gradle](https://gradle.org/).
Please give it a try!

At the moment of writing, the gradle build requires precisely Java 11
(it may or may not work with newer Java versions).

To build Lucene and Solr, run (`./` can be omitted on Windows):

`./gradlew assemble`

The command above also packages a full distribution of Solr server; the
package can be located at:

`solr/packaging/build/solr-*`

Note that the gradle build does not create or copy binaries throughout the
source repository (like ant build does) so you need to switch to the
packaging output folder above; the rest of the instructions below remain
identical.

## Running Solr

After [building Solr](#building-lucene-solr), the server can be started using
Expand Down Expand Up @@ -89,6 +114,12 @@ import Lucene/Solr.
- *IntelliJ* - `ant idea` (See [this](https://cwiki.apache.org/confluence/display/lucene/HowtoConfigureIntelliJ) for details)
- *Netbeans* - `ant netbeans` (See [this](https://cwiki.apache.org/confluence/display/lucene/HowtoConfigureNetbeans) for details)

### Gradle build and IDE support

- *IntelliJ* - IntelliJ idea can import the project out of the box.
Code formatting conventions should be manually adjusted.
- *Eclipse* - Not tested.
- *Netbeans* - Not tested.

## Running Tests

Expand All @@ -101,6 +132,13 @@ ways. For an exhaustive discussion of the options available, run:

`ant test-help`

### Gradle build and tests

Run the following command to display an extensive help for running
tests with gradle:

`./gradlew helpTests`

## Contributing

Please review the [Contributing to Solr
Expand Down

0 comments on commit 39ad06a

Please sign in to comment.