maven-m2-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdca...@apache.org
Subject cvs commit: maven-components/maven-archetype/maven-archetypes/maven-archetype-marmalade-mojo/src/main/resources/META-INF archetype.xml
Date Thu, 07 Apr 2005 21:25:01 GMT
jdcasey     2005/04/07 14:25:01

  Added:       maven-archetype/maven-archetypes/maven-archetype-marmalade-mojo
                        pom.xml
               maven-archetype/maven-archetypes/maven-archetype-marmalade-mojo/src/main/resources/archetype-resources/src/main/resources/META-INF/marmalade
                        myMojo.def
               maven-archetype/maven-archetypes/maven-archetype-marmalade-mojo/src/main/resources/archetype-resources/src/main/java
                        MyMojoTagLibrary.java CopyFileTag.java
               maven-archetype/maven-archetypes/maven-archetype-marmalade-mojo/src/main/resources/archetype-resources/src/main/resources
                        myMojo.mmld
               maven-archetype/maven-archetypes/maven-archetype-marmalade-mojo/src/main/resources/archetype-resources
                        pom.xml
               maven-archetype/maven-archetypes/maven-archetype-marmalade-mojo/src/main/resources/META-INF
                        archetype.xml
  Log:
  o Adding archetype for marmalade-mojo creation. this hasn't been thoroughly tested yet,
because of a bug in model caching within the DefaultMavenProjectBuilder
  
  Revision  Changes    Path
  1.1                  maven-components/maven-archetype/maven-archetypes/maven-archetype-marmalade-mojo/pom.xml
  
  Index: pom.xml
  ===================================================================
  <model>
    <parent>
      <artifactId>maven-archetypes</artifactId>
      <groupId>org.apache.maven.archetypes</groupId>
      <version>1.0-alpha-1-SNAPSHOT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>maven-archetype-marmalade-mojo</artifactId>
    <packaging>jar</packaging>
    <version>1.0-alpha-1-SNAPSHOT</version>
  </model>
  
  
  
  1.1                  maven-components/maven-archetype/maven-archetypes/maven-archetype-marmalade-mojo/src/main/resources/archetype-resources/src/main/resources/META-INF/marmalade/myMojo.def
  
  Index: myMojo.def
  ===================================================================
  ${package}.MyMojoTagLibrary
  
  
  1.1                  maven-components/maven-archetype/maven-archetypes/maven-archetype-marmalade-mojo/src/main/resources/archetype-resources/src/main/java/MyMojoTagLibrary.java
  
  Index: MyMojoTagLibrary.java
  ===================================================================
  package $package;
  
  /*
   * Copyright 2001-2005 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.
   */
  
  import org.codehaus.marmalade.metamodel.AbstractMarmaladeTagLibrary;
  
  /**
   * @author jdcasey
   */
  public class MyMojoTagLibrary
      extends AbstractMarmaladeTagLibrary
  {
      
      public MyMojoTagLibrary()
      {
          registerTag( "copyFile", CopyFileTag.class );
      }
  
  }
  
  
  
  1.1                  maven-components/maven-archetype/maven-archetypes/maven-archetype-marmalade-mojo/src/main/resources/archetype-resources/src/main/java/CopyFileTag.java
  
  Index: CopyFileTag.java
  ===================================================================
  package $package;
  
  /*
   * Copyright 2001-2005 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.
   */
  
  import org.codehaus.marmalade.model.AbstractMarmaladeTag;
  import org.codehaus.marmalade.runtime.MarmaladeExecutionContext;
  import org.codehaus.marmalade.runtime.MarmaladeExecutionException;
  
  /**
   * @author jdcasey
   */
  public class CopyFileTag
      extends AbstractMarmaladeTag
  {
  
      protected void doExecute(MarmaladeExecutionContext context)
      throws MarmaladeExecutionException
      {
          
      }
      
  }
  
  
  
  1.1                  maven-components/maven-archetype/maven-archetypes/maven-archetype-marmalade-mojo/src/main/resources/archetype-resources/src/main/resources/myMojo.mmld
  
  Index: myMojo.mmld
  ===================================================================
  <?xml version="1.0"?>
  
  <mojo xmlns="marmalade:mojo">
    <metadata>
      <id>myMojo</id>
      <goal>myMojo</goal>
      <description>Output a file with specified contents to [outputDirectory]/touch.txt</description>
      <parameters>
        <parameter>
          <name>outputDirectory</name>
          <expression>#project.build.directory</expression>
          <description>Output directory for files.</description>
        </parameter>
      </parameters>
    </metadata>
    <execute>
      <io:file xmlns:io="marmalade:io" path="${outputDirectory}/touch.txt" mkdirs="true">touch.txt</io:file>
      <m:copyFile xmlns:m="marmalade:myMojo" source="${outputDirectory}/touch.txt" target="${outputDirectory}/touch2.txt"/>
    </execute>
  </mojo>
  
  
  1.1                  maven-components/maven-archetype/maven-archetypes/maven-archetype-marmalade-mojo/src/main/resources/archetype-resources/pom.xml
  
  Index: pom.xml
  ===================================================================
  <model>
    <modelVersion>4.0.0</modelVersion>
    <groupId>${groupId}</groupId>
    <artifactId>${artifactId}</artifactId>
    <packaging>maven-plugin</packaging>
    <version>${version}</version>
    <dependencies>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-plugin</artifactId>
        <version>2.0-SNAPSHOT</version>
      </dependency>
  
      <dependency>
        <groupId>marmalade</groupId>
        <artifactId>marmalade-core</artifactId>
        <version>1.0-alpha-2</version>
      </dependency>
  
      <dependency>
        <groupId>marmalade</groupId>
        <artifactId>marmalade-el-commons</artifactId>
        <version>1.0-alpha-2</version>
      </dependency>
      
      <dependency>
        <groupId>marmalade</groupId>
        <artifactId>marmalade-tags-io</artifactId>
        <version>1.0-alpha-2</version>
      </dependency>
    </dependencies>
    <build>
      <scriptSourceDirectory>src/main/resources</scriptSourceDirectory>
    </build>
  </model>
  
  
  
  1.1                  maven-components/maven-archetype/maven-archetypes/maven-archetype-marmalade-mojo/src/main/resources/META-INF/archetype.xml
  
  Index: archetype.xml
  ===================================================================
  <archetype>
    <id>mmld-plugin</id>
    <sources>
      <source>src/main/java/CopyFileTag.java</source>
      <source>src/main/java/MyMojoTagLibrary.java</source>
    </sources>
    <resources>
      <resource>src/main/resources/META-INF/marmalade/myMojo.def</resource>
      <resource>src/main/resources/myMojo.mmld</resource>
    </resources>
  </archetype>
  
  
  

Mime
View raw message