You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2008/04/16 22:15:16 UTC

svn commit: r648828 - in /lenya/docu: ./ tools/ tools/eclipse/ tools/targets/

Author: andreas
Date: Wed Apr 16 13:15:14 2008
New Revision: 648828

URL: http://svn.apache.org/viewvc?rev=648828&view=rev
Log:
Adding build files for docu project.

Added:
    lenya/docu/build.properties
    lenya/docu/build.xml
    lenya/docu/tools/
    lenya/docu/tools/eclipse/
    lenya/docu/tools/eclipse/checkstyle-plugin.cfg
    lenya/docu/tools/eclipse/classpath-tmpl.xml
    lenya/docu/tools/eclipse/make-classpath.xsl
    lenya/docu/tools/eclipse/project
    lenya/docu/tools/targets/
    lenya/docu/tools/targets/ide-build.xml
    lenya/docu/tools/targets/properties-build.xml

Added: lenya/docu/build.properties
URL: http://svn.apache.org/viewvc/lenya/docu/build.properties?rev=648828&view=auto
==============================================================================
--- lenya/docu/build.properties (added)
+++ lenya/docu/build.properties Wed Apr 16 13:15:14 2008
@@ -0,0 +1,51 @@
+# 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.
+#------------------------------------------------------------------------------------
+
+
+# Properties controlling the build process
+
+# NOTE: 
+# Don't modify this file directly but create a file named
+# 'local.build.properties' and implement ONLY
+# the properties you need.
+ 
+# You do NOT have to copy the whole 'build.properties' file.
+ 
+# The build system will first read all properties defined 
+# in the 'local.build.properties' file and then will read out the 
+# ones in 'build.properties'. Ant will use the first found.
+# You can as well execute ./configure.sh (Linux) or configure (Windows)
+# to generate the 'local.build.properties'.
+
+#------------------------------------------------------------------------------------
+# Build properties version to make sure that local.build.properties is kept in sync
+# NOTE: Do NOT modify this number unless you are a Dev and want to modify this file
+# NOTE for Devs: Update this number if this file is being updated.
+#                Also update the version number within src/targets/properties-build.xml
+
+build.properties.version=594644
+
+#------------------------------------------------------------------------------------
+# The root of the Lenya source tree
+
+lenya.src.dir=../test/trunk
+
+#------------------------------------------------------------------------------------
+# Eclipse Properties for use with the eclipse-project target
+
+ide.eclipse.outputdir=build/eclipse/classes
+ide.eclipse.export.libs=false
+

Added: lenya/docu/build.xml
URL: http://svn.apache.org/viewvc/lenya/docu/build.xml?rev=648828&view=auto
==============================================================================
--- lenya/docu/build.xml (added)
+++ lenya/docu/build.xml Wed Apr 16 13:15:14 2008
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!--
+  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.
+-->
+
+<project basedir="." name="lenya-docu">
+
+  <!-- Properties targets -->
+  <import file="tools/targets/properties-build.xml"/>
+
+  <!-- IDE integration targets --> 
+  <import file="tools/targets/ide-build.xml" />
+
+</project>

Added: lenya/docu/tools/eclipse/checkstyle-plugin.cfg
URL: http://svn.apache.org/viewvc/lenya/docu/tools/eclipse/checkstyle-plugin.cfg?rev=648828&view=auto
==============================================================================
--- lenya/docu/tools/eclipse/checkstyle-plugin.cfg (added)
+++ lenya/docu/tools/eclipse/checkstyle-plugin.cfg Wed Apr 16 13:15:14 2008
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+
+<!-- $Id: checkstyle-plugin.cfg 473861 2006-11-12 03:51:14Z gregor $ -->
+
+<checkstyle-configurations file-format-version="1.0.0">
+    <check-configuration name="standard">
+        <rule-configuration
+            classname="com.puppycrawl.tools.checkstyle.checks.JavadocTypeCheck" severity="warning">
+            <config-properties>
+                <config-property name="severity" value="warning"/>
+                <config-property name="tokens" value="CLASS_DEF, INTERFACE_DEF"/>
+                <config-property name="authorFormat" value=""/>
+                <config-property name="scope" value="private"/>
+                <config-property name="versionFormat" value=""/>
+            </config-properties>
+        </rule-configuration>
+        <rule-configuration
+            classname="com.puppycrawl.tools.checkstyle.checks.JavadocMethodCheck" severity="warning">
+            <config-properties>
+                <config-property name="allowThrowsTagsForSubclasses" value="false"/>
+                <config-property name="allowUndeclaredRTE" value="false"/>
+                <config-property name="severity" value="warning"/>
+                <config-property name="tokens" value="METHOD_DEF, CTOR_DEF"/>
+                <config-property name="allowMissingParamTags" value="false"/>
+                <config-property name="scope" value="private"/>
+                <config-property name="allowMissingReturnTag" value="false"/>
+                <config-property name="allowMissingThrowsTags" value="false"/>
+            </config-properties>
+        </rule-configuration>
+        <rule-configuration
+            classname="com.puppycrawl.tools.checkstyle.checks.RedundantModifierCheck" severity="warning">
+            <config-properties>
+                <config-property name="severity" value="warning"/>
+                <config-property name="tokens" value="METHOD_DEF, VARIABLE_DEF"/>
+            </config-properties>
+        </rule-configuration>
+        <rule-configuration
+            classname="com.puppycrawl.tools.checkstyle.checks.VisibilityModifierCheck" severity="warning">
+            <config-properties>
+                <config-property name="packageAllowed" value="false"/>
+                <config-property name="severity" value="warning"/>
+                <config-property name="publicMemberPattern" value="^serialVersionUID"/>
+                <config-property name="protectedAllowed" value="false"/>
+            </config-properties>
+        </rule-configuration>
+        <rule-configuration
+            classname="com.puppycrawl.tools.checkstyle.checks.FinalClassCheck" severity="warning">
+            <config-properties>
+                <config-property name="severity" value="warning"/>
+            </config-properties>
+        </rule-configuration>
+        <rule-configuration
+            classname="com.puppycrawl.tools.checkstyle.checks.HideUtilityClassConstructorCheck" severity="warning">
+            <config-properties>
+                <config-property name="severity" value="warning"/>
+            </config-properties>
+        </rule-configuration>
+    </check-configuration>
+</checkstyle-configurations>

Added: lenya/docu/tools/eclipse/classpath-tmpl.xml
URL: http://svn.apache.org/viewvc/lenya/docu/tools/eclipse/classpath-tmpl.xml?rev=648828&view=auto
==============================================================================
--- lenya/docu/tools/eclipse/classpath-tmpl.xml (added)
+++ lenya/docu/tools/eclipse/classpath-tmpl.xml Wed Apr 16 13:15:14 2008
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!--
+  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.
+-->
+<data>
+  <src-dirs><item>@SRC_DIRS@</item></src-dirs>
+  <libs><item>@LIBS@</item></libs>
+  <output>@OUTPUT_DIR@</output>
+</data>
\ No newline at end of file

Added: lenya/docu/tools/eclipse/make-classpath.xsl
URL: http://svn.apache.org/viewvc/lenya/docu/tools/eclipse/make-classpath.xsl?rev=648828&view=auto
==============================================================================
--- lenya/docu/tools/eclipse/make-classpath.xsl (added)
+++ lenya/docu/tools/eclipse/make-classpath.xsl Wed Apr 16 13:15:14 2008
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<!--
+  Build the Eclipse .classpath file from a list of path items
+  (see "eclipse-project" target in build.xml)
+  
+  $Id: make-classpath.xsl 473861 2006-11-12 03:51:14Z gregor $
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <xsl:output indent="yes" method="xml"/>
+  <xsl:param name="exportlib"/>
+  <xsl:param name="lenyaProjectName"/>
+  
+  <xsl:strip-space elements="*"/>
+
+  <xsl:template match="/data">
+    <classpath>
+
+      <!-- 1. source dirs -->
+      <xsl:for-each select="src-dirs/item">
+        <!-- alphabetical sorting, complete path -->
+        <xsl:sort select="."/>
+        <classpathentry kind="src" path="{.}"/>
+      </xsl:for-each>
+          
+      <!-- 2. libraries -->
+      <xsl:for-each select="libs/item[. != '']">
+        <!-- alphabetical sorting, only file name -->
+        <!-- heavy calculation, but here's the logic:
+             1. returns the string after 4 slashes (4 is the max (blocks)),
+                returns empty string if string does not contain 4 slashes
+             2. ... 3 slashes ...
+             3. ... 2 slashes ... (the minimum) -->
+        <xsl:sort select="concat(substring-after(substring-after(substring-after(substring-after(., '/'), '/'), '/'), '/'),
+                                                 substring-after(substring-after(substring-after(., '/'), '/'), '/'),
+                                                                 substring-after(substring-after(., '/'), '/'))"/>
+        <classpathentry exported="{$exportlib}" kind="lib" path="{.}"/>
+      </xsl:for-each>
+
+      <!-- 3. JRE runtime -->
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+     
+      <!-- 4. output directory
+           Build in a separate dir since Eclipse is confused
+           by classes compiled externally by Sun's Javac -->
+      <classpathentry kind="output" path="{output}"/>
+
+      <!-- 5. Dependance on Lenya. There needs to be a Lenya Eclipse project. -->
+	  <classpathentry kind="src" path="/{$lenyaProjectName}"/>
+
+    </classpath>
+  </xsl:template>
+
+</xsl:stylesheet>

Added: lenya/docu/tools/eclipse/project
URL: http://svn.apache.org/viewvc/lenya/docu/tools/eclipse/project?rev=648828&view=auto
==============================================================================
--- lenya/docu/tools/eclipse/project (added)
+++ lenya/docu/tools/eclipse/project Wed Apr 16 13:15:14 2008
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+  <name>@PROJECT_NAME@ @VERSION@</name>
+  <comment></comment>
+  <projects>
+    <project>@LENYA_PROJECT@</project>
+  </projects>
+  <buildSpec>
+    <buildCommand>
+      <name>org.eclipse.jdt.core.javabuilder</name>
+      <arguments>
+      </arguments>
+    </buildCommand>
+  </buildSpec>
+  <natures>
+    <nature>org.eclipse.jdt.core.javanature</nature>
+  </natures>
+</projectDescription>

Added: lenya/docu/tools/targets/ide-build.xml
URL: http://svn.apache.org/viewvc/lenya/docu/tools/targets/ide-build.xml?rev=648828&view=auto
==============================================================================
--- lenya/docu/tools/targets/ide-build.xml (added)
+++ lenya/docu/tools/targets/ide-build.xml Wed Apr 16 13:15:14 2008
@@ -0,0 +1,100 @@
+<?xml version="1.0"?>
+<!--
+  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.
+-->
+<project name="lenya-ide">
+  
+  <description>
+    IDE integration targets
+  </description>
+
+  <!-- Build the Eclipse projects files -->
+  <target name="eclipse-project" description="Generate the Eclipse project files">
+
+    <echo message="Building Eclipse Project Files"/>
+
+    <xmlproperty file="${lenya.src.dir}/.project"/>
+    
+    <fail unless="projectDescription.name">
+      Please call "./build.sh eclipse-project" in the Lenya source directory first.
+    </fail>
+    
+    <!-- prepare the various paths that will form the project -->
+    <path id="srcs">
+      <dirset dir="modules">
+        <include name="*/java/src"/>
+        <include name="*/java/test"/>
+      </dirset>
+    </path>
+
+    <path id="libs">
+      <dirset dir="modules">
+        <include name="*/java/lib/*.jar"/>
+      </dirset>
+    </path>
+
+    <!-- convert paths to properties -->
+    <property name="srcs" refid="srcs"/>
+    <property name="libs" refid="libs"/>
+
+    <!-- expand properties in the template file -->
+    <copy file="tools/eclipse/classpath-tmpl.xml"
+          tofile="${build.temp}/classpath-temp.xml"
+          filtering="yes"
+          overwrite="yes">
+      <filterset>
+        <filter token="SRC_DIRS" value="${srcs}"/>
+        <filter token="LIBS" value="${libs}"/>
+        <filter token="OUTPUT_DIR" value="${ide.eclipse.outputdir}"/>
+      </filterset>
+    </copy>
+
+    <!-- split the path in 'item' XML elements -->
+    <replace file="${build.temp}/classpath-temp.xml"
+             token="${path.separator}" value="&lt;/item&gt;&#xA; &lt;item&gt;"/>
+    <!-- relativize file names by removing the current directory -->
+    <replace file="${build.temp}/classpath-temp.xml"
+             token="${user}${file.separator}" value=""/>
+    <!-- and in case that fails, remove the base directory -->
+    <replace file="${build.temp}/classpath-temp.xml"
+             token="${basedir}${file.separator}" value=""/>
+
+    <!-- replace platform-dependent path separator by '/' -->
+    <replace file="${build.temp}/classpath-temp.xml"
+             token="${file.separator}" value="/"/>
+
+    <!-- now build the .classpath file -->
+    <xslt in="${build.temp}/classpath-temp.xml" out="${basedir}/.classpath"
+          processor="trax"
+          style="tools/eclipse/make-classpath.xsl">
+     <param name="exportlib" expression="${ide.eclipse.export.libs}"/>
+     <param name="lenyaProjectName" expression="${projectDescription.name}"/>
+    </xslt>
+
+    <!-- copy the project file (expand version) -->
+    <copy file="tools/eclipse/project"
+          tofile="${basedir}/.project"
+          filtering="yes"
+          overwrite="yes">
+      <filterset>
+        <filter token="PROJECT_NAME" value="${project.name}"/>
+        <filter token="LENYA_PROJECT" value="${projectDescription.name}"/>
+        <filter token="VERSION" value="${version}"/>
+      </filterset>
+    </copy>
+  </target>
+
+</project>

Added: lenya/docu/tools/targets/properties-build.xml
URL: http://svn.apache.org/viewvc/lenya/docu/tools/targets/properties-build.xml?rev=648828&view=auto
==============================================================================
--- lenya/docu/tools/targets/properties-build.xml (added)
+++ lenya/docu/tools/targets/properties-build.xml Wed Apr 16 13:15:14 2008
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<!--
+  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.
+-->
+
+<project name="lenya-docu-properties">
+
+  <description>
+    Properties Targets
+  </description>
+
+  <!-- Set up some global properties -->
+  <!--
+  Give user a chance to override without editing build.properties
+  (local.build.properties takes precedence)
+  -->
+  <property file="local.build.properties"/>
+  <property file="build.properties"/>
+
+  <condition property="local.properties.in.sync">
+    <equals arg1="${build.properties.version}" arg2="594644"/>
+  </condition>
+
+  <fail unless="local.properties.in.sync" message="It seems that your local.build.properties is NOT in sync with build.properties! The file build.properties has probably been modified by some Apache Lenya developer. Re-copy build.properties to local.build.properties and re-set your local properties to get the two files back in sync. Please apologize any inconvenience."/>
+
+  <!-- Project version and name -->
+  <property name="version" value="1.0-dev"/>
+  <property name="lenya.revision" value="xxxxxx"/>
+  <property name="fullname" value="${ant.project.name}-${version}"/>
+  <property name="distname" value="apache-${ant.project.name}-${version}"/>
+  <property name="project.name"     value="Lenya Documentation"/>
+  <property name="year"     value="1999-2008"/>
+
+  <property name="build.temp" value="build/temp"/>
+
+</project>
+



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org