avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject cvs commit: avalon/maven-plugins/versioning project.properties project.xml
Date Sat, 17 Apr 2004 10:22:50 GMT
niclas      2004/04/17 03:22:50

  Modified:    maven-plugins/versioning project.properties project.xml
  Added:       maven-plugins README.txt index.ent maven.xml
                        project-common.xml
               maven-plugins/merlin .cvsignore build.xml copy-all.xsl
                        index.ent maven.xml merlin.properties plugin.jelly
                        plugin.properties project.properties project.xml
               maven-plugins/merlin/src/java/org/apache/avalon/plugins/merlin
                        MerlinBean.java package.html
               maven-plugins/merlin/xdocs changes.xml goals.xml index.xml
                        navigation.xml properties.xml
  Removed:     maven-plugins project.xml
  Log:
  Required index.ent for multiproject builds.
  
  Revision  Changes    Path
  1.1                  avalon/maven-plugins/README.txt
  
  Index: README.txt
  ===================================================================
  
  Avalon Plug-ins for Maven
  =========================
  
  To build all Plug-ins, just type
  
    maven
    
  in the this directory.
  
  All the plugins will be built and installed into your Maven installation.
  
  
  Copyright 2004, The Apache Software Foundation, Avalon Development Team.'
  All rights reserved.
  
  
  
  1.1                  avalon/maven-plugins/index.ent
  
  Index: index.ent
  ===================================================================
  <!-- 
  
   Copyright 2001-2004 The Apache Software Foundation.
   
   Licensed 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.
   -->
  
  <!ENTITY % merlin-entities SYSTEM "file:../versioning/avalon-merlin.ent"> %merlin-entities;
  <!ENTITY % meta-entities SYSTEM "file:../versioning/avalon-meta.ent"> %meta-entities;
  <!ENTITY % repo-entities SYSTEM "file:../versioning/avalon-repository.ent"> %repo-entities;
  <!ENTITY % util-entities SYSTEM "file:../versioning/avalon-util.ent"> %util-entities;
  <!ENTITY % logging-entities SYSTEM "file:../versioning/avalon-logging.ent"> %logging-entities;
  
  
  
  1.1                  avalon/maven-plugins/maven.xml
  
  Index: maven.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8" ?>
  <!-- 
  
   Copyright 2001-2004 The Apache Software Foundation.
   
   Licensed 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 default="multiproject:install">
  
  </project>
  
  
  
  1.1                  avalon/maven-plugins/project-common.xml
  
  Index: project-common.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <!-- 
  /*
   * Copyright 2001-2004 The Apache Software Foundation.
   * 
   * Licensed 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>
  
    <pomVersion>3</pomVersion>
    
    <name>Avalon Maven Plugins</name>
    <groupId>avalon-maven-plugins</groupId>
    
    <organization>
      <name>Apache Software Foundation</name>
      <url>http://www.apache.org/</url>
      <logo>http://avalon.apache.org/images/apache-avalon-logo.png</logo>
    </organization>
    <inceptionYear>2004</inceptionYear>
    <package>org.apache.avalon.plugins</package>
  
    <issueTrackingUrl>http://issues.apache.org/jira/secure/BrowseProject.jspa?id=10423</issueTrackingUrl>
    <siteAddress>avalon.apache.org</siteAddress>
    <siteDirectory>/www/avalon.apache.org/maven-plugins/</siteDirectory>
    <distributionDirectory>/www/www.apache.org/dist/avalon/</distributionDirectory>
  
    <repository>
      <connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:avalon/maven-plugins/</connection>
      <developerConnection>scm:cvs:ext:${maven.username}@cvs.apache.org:/home/cvs:avalon/maven-plugins/</developerConnection>
      <url>http://cvs.apache.org/viewcvs/avalon/maven-plugins/</url>
    </repository>
    
    <mailingLists>
      <mailingList>
        <name>Avalon Developer List</name>
        <subscribe>dev-subscribe@avalon.apache.org</subscribe>
        <unsubscribe>dev-unsubscribe@avalon.apache.org</unsubscribe>
        <archive>http://nagoya.apache.org/eyebrowse/SummarizeList?listName=dev@avalon.apache.org</archive>
      </mailingList>
      <mailingList>
        <name>Avalon User List</name>
        <subscribe>users-subscribe@avalon.apache.org</subscribe>
        <unsubscribe>users-unsubscribe@avalon.apache.org</unsubscribe>
        <archive>http://nagoya.apache.org/eyebrowse/SummarizeList?listName=users@avalon.apache.org</archive>
      </mailingList>
      <mailingList>
        <name>CVS List</name>
        <subscribe>cvs-subscribe@avalon.apache.org</subscribe>
        <unsubscribe>cvs-unsubscribe@avalon.apache.org</unsubscribe>
      </mailingList>
    </mailingLists>
  
    <developers>
      <developer>
        <name>Niclas Hedhman</name>
        <id>niclas</id>
        <email>niclas@apache.org</email>
        <organization>http://www.bali.ac</organization>
        <roles>
          <role>Java Developer</role>
        </roles>
        <timezone>+0800</timezone>
      </developer>
    </developers>
  
    <build>
      <sourceDirectory>src/java</sourceDirectory>
      <unitTestSourceDirectory>src/test</unitTestSourceDirectory>
  
      <unitTest>
        <includes>
          <include>**/*Test.java</include>
        </includes>
      </unitTest>
  
      <resources>
        <resource>
          <directory>..</directory>
          <targetPath>META-INF</targetPath>
          <includes>
            <include>NOTICE.txt</include>
          </includes>
        </resource>
        <resource>
          <directory>src/plugin-resources</directory>
          <targetPath>plugin-resources</targetPath>
        </resource>
        <resource>
          <directory>.</directory>
          <includes>
            <include>plugin.jelly</include>
            <include>plugin.properties</include>
            <include>project.properties</include>
            <include>project.xml</include>
          </includes>
        </resource>
      </resources>
    </build>
    
    <reports>
      <report>maven-jdepend-plugin</report>
      <report>maven-checkstyle-plugin</report>
      <report>maven-changes-plugin</report>
      <report>maven-changelog-plugin</report>
      <report>maven-file-activity-plugin</report>
      <report>maven-developer-activity-plugin</report>
      <report>maven-javadoc-plugin</report>
      <report>maven-jxr-plugin</report>
      <report>maven-junit-report-plugin</report>
      <report>maven-tasklist-plugin</report>
      <report>maven-jellydoc-plugin</report>
      <report>maven-pmd-plugin</report>
      <report>maven-simian-plugin</report>
      <report>maven-faq-plugin</report>
      <report>maven-multiproject-plugin</report>
      <report>maven-multichanges-plugin</report>
    </reports>
  </project>
  
  
  
  1.1                  avalon/maven-plugins/merlin/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  target
  maven.log
  velocity.log
  snapshot.properties
  .classpath
  .project
  
  
  
  1.1                  avalon/maven-plugins/merlin/build.xml
  
  Index: build.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <!-- 
  
   Copyright 2001-2004 The Apache Software Foundation.
   
   Licensed 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 default="warning" name="Gump Build Support" basedir=".">
  
      <property file="${basedir}/project.properties"/>
      <property file="${basedir}/../project.properties"/>
  
      <target name="need-for-common-build" unless="avalon.buildsystem.available">
  <fail>
  ===================================================================
  BUILD SYSTEM FAILURE!
  ===================================================================
  
  a required file, ${avalon.buildsystem}/maven-common-gump-build.xml,
  cannot be found. Try setting the avalon.buildsystem property in
  project.properties to the correct location.
  </fail>
      </target>
  
  
      <target name="delegate">
          <available file="${avalon.buildsystem}/maven-common-gump-build.xml"
                  property="avalon.buildsystem.available"/>
          <antcall target="need-for-common-build"/>
  
          <ant inheritRefs="true" target="avalon:${target}" 
             antfile="${avalon.buildsystem}/maven-common-gump-build.xml" inheritAll="true"/>
      </target>
  
      <target name="warning">
          <antcall target="delegate">
              <param name="target" value="warning"/>
          </antcall>
      </target>
  
      <target name="jar">
          <antcall target="delegate">
              <param name="target" value="jar"/>
          </antcall>
      </target>
  
      <target name="javadocs">
          <antcall target="delegate">
              <param name="target" value="javadocs"/>
          </antcall>
      </target>
  
      <target name="dist">
          <antcall target="delegate">
              <param name="target" value="dist"/>
          </antcall>
      </target>
  
  </project>
  
  
  
  1.1                  avalon/maven-plugins/merlin/copy-all.xsl
  
  Index: copy-all.xsl
  ===================================================================
  <?xml version="1.0"?>
  <!-- 
  
   Copyright 2001-2004 The Apache Software Foundation.
   
   Licensed 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.
   -->
  
  <xsl:stylesheet version="1.0"
                  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
                  xmlns="http://www.w3.org/1999/xhtml">
  
   <xsl:template match="@*|*|text()|processing-instruction()" priority="-1">
    <xsl:copy>
     <xsl:apply-templates select="@*|*|text()|processing-instruction()"/>
    </xsl:copy>
   </xsl:template>
  </xsl:stylesheet>
  
  
  
  1.1                  avalon/maven-plugins/merlin/index.ent
  
  Index: index.ent
  ===================================================================
  <!-- 
  
   Copyright 2001-2004 The Apache Software Foundation.
   
   Licensed 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.
   -->
  
  <!ENTITY % merlin-entities SYSTEM "file:../../versioning/avalon-merlin.ent"> %merlin-entities;
  <!ENTITY % meta-entities SYSTEM "file:../../versioning/avalon-meta.ent"> %meta-entities;
  <!ENTITY % repo-entities SYSTEM "file:../../versioning/avalon-repository.ent"> %repo-entities;
  <!ENTITY % util-entities SYSTEM "file:../../versioning/avalon-util.ent"> %util-entities;
  <!ENTITY % logging-entities SYSTEM "file:../../versioning/avalon-logging.ent"> %logging-entities;
  
  
  
  1.1                  avalon/maven-plugins/merlin/maven.xml
  
  Index: maven.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8" ?>
  <!DOCTYPE project [
    <!ENTITY % index SYSTEM "file:index.ent"> %index;
  ]>
  <!-- 
  
   Copyright 2001-2004 The Apache Software Foundation.
   
   Licensed 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 default="plugin:install" xmlns:ant="jelly:ant">
  
    <postGoal name="java:compile">
      <ant:copy 
        file="merlin.properties" 
        toDir="${maven.build.dir}/classes" 
        verbose="yes"
        filtering="on"
      >
        <filterset>
          <filter token="MERLIN_IMPLEMENTATION" value="&merlin-impl-artifact;"/>
          <filter token="LOGGING_IMPLEMENTATION" value="&avalon-logging-logkit-artifact;"/>
          <filter token="STANDARD_RUNTIME" value="&avalon-activation-artifact;"/>
        </filterset>
      </ant:copy>
    </postGoal>
  
    <preGoal name="jar:jar">
      <mkdir dir="${maven.build.dir}/classes"/>
      <ant:xslt in="${basedir}/project.xml" out="${maven.build.dir}/classes/project.xml"
        style="${basedir}/copy-all.xsl">
        <outputproperty name="method" value="xml" />
        <outputproperty name="standalone" value="yes"/>
        <outputproperty name="indent" value="yes"/>
      </ant:xslt>
    </preGoal>
  
  </project>
  
  
  
  1.1                  avalon/maven-plugins/merlin/merlin.properties
  
  Index: merlin.properties
  ===================================================================
  
  #----------------------------------------------------------------------
  # static defaults for the merlin platform
  #----------------------------------------------------------------------
  
  #
  # The default avalon repository root directory. 
  #
  avalon.home = ${user.home}/.avalon
  
  #
  # merlin system implementation
  merlin.implementation = @MERLIN_IMPLEMENTATION@
  
  #
  # logging implementation
  merlin.logging.implementation = @LOGGING_IMPLEMENTATION@
  
  #
  # runtime implementation
  merlin.runtime.implementation = @STANDARD_RUNTIME@
  
  #
  # server mode
  merlin.server = true
  
  #
  # EOF
  #
  
  
  
  1.1                  avalon/maven-plugins/merlin/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  <?xml version="1.0" encoding="UTF-8" ?>
  <!-- 
  
   Copyright 2001-2004 The Apache Software Foundation.
   
   Licensed 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 xmlns:j="jelly:core"
    xmlns:define="jelly:define"
    xmlns:util="jelly:util"
    xmlns:maven="jelly:maven"
    xmlns:ant="jelly:ant"
    xmlns:log="jelly:log"
    xmlns:merlin="merlin">
  
    <define:taglib uri="merlin">
      <define:jellybean
        name="kernel"
        className="org.apache.avalon.plugins.merlin.MerlinBean"
        method="doExecute"/>
    </define:taglib>
  
    <goal name="merlin:deploy" prereqs="jar:jar"
        description="Deployment from ${maven.build.dir}/${maven.final.name}.jar">
      <j:set var="merlin.deployment" value="${maven.build.dir}/${maven.final.name}.jar"/>
      <util:file var="target" name="${merlin.deployment}"/>
      <j:if test="${target.exists()}">
         <attainGoal name="merlin:execute"/>
      </j:if>
    </goal>
  
    <goal name="merlin:simulate" prereqs="java:compile,java:jar-resources"
        description="Simulated deployment from ${maven.build.dir}/classes">
      <j:set var="merlin.deployment" value="${maven.build.dir}/classes"/>
      <util:file var="target" name="${merlin.deployment}"/>
      <j:if test="${target.exists()}">
         <attainGoal name="merlin:execute"/>
      </j:if>
    </goal>
  
    <goal name="merlin:test" prereqs="test:test"
        description="Simulated deployment from ${maven.build.dir}/test-classes">
      <j:set var="merlin.deployment" value="${maven.build.dir}/test-classes"/>
      <util:file var="target" name="${merlin.deployment}"/>
      <j:if test="${target.exists()}">
         <attainGoal name="merlin:execute"/>
      </j:if>
    </goal>
  
    <goal name="merlin:execute">
      <echo>Target: ${merlin.deployment}</echo>
      <merlin:kernel 
        hosts="${maven.repo.remote}"
        deployment="${merlin.deployment}"
        info="${merlin.info}"
        debug="${merlin.debug}"
      />
    </goal>
  
  </project>
  
  
  
  1.1                  avalon/maven-plugins/merlin/plugin.properties
  
  Index: plugin.properties
  ===================================================================
  # Copyright 2001-2004 The Apache Software Foundation.
  # 
  # Licensed 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.
  
  #----------------------------------------------------------------------
  # merlin system properties
  #----------------------------------------------------------------------
  #
  #
  # The default merlin system home directory. 
  # Default to MERLIN_HOME if defined, otherwise ${user.home}/.merlin
  #
  # merlin.home = ${user.home}/.merlin
  
  #
  # The default merlin system repository root directory. 
  # Normally defaults to ${merlin.home}/system but in the maven 
  # environment we default to 
  #
  # merlin.system = ${maven.repo.local}/repository
  
  #
  # The default common repository root directory. 
  # Normally defaults to ${avalon.home} but in a maven context
  # we default to ${maven.repo.local}/repository
  # 
  # merlin.repository = ${avalon.home}
  
  #
  # The default merlin system configuration root directory. 
  #
  # merlin.config = ${merlin.home}/config
  
  #
  # A url to the default location of the merlin kernel 
  # configuration file.
  #
  # merlin.kernel = file:///${merlin.config}/kernel.xml
  
  #
  #----------------------------------------------------------------------
  # merlin runtime properties
  #----------------------------------------------------------------------
  #
  #
  # The working directory.
  # If the system property ${basedir} is defined it will take priority.
  #
  # merlin.dir = ${user.dir}
  
  #
  # The partition root directory.  The partition root directory serves as 
  # the root anchor for the establishment of the directory supplied to a 
  # component via the urn:avalon:home context value.
  #
  # merlin.context = ${merlin.dir}/home
  
  #
  # The root anchor directory from which extension directory references
  # will be anchored to.
  #
  # merlin.ext = ${merlin.dir}
  
  #
  # The info generation policy.  If 'true' a short infomation header is 
  # generated on startup detailing the kernel parameterization state.
  #
  # merlin.info = false
  
  #
  # The debug generation policy.  If 'true' all logging channels are 
  # assigned the DEBUG logging priority.
  #
  # merlin.debug = false
  
  #
  # The default execution model.  If 'true' the merlin kernel will 
  # continue until expliciy stopped or process termination is invoked.
  # If 'false' the kernel will initiate decommissioning on completion
  # of the deployment phase.
  #
  # merlin.server = true
  
  
  
  
  
  
  1.1                  avalon/maven-plugins/merlin/project.properties
  
  Index: project.properties
  ===================================================================
  # Copyright 2001-2004 The Apache Software Foundation.
  # 
  # Licensed 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.
  
  
  #
  # Gump integration
  #
  project.name = merlin-plugin
  avalon.buildsystem = ${basedir}/../../buildsystem
  
  maven.xdoc.date=left
  maven.xdoc.version=${pom.currentVersion}
  maven.license.licenseFile=${basedir}/../../LICENSE.txt
  maven.checkstyle.header.file=${basedir}/../../LICENSE.txt
  maven.checkstyle.format = turbine
  
  maven.artifact.type=plugin
  
  
  
  1.1                  avalon/maven-plugins/merlin/project.xml
  
  Index: project.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <!DOCTYPE project [
    <!ENTITY % index SYSTEM "file:index.ent"> %index;
  ]>
  <!-- 
  
   Copyright 2001-2004 The Apache Software Foundation.
   
   Licensed 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>
  
    <extend>${basedir}/../project-common.xml</extend>
  
    <groupId>&merlin-plugin-id;</groupId>
    <id>&merlin-plugin-id;</id>
    <currentVersion>&merlin-plugin-version;</currentVersion>
    
    <pomVersion>3</pomVersion>
    <name>Merlin Plugin</name>
    <description>Merlin Plugin for Maven</description>
    <shortDescription>Merlin Plugin for Maven</shortDescription>
    <package>org.apache.avalon.plugins.merlin</package>
    
    <url>http://avalon.apache.org/plugins/merlin/</url>
    <siteDirectory>/www/avalon.apache.org/maven-plugins/merlin</siteDirectory>
  
    <dependencies>
  
      <dependency>
        <groupId>&avalon-repository-id;</groupId>
        <artifactId>&avalon-repository-main-id;</artifactId>
        <version>&avalon-repository-main-version;</version>
        <properties>
          <classloader>root</classloader>
        </properties>
      </dependency>
      
      <dependency>
        <groupId>&merlin-id;</groupId>
        <artifactId>&merlin-impl-id;</artifactId>
        <version>&merlin-impl-version;</version>
        <properties>
          <classloader>root</classloader>
        </properties>
      </dependency>
  
    </dependencies>
  </project>
  
  
  
  1.1                  avalon/maven-plugins/merlin/src/java/org/apache/avalon/plugins/merlin/MerlinBean.java
  
  Index: MerlinBean.java
  ===================================================================
  /* 
   * Copyright 2004 Apache Software Foundation
   * Licensed  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.
   */
  
  package org.apache.avalon.plugins.merlin;
  
  import java.io.File;
  import java.util.Map;
  import java.util.StringTokenizer;
  import java.util.ArrayList;
  
  import org.apache.avalon.repository.Artifact;
  import org.apache.avalon.repository.provider.Builder;
  import org.apache.avalon.repository.provider.InitialContext;
  import org.apache.avalon.repository.provider.InitialContextFactory;
  import org.apache.avalon.repository.provider.Factory;
  import org.apache.avalon.repository.main.DefaultInitialContextFactory;
  import org.apache.avalon.repository.main.DefaultBuilder;
  
  import org.apache.avalon.util.env.Env;
  import org.apache.avalon.util.exception.ExceptionHelper;
  
  /**
   * Test case that usages the repository builder to deploy the 
   * Merlin default application factory.
   * 
   * @author <a href="mailto:dev@avalon.apache.org">Avalon Development Team</a>
   * @version $Revision: 1.1 $
   */
  public class MerlinBean
  {
      //----------------------------------------------------------
      // static
      //----------------------------------------------------------
  
      private static final String MERLIN_PROPERTIES = "merlin.properties";
  
      private static final String IMPLEMENTATION_KEY = "merlin.implementation";
  
      //----------------------------------------------------------
      // immutable state
      //----------------------------------------------------------
  
      private String m_deployment;
  
      private String[] m_hosts;
  
      private String m_debug;
  
      private String m_info;
  
      //----------------------------------------------------------
      // setters
      //----------------------------------------------------------
  
     /**
      * Set the deployment path.
      */
      public void setDeployment( String path )
      {
          m_deployment = path;
      }
  
     /**
      * Set the deployment path.
      */
      public void setHosts( String path )
      {
          if( null != path )
          {
              m_hosts = expandHosts( path );
          }
      }
  
     /**
      * Set the debug policy.
      */
      public void setDebug( String policy )
      {
          m_debug = policy;
      }
  
     /**
      * Set the info policy.
      */
      public void setInfo( String policy )
      {
          m_info = policy;
      }
  
     /**
      * Establish the merlin kernel.
      */
      public void doExecute() throws Exception
      {
          ClassLoader classloader = MerlinBean.class.getClassLoader();
  
          try
          {
              File basedir = getBaseDirectory();
  
              InitialContextFactory initial = 
                new DefaultInitialContextFactory( "merlin", basedir );
              initial.setCacheDirectory( getMavenRepositoryDirectory() );
              initial.setHosts( m_hosts );
              InitialContext context = initial.createInitialContext();
  
              Artifact artifact = 
                DefaultBuilder.createImplementationArtifact( 
                  classloader, 
                  getMerlinHome(),
                  getBaseDirectory(), 
                  MERLIN_PROPERTIES, 
                  IMPLEMENTATION_KEY );
  
              Builder builder = context.newBuilder( artifact );
              Factory factory = builder.getFactory();
              Map criteria = factory.createDefaultCriteria();
  
              applyLocalProperties( criteria );
  
              factory.create( criteria );
          }
          catch( Throwable e )
          {
              final String error = ExceptionHelper.packException( e, true );
              System.out.println( error );
              throw new Exception( error );
          }
      }
  
      //----------------------------------------------------------------------
      // utilities
      //----------------------------------------------------------------------
  
      private void applyLocalProperties( Map criteria )
      {
          File repository = getMavenRepositoryDirectory();
  
          criteria.put( "merlin.repository", repository );
          criteria.put( "merlin.server", "false" );
          criteria.put( "merlin.code.security.enabled", "false" );
  
          if( m_deployment != null )
          {
              criteria.put( "merlin.deployment", m_deployment );
          }
  
          if( null != m_debug ) criteria.put( "merlin.debug", m_debug );
          if( null != m_info ) criteria.put( "merlin.info", m_info ); 
      }
  
      private static File getMavenRepositoryDirectory()
      {
          return new File( getMavenHome(), "repository" );
      }
  
      private static File getMavenHome()
      {
          try
          {
              String local = 
                System.getProperty( 
                  "maven.home.local", 
                  Env.getEnvVariable( "MAVEN_HOME_LOCAL" ) );
              if( null != local ) 
                return new File( local ).getCanonicalFile();
  
              return new File(
                System.getProperty( "user.home" ) 
                + File.separator 
                + ".maven" ).getCanonicalFile();
          }
          catch( Throwable e )
          {
              final String error = 
                "Internal error while attempting to access environment.";
              final String message = 
                ExceptionHelper.packException( error, e, true );
              throw new RuntimeException( message );
          }
      }
  
      private File getBaseDirectory()
      {
          final String base = System.getProperty( "basedir" );
          if( null != base )
          {
              return new File( base );
          }
          return new File( System.getProperty( "user.dir" ) );
      }
  
      private static String[] expandHosts( String arg )
      {
          ArrayList list = new ArrayList();
          StringTokenizer tokenizer = new StringTokenizer( arg, "," );
          while( tokenizer.hasMoreTokens() )
          {
              list.add( tokenizer.nextToken() );
          }
          return (String[]) list.toArray( new String[0] );
      }
  
     /**
      * Return the merlin home directory.
      * @return the merlin install directory
      */
      private static File getMerlinHome()
      {
          return new File( getMerlinHomePath() );
      }
  
     /**
      * Return the merlin home directory path.
      * @return the merlin install directory path
      */
      private static String getMerlinHomePath()
      {
          try
          {
              String merlin = 
                System.getProperty( 
                  "merlin.home", 
                  Env.getEnvVariable( "MERLIN_HOME" ) );
              if( null != merlin ) return merlin;
              return System.getProperty( "user.home" ) 
                + File.separator + ".merlin";
          }
          catch( Throwable e )
          {
              final String error = 
                "Internal error while attempting to access MERLIN_HOME environment.";
              final String message = 
                ExceptionHelper.packException( error, e, true );
              throw new RuntimeException( message );
          }
      }
  
  }
  
  
  
  
  1.1                  avalon/maven-plugins/merlin/src/java/org/apache/avalon/plugins/merlin/package.html
  
  Index: package.html
  ===================================================================
  <!-- 
  
   Copyright 2001-2004 The Apache Software Foundation.
   
   Licensed 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.
   -->
  
  <body>
  <p>
  The merlin tools package contains a Java Bean supporting an embedded Kernel and associated deployment jelly script.
  </p>
  </body>
  
  
  
  
  1.1                  avalon/maven-plugins/merlin/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <!-- 
  
   Copyright 2001-2004 The Apache Software Foundation.
   
   Licensed 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.
   -->
  
  <document>
    <properties>
      <title>Changes</title>
      <author email="niclas@apache.org">Niclas Hedhman</author>
    </properties>
    <body>
  <!--  
      <release version="1.4" date="2004-03-07">
        <action dev="dion" type="fix">Prefix basedir on copied ant build file. Only create ant build file if the project has source. Only copy maven.src.dir if it exists.</action>
        <action dev="dion" type="update">Moved properties out to plugin.properties</action>
        <action dev="dion" type="fix">add ${basedir} to ant build file being moved</action>
      </release>
  -->
    </body>
  </document>
  
  
  
  1.1                  avalon/maven-plugins/merlin/xdocs/goals.xml
  
  Index: goals.xml
  ===================================================================
  <?xml version="1.0"?>
  <!-- 
  
   Copyright 2001-2004 The Apache Software Foundation.
   
   Licensed 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.
   -->
  
  <document>
  
    <properties>
      <title>Avalon Versioning Maven Plug-in Goals</title>
      <author email="niclas@apache.org">Niclas Hedhman</author>
    </properties>
  
    <body>
      <goals>
        <goal>
          <name>merlin</name>
          <description>
            This is the default goal of the plugin and simply...
          </description>
        </goal>
        <goal>
          <name>merlin:deploy</name>
          <description>
          </description>
        </goal>
        <goal>
          <name>merlin:execute</name>
          <description>
          </description>
        </goal>
        <goal>
          <name>merlin:simulate</name>
          <description>
          </description>
        </goal>
        <goal>
          <name>merlin:test</name>
          <description>
          </description>
        </goal>
      </goals>
   </body>
  </document>
  
  
  
  1.1                  avalon/maven-plugins/merlin/xdocs/index.xml
  
  Index: index.xml
  ===================================================================
  <?xml version="1.0"?>
  <!-- 
  
   Copyright 2001-2004 The Apache Software Foundation.
   
   Licensed 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.
   -->
  
  <document>
  
    <properties>
      <title>Avalon Merlin Maven Plug-in</title>
      <author email="niclas@apache.org">Niclas Hedhman</author>
    </properties>
  
    <body>
      <section name="Avalon Merlin Maven Plug-in">
        <p>
          This plugin allows for starting Merlin from within Maven builds.
        </p>
      </section>
   </body>
  </document>
  
  
  
  1.1                  avalon/maven-plugins/merlin/xdocs/navigation.xml
  
  Index: navigation.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <!-- 
  
   Copyright 2001-2004 The Apache Software Foundation.
   
   Licensed 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="Avalon Merlin Maven Plugin">
  
    <title>Avalon Merlin Maven Plugin</title>
  
    <body>
      <links>
        <item name="Maven" href="http://maven.apache.org/"/>
      </links>
      <menu name="Overview">
        <item name="Goals"      href="goals.html" />
        <item name="Properties" href="properties.html" />
      </menu>
    </body>
  </project>
  
  
  
  1.1                  avalon/maven-plugins/merlin/xdocs/properties.xml
  
  Index: properties.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <!-- 
  
   Copyright 2001-2004 The Apache Software Foundation.
   
   Licensed 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.
   -->
  
  <document>
    <properties>
      <title>Versioning Properties</title>
      <author email="niclas@apache.org">Niclas Hedhman</author>
    </properties>
  
    <body>
      <section name="Versioning Settings">
        <subsection name="Merlin System Properties" >
         <table>
          <tr><th>Property</th><th>Default</th><th>Description</th></tr>
          <tr>
            <td>merlin.home</td>
            <td>MERLIN_HOME, then ${user.home}/.merlin</td>
            <td>
              The default merlin system home directory. 
              Default to MERLIN_HOME if defined, otherwise ${user.home}/.merlin
            </td>
          </tr> 
          <tr>
            <td>merlin.system</td>
            <td>${maven.repo.local}/repository</td>
            <td>
              The default merlin system repository root directory. 
              Normally defaults to ${merlin.home}/system but in the maven 
              environment we default to ${maven.repo.local}/repository
            </td>
          </tr> 
          <tr>
            <td>merlin.repository</td>
            <td>${avalon.home}</td>
            <td>
              The default common repository root directory. 
              Normally defaults to ${avalon.home} but in a maven context
              we default to ${maven.repo.local}/repository
            </td>
          </tr> 
          <tr>
            <td>merlin.config</td>
            <td>${merlin.home}/config</td>
            <td>
              The default merlin system configuration root directory.
            </td>
          </tr> 
          <tr>
            <td>merlin.kernel</td>
            <td>file:///${merlin.config}/kernel.xml</td>
            <td>
              A url to the default location of the merlin kernel 
              configuration file.
            </td>
          </tr> 
         </table>
        <subsection name="Merlin Runtime Properties" >
         <table>
          <tr><th>Property</th><th>Default</th><th>Description</th></tr>
          <tr>
            <td>merlin.dir</td>
            <td>${user.dir}</td>
            <td>
              The working directory.
              If the system property ${basedir} is defined it will take priority.
            </td>
          </tr> 
          <tr>
            <td>merlin.context</td>
            <td>${merlin.dir}/home</td>
            <td>
              The partition root directory.  The partition root directory serves
              as the root anchor for the establishment of the directory supplied 
              to a component via the urn:avalon:home context value.
            </td>
          </tr> 
          <tr>
            <td>merlin.ext</td>
            <td>${merlin.dir}</td>
            <td>
              The root anchor directory from which extension directory references
              will be anchored to.
            </td>
          </tr> 
          <tr>
            <td>merlin.info</td>
            <td>false</td>
            <td>
              The info generation policy.  If 'true' a short infomation header is
              generated on startup detailing the kernel parameterization state.
            </td>
          </tr> 
          <tr>
            <td>merlin.debug</td>
            <td>false</td>
            <td>
              The debug generation policy.  If 'true' all logging channels are 
              assigned the DEBUG logging priority.
            </td>
          </tr> 
          <tr>
            <td>merlin.server</td>
            <td>true</td>
            <td>
              The default execution model.  If 'true' the merlin kernel will 
              continue until expliciy stopped or process termination is invoked.
              If 'false' the kernel will initiate decommissioning on completion
              of the deployment phase.
            </td>
          </tr> 
        </table>
      </section>
    </body>
  </document>
  
  
  
  
  1.2       +2 -0      avalon/maven-plugins/versioning/project.properties
  
  Index: project.properties
  ===================================================================
  RCS file: /home/cvs/avalon/maven-plugins/versioning/project.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- project.properties	14 Apr 2004 06:48:17 -0000	1.1
  +++ project.properties	17 Apr 2004 10:22:50 -0000	1.2
  @@ -24,3 +24,5 @@
   maven.checkstyle.format = turbine
   
   maven.junit.fork=yes
  +
  +maven.artifact.type=plugin
  
  
  
  1.4       +1 -1      avalon/maven-plugins/versioning/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/avalon/maven-plugins/versioning/project.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- project.xml	17 Apr 2004 09:58:22 -0000	1.3
  +++ project.xml	17 Apr 2004 10:22:50 -0000	1.4
  @@ -20,7 +20,7 @@
   
   <project>
     <extend>../project-common.xml</extend>
  -  <groupId>avalon-versioning-plugin</groupdId>
  +  <groupId>avalon-versioning-plugin</groupId>
     <id>avalon-versioning-plugin</id>
     <name>Avalon Versioning Maven Plugin</name>
     <currentVersion>1.0.dev-6</currentVersion>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message