You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@manifoldcf.apache.org by kw...@apache.org on 2013/03/10 14:59:57 UTC

svn commit: r1454851 - in /manifoldcf/integration/elasticsearch/trunk: ./ DEPENDENCIES.txt README.txt pom.xml src/main/assembly/ src/main/assembly/bin.xml src/main/assembly/build.xml src/main/assembly/src.xml

Author: kwright
Date: Sun Mar 10 13:59:57 2013
New Revision: 1454851

URL: http://svn.apache.org/r1454851
Log:
Set up packaging targets

Added:
    manifoldcf/integration/elasticsearch/trunk/src/main/assembly/
    manifoldcf/integration/elasticsearch/trunk/src/main/assembly/bin.xml   (with props)
    manifoldcf/integration/elasticsearch/trunk/src/main/assembly/build.xml   (with props)
    manifoldcf/integration/elasticsearch/trunk/src/main/assembly/src.xml   (with props)
Modified:
    manifoldcf/integration/elasticsearch/trunk/   (props changed)
    manifoldcf/integration/elasticsearch/trunk/DEPENDENCIES.txt
    manifoldcf/integration/elasticsearch/trunk/README.txt
    manifoldcf/integration/elasticsearch/trunk/pom.xml

Propchange: manifoldcf/integration/elasticsearch/trunk/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Mar 10 13:59:57 2013
@@ -0,0 +1 @@
+target

Propchange: manifoldcf/integration/elasticsearch/trunk/
------------------------------------------------------------------------------
--- svn:ignores (added)
+++ svn:ignores Sun Mar 10 13:59:57 2013
@@ -0,0 +1 @@
+target

Modified: manifoldcf/integration/elasticsearch/trunk/DEPENDENCIES.txt
URL: http://svn.apache.org/viewvc/manifoldcf/integration/elasticsearch/trunk/DEPENDENCIES.txt?rev=1454851&r1=1454850&r2=1454851&view=diff
==============================================================================
--- manifoldcf/integration/elasticsearch/trunk/DEPENDENCIES.txt (original)
+++ manifoldcf/integration/elasticsearch/trunk/DEPENDENCIES.txt Sun Mar 10 13:59:57 2013
@@ -1,8 +1,7 @@
 Apache ManifoldCF ElasticSearch Plugin requires
 ----------------------------------------------
 * JRE 1.6 or above
-* svn command line tools
-* ant 1.8 or higher
+* mvn 2.2 or higher
 
 For building Apache ManifoldCF ElasticSearch Plugin:
 -------------------------------------------------

Modified: manifoldcf/integration/elasticsearch/trunk/README.txt
URL: http://svn.apache.org/viewvc/manifoldcf/integration/elasticsearch/trunk/README.txt?rev=1454851&r1=1454850&r2=1454851&view=diff
==============================================================================
--- manifoldcf/integration/elasticsearch/trunk/README.txt (original)
+++ manifoldcf/integration/elasticsearch/trunk/README.txt Sun Mar 10 13:59:57 2013
@@ -15,24 +15,42 @@
 
 
 Instructions for Building Apache ManifoldCF ElasticSearch Plugin from Source
--------------------------------------------------------------------
+-------------------------------------------------------------------------
 
 1. Download the Java SE 6 JDK (Java Development Kit), or greater, from http://www.oracle.com/technetwork/java/index.html.
    You will need the JDK installed, and the %JAVA_HOME%\bin directory included
    on your command path.  To test this, issue a "java -version" command from your
    shell and verify that the Java version is 1.6 or greater.
 
-2. Download the Apache Ant binary distribution (1.8.2 or greater) from http://ant.apache.org.
-   You will need Ant installed and the %ANT_HOME%\bin directory included on your
-   command path.  To test this, issue a "ant -version" command from your
-   shell and verify that Ant is available.
+2. Download and install Maven 2.2.1 or later.  Maven installation and configuration instructions can be found here:
 
-3. In a shell, change to the root directory of the source (where you find the outermost
-   build.xml file), and type "ant" for directions.
+http://maven.apache.org/run-maven/index.html
 
+3. Build packages
+
+Execute the following command in order to build the JAR packages and install 
+them to the local repository:
+
+mvn install
+
+The JAR packages can be found in the target folder:
+
+target/elasticsearch-plugin-mcf-<VERSION>.jar
+
+... where <VERSION> is the release version
+
+4. Building distribution assemblies 
+
+Execute the following command in order to build the distribution assemblies
+
+mvn package assembly:assembly
+
+5. Fix EOL in source files
+
+Fix the archive files so the source files have the correct EOL settings:
+
+mvn antrun:run
 
-Some Files Included In Apache ManifoldCF ElasticSearch Plugin Distributions
------------------------------------------------------------------------
 
 Licensing
 ---------

Modified: manifoldcf/integration/elasticsearch/trunk/pom.xml
URL: http://svn.apache.org/viewvc/manifoldcf/integration/elasticsearch/trunk/pom.xml?rev=1454851&r1=1454850&r2=1454851&view=diff
==============================================================================
--- manifoldcf/integration/elasticsearch/trunk/pom.xml (original)
+++ manifoldcf/integration/elasticsearch/trunk/pom.xml Sun Mar 10 13:59:57 2013
@@ -35,6 +35,11 @@
   <description>ManifoldCF Plugin for ElasticSearch</description>
   <inceptionYear>2013</inceptionYear>
 
+  <organization>
+    <name>The Apache Software Foundation</name>
+    <url>http://www.apache.org/</url>
+  </organization>
+
   <!-- Move these to the parent pom, when I create a parent pom -->
   <properties>
     <elasticsearch.version>0.20.5</elasticsearch.version>
@@ -83,6 +88,7 @@
   
   <build>
     <plugins>
+
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
@@ -90,6 +96,7 @@
           <argLine>-Xmx1024m</argLine>
         </configuration>
       </plugin>
+
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-compiler-plugin</artifactId>
@@ -99,10 +106,27 @@
           <target>1.6</target>
         </configuration>
       </plugin>
-      <!-- plugin>
-        <groupId>org.apache.maven.plugins</groupId>
+
+      <plugin>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifestEntries>
+              <Specification-Title>${project.name}</Specification-Title>
+              <Specification-Version>${project.version}</Specification-Version>
+              <Specification-Vendor>The Apache Software Foundation</Specification-Vendor>
+              <Implementation-Title>${project.name}</Implementation-Title>
+              <Implementation-Version>${project.version}</Implementation-Version>
+              <Implementation-Vendor>The Apache Software Foundation</Implementation-Vendor>
+              <Implementation-Vendor-Id>org.apache</Implementation-Vendor-Id>
+              <url>${project.url}</url>
+            </manifestEntries>
+          </archive>
+        </configuration>
+      </plugin>
+
+      <plugin>
         <artifactId>maven-source-plugin</artifactId>
-        <version>2.1.2</version>
         <executions>
           <execution>
             <id>attach-sources</id>
@@ -111,26 +135,50 @@
             </goals>
           </execution>
         </executions>
-      </plugin -->
-      <!--plugin>
+        <configuration>
+          <archive>
+            <!-- Ensure source jars have full manifest entries (note: defaults aren't suitable) -->
+            <manifestEntries>
+              <Specification-Title>${project.name}</Specification-Title>
+              <Specification-Version>${project.version}</Specification-Version>
+              <Specification-Vendor>The Apache Software Foundation</Specification-Vendor>
+              <Implementation-Title>${project.name}</Implementation-Title>
+              <Implementation-Version>${project.version}</Implementation-Version>
+              <Implementation-Vendor>The Apache Software Foundation</Implementation-Vendor>
+              <Implementation-Vendor-Id>org.apache</Implementation-Vendor-Id>
+            </manifestEntries>
+          </archive>
+        </configuration>
+      </plugin>
+
+      <plugin>
         <artifactId>maven-assembly-plugin</artifactId>
-        <version>2.3</version>
         <configuration>
-          <appendAssemblyId>false</appendAssemblyId>
-          <outputDirectory>${project.build.directory}/releases/</outputDirectory>
           <descriptors>
-            <descriptor>${basedir}/src/main/assemblies/plugin.xml</descriptor>
+            <descriptor>src/main/assembly/bin.xml</descriptor>
+            <descriptor>src/main/assembly/src.xml</descriptor>
           </descriptors>
+          <tarLongFileMode>gnu</tarLongFileMode>
         </configuration>
-        <executions>
-          <execution>
-            <phase>package</phase>
-            <goals>
-              <goal>single</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin -->
+      </plugin>
+
+      <plugin>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <inherited>false</inherited>
+        <configuration>
+          <tasks>
+            <ant antfile="src/main/assembly/build.xml">
+              <property name="target" value="${project.build.directory}" />
+              <property name="package.name" value="${project.artifactId}-${project.version}-bin" />
+            </ant>
+            <ant antfile="src/main/assembly/build.xml">
+              <property name="target" value="${project.build.directory}" />
+              <property name="package.name" value="${project.artifactId}-${project.version}-src" />
+            </ant>
+          </tasks>
+        </configuration>
+      </plugin>
+
       <plugin>
         <artifactId>maven-resources-plugin</artifactId>
         <version>2.5</version>
@@ -138,6 +186,7 @@
           <encoding>UTF-8</encoding>
         </configuration>
       </plugin>
+
       <plugin>
         <artifactId>maven-clean-plugin</artifactId>
         <version>2.4.1</version>

Added: manifoldcf/integration/elasticsearch/trunk/src/main/assembly/bin.xml
URL: http://svn.apache.org/viewvc/manifoldcf/integration/elasticsearch/trunk/src/main/assembly/bin.xml?rev=1454851&view=auto
==============================================================================
--- manifoldcf/integration/elasticsearch/trunk/src/main/assembly/bin.xml (added)
+++ manifoldcf/integration/elasticsearch/trunk/src/main/assembly/bin.xml Sun Mar 10 13:59:57 2013
@@ -0,0 +1,67 @@
+<!--
+   $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/src/main/assembly/bin-unix.xml $
+   $Revision: 687166 $
+   $Date: 2008-08-19 23:40:27 +0200 (Tue, 19 Aug 2008) $
+
+   ====================================================================
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.
+   ====================================================================
+
+   This software consists of voluntary contributions made by many
+   individuals on behalf of the Apache Software Foundation.  For more
+   information on the Apache Software Foundation, please see
+   <http://www.apache.org/>.
+ -->
+<assembly>
+    <id>bin</id>
+    <formats>
+        <format>tar.gz</format>
+        <format>zip</format>
+    </formats>
+    <moduleSets>
+      <moduleSet>
+        <excludes>
+          <!-- exclude>org.apache.httpcomponents:httpclient-osgi</exclude -->
+        </excludes>
+        <binaries>
+          <outputDirectory>lib</outputDirectory>
+          <unpack>false</unpack>
+          <dependencySets>
+            <dependencySet>
+              <excludes>
+                <exclude>org.slf4j:*</exclude>
+              </excludes>
+            </dependencySet>
+          </dependencySets>
+        </binaries>
+      </moduleSet>
+    </moduleSets>
+    <fileSets>
+        <fileSet>
+          <directory></directory>
+          <outputDirectory></outputDirectory>
+          <includes>
+            <include>README.txt</include>
+            <include>LICENSE.txt</include>
+            <include>NOTICE.txt</include>
+            <include>CHANGES.txt</include>
+            <include>DEPENDENCIES.txt</include>
+          </includes>
+        </fileSet>
+    </fileSets>
+</assembly>

Propchange: manifoldcf/integration/elasticsearch/trunk/src/main/assembly/bin.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: manifoldcf/integration/elasticsearch/trunk/src/main/assembly/bin.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: manifoldcf/integration/elasticsearch/trunk/src/main/assembly/build.xml
URL: http://svn.apache.org/viewvc/manifoldcf/integration/elasticsearch/trunk/src/main/assembly/build.xml?rev=1454851&view=auto
==============================================================================
--- manifoldcf/integration/elasticsearch/trunk/src/main/assembly/build.xml (added)
+++ manifoldcf/integration/elasticsearch/trunk/src/main/assembly/build.xml Sun Mar 10 13:59:57 2013
@@ -0,0 +1,65 @@
+<!-- 
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.
+   ====================================================================
+
+   This software consists of voluntary contributions made by many
+   individuals on behalf of the Apache Software Foundation.  For more
+   information on the Apache Software Foundation, please see
+   <http://www.apache.org />.
+ -->
+<project name="assembly-postprocess" default="fixarchives" basedir=".">
+
+  <target name="fixarchives" depends="_eolcheck,fixzip,fixtgz">
+  </target>
+
+  <target name="fixzip" unless="native.crlf">
+    <property name="tmp.dir" location="${target}/tmp"/>    
+    <property name="zip.file" location="${target}/${package.name}.zip"/>    
+    <delete dir="${tmp.dir}" />
+    <unzip src="${zip.file}" dest="${tmp.dir}"/>
+    <fixcrlf srcdir="${tmp.dir}" eol="crlf" eof="remove" fixlast="false"
+        includes="**/*.txt, **/*.xml, **/*.properties, **/*.java, **/*.html, **/*.css, **/*.apt, **/*.py, **/*.svg, **/*.xsl" />
+    <zip destfile="${zip.file}" basedir="${tmp.dir}" duplicate="preserve" />
+    <delete dir="${tmp.dir}" />
+  </target>  
+
+  <target name="fixtgz" unless="native.lf">
+    <property name="tmp.dir" location="${target}/tmp"/>    
+    <property name="gz.file" location="${target}/${package.name}.tar.gz"/>    
+    <property name="tar.file" location="${target}/${package.name}.tar"/>    
+    <delete dir="${tmp.dir}" />
+    <gunzip src="${gz.file}" dest="${tar.file}"/>
+    <untar src="${tar.file}" dest="${tmp.dir}"/>
+    <fixcrlf srcdir="${tmp.dir}" eol="lf" eof="remove" fixlast="false"
+        includes="**/*.txt, **/*.xml, **/*.properties, **/*.java, **/*.html, **/*.css, **/*.apt, **/*.py, **/*.svg, **/*.xsl" />
+    <tar destfile="${tar.file}" basedir="${tmp.dir}" longfile="gnu"/>
+    <gzip src="${tar.file}" destfile="${gz.file}"/>
+      <delete file="${tar.file}"/>
+    <delete dir="${tmp.dir}"/>
+  </target>  
+
+  <!-- Determine if the native format is CRLF or LF (or neither) -->
+  <target name="_eolcheck">
+    <condition property="native.lf">
+        <os family="unix"/>
+    </condition>
+    <condition property="native.crlf">
+        <os family="dos"/>
+    </condition>
+  </target>
+</project>

Propchange: manifoldcf/integration/elasticsearch/trunk/src/main/assembly/build.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: manifoldcf/integration/elasticsearch/trunk/src/main/assembly/build.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: manifoldcf/integration/elasticsearch/trunk/src/main/assembly/src.xml
URL: http://svn.apache.org/viewvc/manifoldcf/integration/elasticsearch/trunk/src/main/assembly/src.xml?rev=1454851&view=auto
==============================================================================
--- manifoldcf/integration/elasticsearch/trunk/src/main/assembly/src.xml (added)
+++ manifoldcf/integration/elasticsearch/trunk/src/main/assembly/src.xml Sun Mar 10 13:59:57 2013
@@ -0,0 +1,45 @@
+<!-- 
+   ====================================================================
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.
+   ====================================================================
+
+   This software consists of voluntary contributions made by many
+   individuals on behalf of the Apache Software Foundation.  For more
+   information on the Apache Software Foundation, please see
+   <http://www.apache.org/>.
+ -->
+<assembly>
+    <id>src</id>
+    <formats>
+        <format>tar.gz</format>
+        <format>zip</format>
+    </formats>
+    <fileSets>
+        <!-- Release materials -->
+        <fileSet>
+          <directory></directory>
+          <outputDirectory></outputDirectory>
+          <excludes>
+            <exclude>**/.*</exclude>
+            <exclude>**/.*/**</exclude>
+            <exclude>**/target/**</exclude>
+            <exclude>**/lib/**</exclude>
+          </excludes>
+        </fileSet>
+    </fileSets>
+</assembly>

Propchange: manifoldcf/integration/elasticsearch/trunk/src/main/assembly/src.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: manifoldcf/integration/elasticsearch/trunk/src/main/assembly/src.xml
------------------------------------------------------------------------------
    svn:keywords = Id