| ==================================== |
| Lucene/Solr Maven build instructions |
| ==================================== |
| |
| Contents: |
| |
| A. How to use nightly Jenkins-built Lucene/Solr Maven artifacts |
| B. How to generate Maven artifacts |
| C. How to deploy Maven artifacts to a repository |
| |
| ----- |
| |
| A. How to use nightly Jenkins-built Lucene/Solr Maven artifacts |
| |
| The most recently produced nightly Jenkins-built Lucene and Solr Maven |
| snapshot artifacts are available in the Apache Snapshot repository here: |
| |
| https://repository.apache.org/snapshots |
| |
| An example POM snippet: |
| |
| <project ...> |
| ... |
| <repositories> |
| ... |
| <repository> |
| <id>apache.snapshots</id> |
| <name>Apache Snapshot Repository</name> |
| <url>https://repository.apache.org/snapshots</url> |
| <releases> |
| <enabled>false</enabled> |
| </releases> |
| </repository> |
| |
| |
| B. How to generate Lucene/Solr Maven artifacts |
| |
| Prerequisites: JDK 1.8+ and Ant 1.8.2+ |
| |
| Run 'ant generate-maven-artifacts' to create an internal Maven |
| repository, including POMs, binary .jars, source .jars, and javadoc |
| .jars. |
| |
| You can run the above command in three possible places: the top-level |
| directory; under lucene/; or under solr/. From the top-level directory |
| or from lucene/, the internal repository will be located at dist/maven/. |
| From solr/, the internal repository will be located at package/maven/. |
| |
| |
| C. How to deploy Maven artifacts to a repository |
| |
| Prerequisites: JDK 1.8+ and Ant 1.8.2+ |
| |
| You can deploy targets for all of Lucene/Solr, only Lucene, or only Solr, |
| as in B. above. To deploy to a Maven repository, the command is the same |
| as in B. above, with the addition of two system properties: |
| |
| ant -Dm2.repository.id=my-repo-id \ |
| -Dm2.repository.url=https://example.org/my/repo \ |
| generate-maven-artifacts |
| |
| The repository ID given in the above command corresponds to a <server> |
| entry in either your ~/.m2/settings.xml or ~/.ant/settings.xml. See |
| <https://maven.apache.org/settings.html#Servers> for more information. |
| (Note that as of version 2.1.3, Maven Ant Tasks cannot handle encrypted |
| passwords.) |