Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3
    • Fix Version/s: 3.1, 4.0-ALPHA
    • Component/s: None
    • Labels:
      None

      Description

      It would be convenient to have a <packaging>war</packaging> maven project for the webapp, to allow launching solr from maven via jetty.

        Issue Links

          Activity

          Hide
          Grant Ingersoll added a comment -

          Bulk close for 3.1.0 release

          Show
          Grant Ingersoll added a comment - Bulk close for 3.1.0 release
          Hide
          Steve Rowe added a comment -

          Maven artifact for Solr webapp is now generated (fixed in LUCENE-2657).

          Show
          Steve Rowe added a comment - Maven artifact for Solr webapp is now generated (fixed in LUCENE-2657 ).
          Hide
          Steve Rowe added a comment -

          The latest patch on LUCENE-2657 includes a Solr war, as well as a maven-jetty-plugin configuration. Please give it a try and report back on that issue.

          Show
          Steve Rowe added a comment - The latest patch on LUCENE-2657 includes a Solr war, as well as a maven-jetty-plugin configuration. Please give it a try and report back on that issue.
          Hide
          Stevo Slavic added a comment -

          Voted for the issue too.

          As a temporary workaround, to reference solr.war but still keep solr config files in IDE under version control, I use following config:

          pom.xml
          ...
          <plugin>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jetty-maven-plugin</artifactId>
            <configuration>
              <stopPort>${jetty.stop.port}</stopPort>
              <stopKey>foo</stopKey>
              <webApp>${env.SOLR_HOME}/example/webapps/solr.war</webApp>
              <tempDirectory>${project.build.directory}/jetty-tmp</tempDirectory>
              <systemProperties>
                <systemProperty>
                  <name>solr.solr.home</name>
                  <value>${basedir}/src/main/solr/home</value>
                </systemProperty>
                <systemProperty>
                  <name>solr.data.dir</name>
                  <value>${project.build.directory}/solr/data</value>
                </systemProperty>
                <systemProperty>
                  <name>solr_home</name>
                  <value>${env.SOLR_HOME}</value>
                </systemProperty>
              </systemProperties>
            </configuration>
            <executions>
              <execution>
                <id>start-jetty</id>
                <phase>pre-integration-test</phase>
                <goals>
                  <goal>deploy-war</goal>
                </goals>
                <configuration>
                  <daemon>true</daemon>
                  <webAppConfig>
                    <contextPath>/solr</contextPath>
                    <tempDirectory>${project.build.directory}/jetty-tmp</tempDirectory>
                  </webAppConfig>
                  <connectors>
                    <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
                      <port>${jetty.http.port}</port>
                    </connector>
                  </connectors>
                </configuration>
              </execution>
              <execution>
                <id>stop-jetty</id>
                <phase>post-integration-test</phase>
                <goals>
                  <goal>stop</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          ...
          

          And update the SOLR_HOME environment variable with move to new Solr installation/version. This is easy for development environment, not for CI (Hudson). That's why solr.war on public repo would be handy.

          Show
          Stevo Slavic added a comment - Voted for the issue too. As a temporary workaround, to reference solr.war but still keep solr config files in IDE under version control, I use following config: pom.xml ... <plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <configuration> <stopPort>${jetty.stop.port}</stopPort> <stopKey>foo</stopKey> <webApp>${env.SOLR_HOME}/example/webapps/solr.war</webApp> <tempDirectory>${project.build.directory}/jetty-tmp</tempDirectory> <systemProperties> <systemProperty> <name>solr.solr.home</name> <value>${basedir}/src/main/solr/home</value> </systemProperty> <systemProperty> <name>solr.data.dir</name> <value>${project.build.directory}/solr/data</value> </systemProperty> <systemProperty> <name>solr_home</name> <value>${env.SOLR_HOME}</value> </systemProperty> </systemProperties> </configuration> <executions> <execution> <id>start-jetty</id> <phase>pre-integration-test</phase> <goals> <goal>deploy-war</goal> </goals> <configuration> <daemon> true </daemon> <webAppConfig> <contextPath>/solr</contextPath> <tempDirectory>${project.build.directory}/jetty-tmp</tempDirectory> </webAppConfig> <connectors> <connector implementation= "org.eclipse.jetty.server.nio.SelectChannelConnector" > <port>${jetty.http.port}</port> </connector> </connectors> </configuration> </execution> <execution> <id>stop-jetty</id> <phase>post-integration-test</phase> <goals> <goal>stop</goal> </goals> </execution> </executions> </plugin> ... And update the SOLR_HOME environment variable with move to new Solr installation/version. This is easy for development environment, not for CI (Hudson). That's why solr.war on public repo would be handy.
          Hide
          Kjetil Ødegaard added a comment -

          With the Solr WAR in the Maven repo, people would be able to easily build their own customized WARs with Maven WAR overlays. All you need to do is set a dependency to the Solr WAR from the web project with compile scope, and Maven handles the rest for you.

          We've put the Solr WAR in our local repo and use this for our custom Solr deploy. If it were in central, things would be even easier.

          Show
          Kjetil Ødegaard added a comment - With the Solr WAR in the Maven repo, people would be able to easily build their own customized WARs with Maven WAR overlays. All you need to do is set a dependency to the Solr WAR from the web project with compile scope, and Maven handles the rest for you. We've put the Solr WAR in our local repo and use this for our custom Solr deploy. If it were in central, things would be even easier.
          Hide
          Tracy Flynn added a comment -

          A large thanks to Mark for the Maven work.

          I was able to take his structure and adapt it to my needs in a few hours this morning. I now have a clean, Mavenized 1.4.1 build structure that tidy, modular and intuitive.

          If I can figure out a good place post a 'public' version of this project, I'll post it there.

          Show
          Tracy Flynn added a comment - A large thanks to Mark for the Maven work. I was able to take his structure and adapt it to my needs in a few hours this morning. I now have a clean, Mavenized 1.4.1 build structure that tidy, modular and intuitive. If I can figure out a good place post a 'public' version of this project, I'll post it there.
          Hide
          Mark Diggory added a comment -

          I've set about doing my own Maven war pom and distribution for this purpose.

          http://scm.dspace.org/svn/repo/modules/dspace-solr/trunk

          and

          http://repo2.maven.org/maven2/org/dspace/dspace-solr/1.3.0.2/

          I'm working on one for 1.4.0 (I release some minor maintenance builds between releases)

          I've also considered producing a different release process for the maven projects that would be maintained separately from the current build process it would checkout appropriate source trees of solr to construct the release at mvn package time.

          I've seen some comments about the Maven build and release processes being unwieldy, but I have to disagree.

          Mark

          Show
          Mark Diggory added a comment - I've set about doing my own Maven war pom and distribution for this purpose. http://scm.dspace.org/svn/repo/modules/dspace-solr/trunk and http://repo2.maven.org/maven2/org/dspace/dspace-solr/1.3.0.2/ I'm working on one for 1.4.0 (I release some minor maintenance builds between releases) I've also considered producing a different release process for the maven projects that would be maintained separately from the current build process it would checkout appropriate source trees of solr to construct the release at mvn package time. I've seen some comments about the Maven build and release processes being unwieldy, but I have to disagree. Mark
          Hide
          Martin Petrovsky added a comment -

          I agree. This would be very handy and is in fact I found this issue while googling to see if there was a packaged war file

          Show
          Martin Petrovsky added a comment - I agree. This would be very handy and is in fact I found this issue while googling to see if there was a packaged war file

            People

            • Assignee:
              Steve Rowe
              Reporter:
              Benson Margulies
            • Votes:
              9 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development