Browse files

update docs

  • Loading branch information...
1 parent 4dd8a03 commit 3c7fb2e905b661af4a2f46936cad71815b105dc7 mguymon committed Sep 2, 2012
View
2 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
View
6 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]
View
148 pom.xml
@@ -3,12 +3,41 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.tobedevoured</groupId>
- <artifactId>solrsail</artifactId>
+ <artifactId>solr_sail</artifactId>
<version>0.0.1</version>
<packaging>jar</packaging>
<name>Solr Sail</name>
<url>https://github.com/mguymon/solr_sail</url>
+ <description>
+ Solr Search fresh from the can
+ </description>
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+ <scm>
+ <url>scm:git:git@github.com/mguymon/by_your_command.git</url>
+ <developerConnection>scm:git:git@github.com/mguymon/by_your_command.git</developerConnection>
+ <connection>git@github.com/mguymon/by_your_command.git</connection>
+ </scm>
+ <developers>
+ <developer>
+ <id>mguymon</id>
+ <name>Michael Guymon</name>
+ <email>michael@tobedevoured.com</email>
+ </developer>
+ </developers>
+ <distributionManagement>
+ <repository>
+ <id>nexus-releases</id>
+ <name>Nexus Release Repository</name>
+ <url>http://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
+ </repository>
+ </distributionManagement>
<repositories>
<repository>
@@ -27,7 +56,7 @@
<dependency>
<groupId>com.tobedevoured.command</groupId>
<artifactId>core</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>0.0.1</version>
</dependency>
<!-- Jetty -->
@@ -83,6 +112,8 @@
<version>1.0.6</version>
</dependency>
+
+
<!-- Testing -->
<dependency>
<groupId>junit</groupId>
@@ -91,66 +122,55 @@
<scope>test</scope>
</dependency>
</dependencies>
-
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-dependencies</id>
- <phase>package</phase>
- <goals>
- <goal>copy-dependencies</goal>
- </goals>
- <configuration>
- <outputDirectory>${project.build.directory}/lib</outputDirectory>
- <overWriteReleases>false</overWriteReleases>
- <overWriteSnapshots>false</overWriteSnapshots>
- <overWriteIfNewer>true</overWriteIfNewer>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-source-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-sources</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-javadocs</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-gpg-plugin</artifactId>
- <executions>
- <execution>
- <id>sign-artifacts</id>
- <phase>verify</phase>
- <goals>
- <goal>sign</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
+
+
+ <build>
+ <plugins>
+ <!-- <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId>
+ <version>1.7.1</version> <executions> <execution> <phase>package</phase>
+ <goals> <goal>shade</goal> </goals> <configuration> <filters> <filter> <artifact>*:*</artifact>
+ <excludes> <exclude>META-INF/*.SF</exclude> <exclude>META-INF/*.DSA</exclude>
+ <exclude>META-INF/*.RSA</exclude> </excludes> </filter> </filters> <transformers>
+ <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+ <mainClass>com.tobedevoured.command.Runner</mainClass> </transformer> </transformers>
+ </configuration> </execution> </executions> </plugin> -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-javadocs</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-gpg-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>sign-artifacts</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>sign</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</project>
View
9 src/main/java/com/tobedevoured/solrsail/JettyServer.java
@@ -19,6 +19,7 @@
/**
* Jetty Server
*
+ * @author Michael Guymon
*/
@ByYourCommand
public class JettyServer {
@@ -28,13 +29,21 @@
private String contextPath;
private int port;
+ /**
+ * Create new instance
+ */
public JettyServer() {
Config config = ConfigFactory.load();
solrHome = config.getString("solrsail.solr.home");
port = config.getInt("solrsail.solr.port");
contextPath = config.getString("solrsail.solr.contextpath");
}
+ /**
+ * Start Jetty
+ *
+ * @throws Exception
+ */
@Command
public void start() throws Exception {
View
38 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 void installFromClasspath() 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() );
View
2 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

0 comments on commit 3c7fb2e

Please sign in to comment.