diff --git a/README.md b/README.md index 910d04a..5cd85ce 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Solr Sail -Solr Search fresh from the can +From zero to search in the flash of a gem. ## Install diff --git a/Rakefile b/Rakefile index 38652b5..57e1d93 100644 --- a/Rakefile +++ b/Rakefile @@ -49,7 +49,7 @@ namespace :solr_sail do FileUtils.copy( 'VERSION', "target/gem/VERSION" ) version = IO.read('VERSION').strip - FileUtils.copy( "target/solrsail-#{version}.jar", "target/gem/solrsail-#{version}.jar" ) + FileUtils.copy( "target/solr_sail-#{version}.jar", "target/gem/solr_sail-#{version}.jar" ) # Change dir so relevant files have the correct paths Dir.chdir( "target/gem" ) @@ -86,8 +86,8 @@ Jeweler::Tasks.new do |gem| gem.platform = "java" gem.homepage = "http://github.com/mguymon/solr_sail" gem.license = "MIT" - gem.summary = %Q{Solr Server for JRuby} - gem.description = %Q{Solr Server for JRuby} + gem.summary = %Q{From zero to search in the flash of a gem.} + gem.description = %Q{From zero to search in the flash of a gem.} gem.email = "michael@tobedevoured.com" gem.authors = ["Michael Guymon"] gem.require_paths = %w[lib] diff --git a/pom.xml b/pom.xml index a7b5359..ed04219 100644 --- a/pom.xml +++ b/pom.xml @@ -3,12 +3,41 @@ 4.0.0 com.tobedevoured - solrsail + solr_sail 0.0.1 jar Solr Sail https://github.com/mguymon/solr_sail + + Solr Search fresh from the can + + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + scm:git:git@github.com/mguymon/by_your_command.git + scm:git:git@github.com/mguymon/by_your_command.git + git@github.com/mguymon/by_your_command.git + + + + mguymon + Michael Guymon + michael@tobedevoured.com + + + + + nexus-releases + Nexus Release Repository + http://oss.sonatype.org/service/local/staging/deploy/maven2/ + + @@ -27,7 +56,7 @@ com.tobedevoured.command core - 0.0.1-SNAPSHOT + 0.0.1 @@ -83,6 +112,8 @@ 1.0.6 + + junit @@ -91,66 +122,55 @@ test - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-dependencies - package - - copy-dependencies - - - ${project.build.directory}/lib - false - false - true - - - - - - org.apache.maven.plugins - maven-source-plugin - - - attach-sources - - jar - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - - - attach-javadocs - - jar - - - - - - org.apache.maven.plugins - maven-gpg-plugin - - - sign-artifacts - verify - - sign - - - - - - + + + + + + + org.apache.maven.plugins + maven-source-plugin + + + attach-sources + + jar + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-gpg-plugin + + + sign-artifacts + verify + + sign + + + + + + diff --git a/src/main/java/com/tobedevoured/solrsail/JettyServer.java b/src/main/java/com/tobedevoured/solrsail/JettyServer.java index 95eeaf7..8c5a173 100644 --- a/src/main/java/com/tobedevoured/solrsail/JettyServer.java +++ b/src/main/java/com/tobedevoured/solrsail/JettyServer.java @@ -19,6 +19,7 @@ /** * Jetty Server * + * @author Michael Guymon */ @ByYourCommand public class JettyServer { @@ -28,6 +29,9 @@ public class JettyServer { private String contextPath; private int port; + /** + * Create new instance + */ public JettyServer() { Config config = ConfigFactory.load(); solrHome = config.getString("solrsail.solr.home"); @@ -35,6 +39,11 @@ public JettyServer() { contextPath = config.getString("solrsail.solr.contextpath"); } + /** + * Start Jetty + * + * @throws Exception + */ @Command public void start() throws Exception { diff --git a/src/main/java/com/tobedevoured/solrsail/SolrConfig.java b/src/main/java/com/tobedevoured/solrsail/SolrConfig.java index 5e3b0a0..89dc3b8 100644 --- a/src/main/java/com/tobedevoured/solrsail/SolrConfig.java +++ b/src/main/java/com/tobedevoured/solrsail/SolrConfig.java @@ -26,16 +26,30 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; +/** + * Solr Config Helper + * + * @author Michael Guymon + * + */ @ByYourCommand public class SolrConfig { private static Logger logger = LoggerFactory.getLogger( SolrConfig.class ); private String solrHome; + /** + * Create new instance + */ public SolrConfig() { loadDefaultConfig(); } + /** + * Create new instance + * + * @param solrHome String path + */ public SolrConfig( String solrHome ) { if ( solrHome != null ) { this.solrHome = solrHome; @@ -44,6 +58,9 @@ public SolrConfig( String solrHome ) { } } + /** + * Load config from TypeSafe {@link ConfigFactory#load()} + */ public void loadDefaultConfig() { Config config = ConfigFactory.load(); solrHome = config.getString("solrsail.solr.home"); @@ -101,6 +118,12 @@ public Set findSolrInClasspath() throws IOException { return scanner.scan( "solr" ); } + /** + * Install Solr Config to the local file system + * + * @throws IOException + * @throws URISyntaxException + */ @Command public void install() throws IOException, URISyntaxException { File jar = new File( this.getClass().getProtectionDomain().getCodeSource().getLocation().toURI() ); @@ -112,12 +135,27 @@ public void install() throws IOException, URISyntaxException { } } + /** + * Install Solr Config t the local file system by extracting from the + * SolrSail jar + * + * @param jar String path + * @throws IOException + * @throws URISyntaxException + */ @Command @CommandParam(name = "jar", type = String.class) public void installFromJar( String jar ) throws IOException, URISyntaxException { installFromJar( new File( jar ) ); } + /** + * Install Solr Config t the local file system by extracting from the + * SolrSail jar + * + * @param jar File + * @throws IOException + */ public void installFromJar( File jar ) throws IOException { logger.info( "Installing config from Jar to {}", this.getSolrHome() ); logger.debug( "Opening Jar {}", jar.toString() ); diff --git a/src/main/ruby/solr_sail.rb b/src/main/ruby/solr_sail.rb index 1d72a89..ecf87a5 100644 --- a/src/main/ruby/solr_sail.rb +++ b/src/main/ruby/solr_sail.rb @@ -4,7 +4,7 @@ module SolrSail @@version = IO.read("VERSION").strip - @@jar = File.expand_path("#{File.dirname(__FILE__)}/../solrsail-#{@@version}.jar") + @@jar = File.expand_path("#{File.dirname(__FILE__)}/../solr_sail-#{@@version}.jar") @@lockfile = File.expand_path("#{File.dirname(__FILE__)}/../Jarfile.lock") def self.version