diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/handler/JavadocHandler.java b/maven-artifact/src/main/java/org/apache/maven/artifact/handler/JavadocHandler.java new file mode 100644 index 0000000000..0e349e231b --- /dev/null +++ b/maven-artifact/src/main/java/org/apache/maven/artifact/handler/JavadocHandler.java @@ -0,0 +1,44 @@ +/* + * 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 Carlos Sanchez + * @version $Id$ + */ +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"; + } +} \ No newline at end of file diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/handler/WarHandler.java b/maven-artifact/src/main/java/org/apache/maven/artifact/handler/WarHandler.java new file mode 100644 index 0000000000..68cbe9a9e4 --- /dev/null +++ b/maven-artifact/src/main/java/org/apache/maven/artifact/handler/WarHandler.java @@ -0,0 +1,35 @@ +/* + * 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 Carlos Sanchez + * @version $Id$ + */ +public class WarHandler + extends AbstractArtifactHandler +{ + public String extension() + { + return "war"; + } + + public String directory() + { + return "wars"; + } +}