Skip to content

Commit

Permalink
Merged heads
Browse files Browse the repository at this point in the history
  • Loading branch information
ukcrpb6 committed Mar 26, 2012
2 parents 931faf2 + c7ebdd5 commit 499a164
Show file tree
Hide file tree
Showing 17 changed files with 351 additions and 140 deletions.
44 changes: 3 additions & 41 deletions .classpath
@@ -1,46 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry including="**/*.java" kind="src" output="target/test-classes" path="src/test/java"/>
<classpathentry excluding="**/*.java" kind="src" output="target/test-classes" path="src/test/resources"/>
<classpathentry including="**/*.java" kind="src" path="src/main/java"/>
<classpathentry kind="var" path="M2_REPO/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar"/>
<classpathentry kind="var" path="M2_REPO/commons-cli/commons-cli/1.0/commons-cli-1.0.jar"/>
<classpathentry kind="var" path="M2_REPO/commons-codec/commons-codec/1.3/commons-codec-1.3.jar"/>
<classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar" sourcepath="M2_REPO/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/doxia/doxia-sink-api/1.0-alpha-4/doxia-sink-api-1.0-alpha-4.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpclient/4.0.1/httpclient-4.0.1.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpcore/4.0.1/httpcore-4.0.1.jar"/>
<classpathentry kind="var" path="M2_REPO/com/jcraft/jsch/0.1.23/jsch-0.1.23.jar"/>
<classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar" sourcepath="M2_REPO/junit/junit/3.8.1/junit-3.8.1-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-artifact/2.0/maven-artifact-2.0.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-artifact-manager/2.0/maven-artifact-manager-2.0.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-core/2.0/maven-core-2.0.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-error-diagnostics/2.0/maven-error-diagnostics-2.0.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-model/2.2.1/maven-model-2.2.1.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-monitor/2.0/maven-monitor-2.0.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-plugin-api/2.2.1/maven-plugin-api-2.2.1.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-plugin-descriptor/2.0/maven-plugin-descriptor-2.0.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-plugin-parameter-documenter/2.0/maven-plugin-parameter-documenter-2.0.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-plugin-registry/2.0/maven-plugin-registry-2.0.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/maven/plugin-testing/maven-plugin-testing-harness/1.2/maven-plugin-testing-harness-1.2.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-profile/2.0/maven-profile-2.0.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-project/2.0/maven-project-2.0.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/maven/reporting/maven-reporting-api/2.0/maven-reporting-api-2.0.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-repository-metadata/2.0/maven-repository-metadata-2.0.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-settings/2.0/maven-settings-2.0.jar"/>
<classpathentry kind="var" path="M2_REPO/org/codehaus/plexus/plexus-archiver/1.0-alpha-12/plexus-archiver-1.0-alpha-12.jar"/>
<classpathentry kind="var" path="M2_REPO/org/codehaus/plexus/plexus-container-default/1.0-alpha-9-stable-1/plexus-container-default-1.0-alpha-9-stable-1.jar"/>
<classpathentry kind="var" path="M2_REPO/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar"/>
<classpathentry kind="var" path="M2_REPO/org/codehaus/plexus/plexus-io/1.0-alpha-4/plexus-io-1.0-alpha-4.jar"/>
<classpathentry kind="var" path="M2_REPO/org/codehaus/plexus/plexus-utils/1.5.15/plexus-utils-1.5.15.jar"/>
<classpathentry kind="src" path="/recordloader"/>
<classpathentry kind="var" path="M2_REPO/org/tmatesoft/svn/1.1.0/svn-1.1.0.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/maven/wagon/wagon-file/1.0-alpha-5/wagon-file-1.0-alpha-5.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/maven/wagon/wagon-http-lightweight/1.0-alpha-5/wagon-http-lightweight-1.0-alpha-5.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/maven/wagon/wagon-provider-api/1.0-alpha-5/wagon-provider-api-1.0-alpha-5.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/maven/wagon/wagon-ssh/1.0-alpha-5/wagon-ssh-1.0-alpha-5.jar"/>
<classpathentry kind="var" path="M2_REPO/com/marklogic/xcc/4.1-4/xcc-4.1-4.jar" sourcepath="/WORKSPACE/xcc/xcc/src/java"/>
<classpathentry kind="var" path="M2_REPO/xpp3/xpp3/1.1.4c/xpp3-1.1.4c.jar"/>
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
37 changes: 23 additions & 14 deletions .project
@@ -1,15 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>maven-marklogic-plugin</name>
<comment>The Compiler Plugin is used to compile the sources of your project.</comment>
<projects>
<project>recordloader</project>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
<name>maven-marklogic-plugin</name>
<comment>The Compiler Plugin is used to compile the sources of your project.</comment>
<projects>
<project>recordloader</project>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
17 changes: 9 additions & 8 deletions .settings/org.eclipse.jdt.core.prefs
@@ -1,12 +1,13 @@
#Thu Feb 18 15:58:43 EST 2010
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.compliance=1.5
#Tue Feb 28 12:10:14 GMT 2012
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.5
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
5 changes: 5 additions & 0 deletions .settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,5 @@
#Tue Feb 28 12:09:47 GMT 2012
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -4,7 +4,7 @@

<groupId>com.marklogic.maven</groupId>
<artifactId>marklogic-maven-plugin</artifactId>
<version>0.4.2-SNAPSHOT</version>
<version>0.4.4-SNAPSHOT</version>
<packaging>maven-plugin</packaging>

<name>MarkLogic Maven Plugin</name>
Expand Down
8 changes: 6 additions & 2 deletions src/main/java/com/marklogic/maven/AbstractBootstrapMojo.java
Expand Up @@ -25,7 +25,7 @@ public abstract class AbstractBootstrapMojo extends AbstractMarkLogicMojo {
/**
* The port used to bootstrap MarkLogic Server.
*/
@MojoParameter(defaultValue = "8080", expression = "${marklogic.bootstrap.port}")
@MojoParameter(defaultValue = "8000", expression = "${marklogic.bootstrap.port}")
protected int bootstrapPort;

/**
Expand All @@ -43,7 +43,10 @@ public abstract class AbstractBootstrapMojo extends AbstractMarkLogicMojo {
protected abstract String getBootstrapExecuteQuery() throws MojoExecutionException;

public void execute() throws MojoExecutionException, MojoFailureException {
executeBootstrapQuery(getBootstrapExecuteQuery());
getLog().info("Install Bootstrap = " + installBootstrap);
if (installBootstrap) {
executeBootstrapQuery(getBootstrapExecuteQuery());
}
}

protected HttpResponse executeBootstrapQuery(String query) throws MojoExecutionException {
Expand All @@ -61,6 +64,7 @@ protected HttpResponse executeBootstrapQuery(String query) throws MojoExecutionE
HttpPost httpPost = new HttpPost(uri);

HttpResponse response;

try {
response = httpClient.execute(httpPost);
} catch (Exception e) {
Expand Down
90 changes: 60 additions & 30 deletions src/main/java/com/marklogic/maven/AbstractDeploymentMojo.java
Expand Up @@ -41,36 +41,44 @@ public abstract class AbstractDeploymentMojo extends AbstractMarkLogicMojo {
* For example
* <p/>
* <environments>
* <environment>
* <name>development</name>
* <applicationName>Demo-Development</applicationName>
* <title>Demo (Development)</title>
* <databases>
* { database nodes for configuration xml }
* </databases>
* <servers>
* { server nodes for configuration xml }
* </servers>
* <pipeline-resources>
* <resource>
* <database>Triggers</database>
* <directory>${basedir}/src/main/marklogic/pipelines</directory>
* <includes>
* <include>demp-pipeline.xml</include>
* </includes>
* </resource>
* </pipeline-resources>
* <resources>
* <resource>
* <database>Content</database>
* <directory>${basedir}/src/main/xquery</directory>
* <includes>
* <include>*.xqy</include>
* </includes>
* </resource>
* </resources>
* </environment>
* ...
* <environment>
* <name>development</name>
* <applicationName>Demo-Development</applicationName>
* <title>Demo (Development)</title>
* <databases>
* { database nodes for configuration xml }
* </databases>
* <servers>
* { server nodes for configuration xml }
* </servers>
* <pipeline-resources>
* <resource>
* <database>Triggers</database>
* <directory>${basedir}/src/main/marklogic/pipelines</directory>
* <includes>
* <include>demp-pipeline.xml</include>
* </includes>
* </resource>
* </pipeline-resources>
* <resources>
* <resource>
* <database>Content</database>
* <directory>${basedir}/src/main/xquery</directory>
* <includes>
* <include>*.xqy</include>
* </includes>
* </resource>
* </resources>
*
* <module-invokes>
* <module-invoke>
* <server>XCC</server>
* <module>static/load-lookups.xqy</module>
* </module-invoke>
* </module-invokes>
*
* </environment>
* ...
* </environments>
*/
@MojoParameter
Expand Down Expand Up @@ -259,6 +267,28 @@ protected void restartServers() throws MojoExecutionException {
}
}

/**
* Get the server configuration with name attribute of value parameter
*
* @param value
* @return
* @throws PlexusConfigurationException
*/
protected PlexusConfiguration getServer(String value) throws PlexusConfigurationException
{
PlexusConfiguration[] servers = getCurrentEnvironment().getServers().getChildren();

for (PlexusConfiguration cfg : servers)
{
if (value != null && value.equals( cfg.getAttribute("name") ) )
{
return cfg;
}
}
throw new PlexusConfigurationException("Unknown server configuration: " + value);
}


/**
* Creates a configuration file based on the specification defined in the environment block
*
Expand Down

0 comments on commit 499a164

Please sign in to comment.