You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org> on 2008/08/13 10:50:44 UTC

[jira] Issue Comment Edited: (SOLR-586) Maven - Solr Artifact Publishing

    [ https://issues.apache.org/jira/browse/SOLR-586?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12621920#action_12621920 ] 

shalinmangar edited comment on SOLR-586 at 8/13/08 1:49 AM:
---------------------------------------------------------------------

*Changes*

* Reverted back to org.apache.lucene.solr as the group name due to Maven central repository's restriction on having groupId same as the controlled domain name.
* Added target dist-src which packages source code for each artifact
* Added target dist-javadoc which packages javadoc for each artifact
* Renamed the main solr jar to apache-solr-server-${version}.jar for consistency with other jars
* generate-maven-artifact target also adds source and javadocs for each artifact

If we want to publish nightly maven snapshots, we must execute the following on hudson:
{{{ant clean generate-maven-artifacts nightly}}}

It will be OK to put a dependency on generate-maven-artifacts in the nightly target. Ofcourse, first we need to setup a build.property file on hudson which gives the URL to maven repo, username and private key. Someone who is familar with how Lucene did this and has karma on hudson will need to take this up now. 

When the artifacts are published, the following should be added to your pom.xml to use solrj
{code:xml}
<dependency>
  <groupId>org.apache.lucene.solr</groupId>
  <artifactId>solr-solrj</artifactId>
  <version>1.3-SNAPSHOT</version>
</dependency>
{code}
To use the EmbeddedSolrServer, a dependency to solr-server must also be added:
{code:xml}
<dependency>
  <groupId>org.apache.lucene.solr</groupId>
  <artifactId>solr-server</artifactId>
  <version>1.3-SNAPSHOT</version>
</dependency>
{code}

I've not added a dependency on solr-server for SolrJ because it is only needed for EmbeddedSolrServer but not if you only use CommonsHttpSolrServer.

This is ready to be committed now.

      was (Author: shalinmangar):
    *Changes*

* Reverted back to org.apache.lucene.solr as the group name due to Maven central repository's restriction on having groupId same as the controlled domain name.
* Added target dist-src which packages source code for each artifact
* Added target dist-javadoc which packages javadoc for each artifact
* Renamed the main solr jar to apache-solr-server-${version}.jar for consistency with other jars
* generate-maven-artifact target also adds source and javadocs for each artifact

If we want to publish nightly maven snapshots, we must execute the following on hudson:
{{{ant clean generate-maven-artifacts nightly}}}

It will be OK to put a dependency on generate-maven-artifacts in the nightly target. Ofcourse, first we need to setup a build.property file on hudson which gives the URL to maven repo, username and private key. Someone who is familar with how Lucene did this and has karma on hudson will need to take this up now. 

When the artifacts are published, the following should be added to your pom.xml to use solrj
{code:xml}
<dependency>
  <groupId>org.apache.lucene.solr</groupId>
  <artifactId>solr-solrj</artifactId>
  <version>1.3-SNAPSHOT</version>
</dependency>
<dependency>
  <groupId>org.apache.lucene.solr</groupId>
  <artifactId>solr-common</artifactId>
  <version>1.3-SNAPSHOT</version>
</dependency>
{code}
To use the EmbeddedSolrServer, a dependency to solr-server must also be added:
{code:xml}
<dependency>
  <groupId>org.apache.lucene.solr</groupId>
  <artifactId>solr-server</artifactId>
  <version>1.3-SNAPSHOT</version>
</dependency>
{code}

I've not added a dependency on solr-server for SolrJ because it is only needed for EmbeddedSolrServer but not if you only use CommonsHttpSolrServer.

This is ready to be committed now.
  
> Maven - Solr Artifact Publishing
> --------------------------------
>
>                 Key: SOLR-586
>                 URL: https://issues.apache.org/jira/browse/SOLR-586
>             Project: Solr
>          Issue Type: New Feature
>          Components: clients - java, contrib - DataImportHandler
>    Affects Versions: 1.3
>            Reporter: Spencer Crissman
>            Assignee: Shalin Shekhar Mangar
>            Priority: Minor
>             Fix For: 1.3
>
>         Attachments: SOLR-586-20080811-craigmcc.zip, SOLR-586.patch, SOLR-586.patch, SOLR-586.patch, solr-common.pom.xml, solr-dih.pom.xml, solr-server.pom.xml, solr2mvn.sh, solrj.pom.xml
>
>
> I know there is an issue open (SOLR-19) for getting a solr build going under Maven.  This issue differs from that in that it does not concern the build process of the solr project, but rather simple dependency management for maven projects that depend on the solr artifacts.  I've outlined a way to easily incorporate solrj + dependencies into your own maven projects, in hopes that others doing this find it useful.  
> This issue's purpose is twofold:
> 1) Let others know the process.
> 2) Open the idea of whether this can be streamlined/incorporated into the standard build in some manner.
> Depending on Solrj in a Maven Project
> 1) Build a 1.3 snapshot.
>   1.1) Check out the code from http://svn.apache.org/repos/asf/lucene/solr/
>   1.2) Build using "ant dist" 
> 2) Install the artifacts into your maven repo, using the included pom files.
>   2.1) Move to your dist/apache-solr-1.3-dev/dist directory.
>   2.2) Copy the attached pom files into this directory.
>   2.3) Install solr-common into your repo.
>     ex) mvn install:install-file -Dfile=apache-solr-common-1.3-dev.jar -DpomFile=solr-common.pom.xml
>   2.4) Install solrj into your repo.
>     ex) mvn install:install-file -Dfile=apache-solr-solrj-1.3-dev.jar -DpomFile=solrj.pom.xml
> 3) Use Solrj in your existing Maven projects by including it as a dependency in your own pom.xml
>         <dependency>
>             <groupId>org.apache.lucene.solr</groupId>
>             <artifactId>solrj</artifactId>
>             <version>1.3-SNAPSHOT</version>
>         </dependency>
>         
> So given the above process, it seems like it would be relatively simple to standardize this process by:
> 1) Including the solr-common and solrj pom files w/ the dist.  
> 2) Automating the periodic installation of the artifacts to a central repo, such as the ibiblio repo.  
> If those steps were performed, then creating a (maven) project based on solrj would be super simple: just #3 from above.  Since most custom developments are probably for the clients, it seems like simplifying this would be a nice step to take. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.