1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one 3 * or more contributor license agreements. See the NOTICE file 4 * distributed with this work for additional information 5 * regarding copyright ownership. The ASF licenses this file 6 * to you under the Apache License, Version 2.0 (the 7 * "License"); you may not use this file except in compliance 8 * with the License. You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, 13 * software distributed under the License is distributed on an 14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 * KIND, either express or implied. See the License for the 16 * specific language governing permissions and limitations 17 * under the License. 18 */ 19 package org.apache.maven.plugins.war.overlay; 20 21 import org.apache.maven.artifact.Artifact; 22 import org.apache.maven.plugins.war.Overlay; 23 24 /** 25 * A default overlay implementation based on an {@link Artifact}. 26 * 27 * @author Stephane Nicoll 28 */ 29 public class DefaultOverlay extends Overlay { 30 31 /** 32 * Creates an overlay for the specified artifact. 33 * 34 * @param a the artifact 35 */ 36 public DefaultOverlay(Artifact a) { 37 super(); 38 setGroupId(a.getGroupId()); 39 setArtifactId(a.getArtifactId()); 40 setClassifier(a.getClassifier()); 41 setArtifact(a); 42 setType(a.getType()); 43 } 44 45 /** 46 * Creates an overlay for the specified artifact. 47 * 48 * @param a the artifact 49 * @param includes the includes to use 50 * @param excludes the excludes to use 51 */ 52 public DefaultOverlay(Artifact a, String[] includes, String[] excludes) { 53 this(a); 54 setIncludes(includes); 55 setExcludes(excludes); 56 } 57 }