You are viewing a plain text version of this content. The canonical link for it is here.
Posted to m2-dev@maven.apache.org by ca...@apache.org on 2005/01/10 22:45:00 UTC

cvs commit: maven-components/maven-artifact/src/main/java/org/apache/maven/artifact/handler JavadocHandler.java WarHandler.java

carlos      2005/01/10 13:45:00

  Added:       maven-artifact/src/main/java/org/apache/maven/artifact/handler
                        JavadocHandler.java WarHandler.java
  Log:
  Added javadoc and war handlers
  
  Revision  Changes    Path
  1.1                  maven-components/maven-artifact/src/main/java/org/apache/maven/artifact/handler/JavadocHandler.java
  
  Index: JavadocHandler.java
  ===================================================================
  /*
   * 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.
   */
  
  package org.apache.maven.artifact.handler;
  
  import org.apache.maven.artifact.Artifact;
  
  import java.io.File;
  
  /**
   * @author <a href="mailto:carlos@apache.org">Carlos Sanchez </a>
   * @version $Id: JavadocHandler.java,v 1.1 2005/01/10 21:45:00 carlos Exp $
   */
  public class JavadocHandler
      extends AbstractArtifactHandler
  {
      public File source( String basedir, Artifact artifact )
      {
          return new File( basedir, artifact.getArtifactId() + "-" + artifact.getVersion() + "-javadocs." + extension() );
      }
  
      public String extension()
      {
          return "jar";
      }
  
      public String directory()
      {
          return "javadocs";
      }
  }
  
  
  1.1                  maven-components/maven-artifact/src/main/java/org/apache/maven/artifact/handler/WarHandler.java
  
  Index: WarHandler.java
  ===================================================================
  /*
   * 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.
   */
  
  package org.apache.maven.artifact.handler;
  
  /**
   * @author <a href="mailto:carlos@apache.org">Carlos Sanchez</a>
   * @version $Id: WarHandler.java,v 1.1 2005/01/10 21:45:00 carlos Exp $
   */
  public class WarHandler
      extends AbstractArtifactHandler
  {
      public String extension()
      {
          return "war";
      }
  
      public String directory()
      {
          return "wars";
      }
  }