https://github.com/thinkaurelius/titan
Revision d94d616f34c1cad14323931b14715c4b4eee697f authored by Dan LaRocque on 20 December 2013, 21:09:14 UTC, committed by Dan LaRocque on 20 December 2013, 21:09:14 UTC
`titan.sh stop` now waits up to 60 seconds by default (though this is
configurable through an environment variable) for Rexster to disappear
from the jps process table before attempting to kill Cassandra.  This
addresses issue 2 of 2 in #538.
1 parent c67ed62
Raw File
Tip revision: d94d616f34c1cad14323931b14715c4b4eee697f authored by Dan LaRocque on 20 December 2013, 21:09:14 UTC
titan.sh: kill Cassandra only after Rexster dies
Tip revision: d94d616
pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.thinkaurelius.titan</groupId>
        <artifactId>titan</artifactId>
        <version>0.4.2-SNAPSHOT</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <artifactId>titan-site</artifactId>
    <name>Titan-Site: Static Webpages and Docs</name>
    <url>http://thinkaurelius.github.com/titan/</url>
    
    <properties>
        <top.level.basedir>${basedir}/..</top.level.basedir>
    </properties>

    <build>
        <plugins>

            <!--
              Delete the html copy of the wiki generated with
              gollum-site, if any exists.
            -->
            <plugin>
                <artifactId>maven-clean-plugin</artifactId>
                <configuration>
                    <filesets>
                        <fileset>
                            <directory>${project.parent.basedir}/doc/html</directory>
                            <followSymlinks>false</followSymlinks>
                        </fileset>
                    </filesets>
                </configuration>
            </plugin>

            <!--
              Turn off default plugin goal bindings that we don't need
              for this module, which is almost all default bindings.
            -->
            <plugin>
                <artifactId>maven-gpg-plugin</artifactId>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>none</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default-jar</id>
                        <phase>none</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>none</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default-test</id>
                        <phase>none</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default-compile</id>
                        <phase>none</phase>
                    </execution>
                    <execution>
                        <id>default-testCompile</id>
                        <phase>none</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <phase>none</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-deploy-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default-deploy</id>
                        <phase>none</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-install-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default-install</id>
                        <phase>none</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default-testResources</id>
                        <phase>none</phase>
                    </execution>
                    <execution>
                        <id>default-resources</id>
                        <phase>none</phase>
                    </execution>
                </executions>
            </plugin>
            <!-- Done disabling unnecessary plugins -->
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>aurelius-release</id>
            <dependencies>
                <dependency>
                    <groupId>${project.groupId}</groupId>
                    <artifactId>titan-core</artifactId>
                    <version>${project.version}</version>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>site-javadoc</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>javadoc</goal>
                                </goals>
                                <configuration>
                                    <windowtitle>Titan ${project.version} API</windowtitle>
                                    <doctitle>Titan Graph Database ${project.version} API</doctitle>
                                    <includeDependencySources>true</includeDependencySources>
                                    <dependencySourceIncludes>
                                        <dependencySourceInclude>${project.groupId}:titan-core</dependencySourceInclude>
                                    </dependencySourceIncludes>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
  
                    <!-- Build "htdocs", the combined wikidoc + javadoc artifact -->
                    <plugin>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>assemble-htdoc-zip</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>single</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <attach>false</attach>
                            <descriptors>
                                <descriptor>src/assembly/htdocs.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </plugin>
        
                    <!-- Install "htdocs", the combined wikidoc + javadoc artifact -->
                    <plugin>
                        <artifactId>maven-install-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>install-htdocs-locally</id>
                                <phase>install</phase>
                                <goals>
                                    <goal>install-file</goal>
                                </goals>
                                <configuration>
                                    <file>${project.build.directory}/${project.artifactId}-${project.version}-htdocs.zip</file>
                                    <generatePom>true</generatePom>
                                    <artifactId>${project.artifactId}</artifactId>
                                    <groupId>${project.groupId}</groupId>
                                    <version>${project.version}</version>
                                    <packaging>zip</packaging>
                                    <classifier>htdocs</classifier>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
        
                    <plugin>
                        <artifactId>maven-resources-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>filter-site-scripts</id>
                                <phase>process-resources</phase>
                                <goals>
                                    <goal>copy-resources</goal>
                                </goals>
                                <configuration>
                                    <outputDirectory>${project.build.directory}/site-scripts</outputDirectory>
                                    <useDefaultDelimiters>false</useDefaultDelimiters>
                                    <delimiters>
                                        <delimiter>$MAVEN{*}</delimiter>
                                    </delimiters>
                                    <resources>
                                        <resource>
                                            <directory>src/site-scripts</directory>
                                            <filtering>true</filtering>
                                        </resource>
                                    </resources>              
                                </configuration>            
                            </execution>
                            <execution>
                                <id>filter-site-resources</id>
                                <phase>process-resources</phase>
                                <goals>
                                    <goal>copy-resources</goal>
                                </goals>
                                <configuration>
                                    <outputDirectory>${project.build.directory}/site-resources</outputDirectory>
                                    <useDefaultDelimiters>false</useDefaultDelimiters>
                                    <delimiters>
                                        <delimiter>$MAVEN{*}</delimiter>
                                    </delimiters>
                                    <resources>
                                        <resource>
                                            <directory>src/site-resources</directory>
                                            <filtering>true</filtering>
                                        </resource>
                                    </resources>              
                                </configuration>            
                            </execution>
                        </executions>
                    </plugin>
        
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>git-submodule-prep</id>
                                <phase>initialize</phase>
                                <goals>
                                    <goal>exec</goal>
                                </goals>
                                <configuration>
                                    <executable>git</executable>
                                    <arguments>
                                        <argument>submodule</argument>
                                        <argument>update</argument>
                                        <argument>--init</argument>
                                    </arguments>
                                    <workingDirectory>..</workingDirectory>
                                </configuration>
                            </execution>
                            <execution>
                                <!-- Gollum doesn't understand submodules.  It dies with a Grit [sic] error
                                     error when run on a submodule.  This limitation is intrinsic to Gollum
                                     and not just a limitation of gollum-site.  Poor submodule support has
                                     appeared in at least two Gollum issues:
        
                                     https://github.com/gollum/gollum/issues/151
                                     https://github.com/gollum/gollum/issues/438
        
                                     Gollum might eventually throw out Grit
                                     in favor of an alternative project called Rugged that supposedly handles
                                     submodules correctly:
        
                                     https://github.com/gollum/gollum-lib/pull/16
        
                                     For now, we're hacking around Gollum's limitation.  The doc submodule
                                     .git file usually contains this:
        
                                     gitdir: ../.git/modules/doc
        
                                     This is a sort of pretend symlink.  Git is smart enough to handle an
                                     actual symlink in a way functionally identical to the gitdir: ... file,
                                     and making this a symlink placates Gollum and avoids the submodule Grit
                                     error that would otherwise kill it.
                                -->
                                <id>hack-submodule-gitdir-for-gollum</id>
                                <phase>initialize</phase>
                                <goals>
                                    <goal>exec</goal>
                                </goals>
                                <configuration>
                                    <executable>ln</executable>
                                    <arguments>
                                        <argument>-sf</argument>
                                        <argument>../.git/modules/doc</argument>
                                        <argument>.git</argument>
                                    </arguments>
                                    <workingDirectory>${project.parent.basedir}/doc</workingDirectory>
                                </configuration>
                            </execution>
                            <!-- 
                              We use maven-resources-plugin to filter a script
                              during pre-site, but that plugin has an open bug
                              about the fact that it doesn't copy file
                              permissions during filtering.  Make the script
                              executable.
         
                              Bug: http://jira.codehaus.org/browse/MRESOURCES-132
                            -->
                            <execution>
                                <id>fix-script-permissions</id>
                                <phase>process-resources</phase>
                                <goals>
                                    <goal>exec</goal>
                                </goals>
                                <configuration>
                                    <executable>chmod</executable>
                                    <arguments>
                                        <argument>-R</argument>
                                        <argument>ug+x</argument>
                                        <argument>${project.build.directory}/site-scripts/</argument>
                                    </arguments>
                                    <workingDirectory>${project.parent.basedir}/doc</workingDirectory>
                                </configuration>
                            </execution>
                            <execution>
                                <id>gollum-site</id>
                                <phase>compile</phase>
                                <goals>
                                    <goal>exec</goal>
                                </goals>
                                <configuration>
                                    <executable>${project.build.directory}/site-scripts/gollum-site-wrapper.sh</executable>
                                    <workingDirectory>${project.parent.basedir}</workingDirectory>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
back to top