org.codehaus.mojo.enforcer.Dependency Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of extra-enforcer-rules Show documentation
Show all versions of extra-enforcer-rules Show documentation
Extra Enforcer Rules. These are extra rules for Apache Maven's Enforcer Plugin.
package org.codehaus.mojo.enforcer;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/
/**
* Dependency class.
*
* @version $Id: $
*/
public class Dependency
{
private String groupId;
private String artifactId;
private String classifier;
private String type;
/**
* List of classes to ignore. Wildcard at the end accepted
*/
private String[] ignoreClasses;
/**
* Getter for the field groupId
.
*
* @return a {@link java.lang.String} object.
*/
public String getGroupId()
{
return groupId;
}
/**
* Setter for the field groupId
.
*
* @param groupId a {@link java.lang.String} object.
*/
public void setGroupId( String groupId )
{
this.groupId = groupId;
}
/**
* Getter for the field artifactId
.
*
* @return a {@link java.lang.String} object.
*/
public String getArtifactId()
{
return artifactId;
}
/**
* Setter for the field artifactId
.
*
* @param artifactId a {@link java.lang.String} object.
*/
public void setArtifactId( String artifactId )
{
this.artifactId = artifactId;
}
/**
* Getter for the field classifier
.
*
* @return a {@link java.lang.String} object.
*/
public String getClassifier()
{
return classifier;
}
/**
* Setter for the field classifier
.
*
* @param classifier a {@link java.lang.String} object.
*/
public void setClassifier( String classifier )
{
this.classifier = classifier;
}
/**
* Getter for the field type
.
*
* @return a {@link java.lang.String} object.
*/
public String getType()
{
return type;
}
/**
* Setter for the field type
.
*
* @param type a {@link java.lang.String} object.
*/
public void setType( String type )
{
this.type = type;
}
/**
* Getter for the field ignoreClasses
.
*
* @return an array of {@link java.lang.String} objects.
*/
public String[] getIgnoreClasses()
{
return ignoreClasses;
}
/**
* Setter for the field ignoreClasses
.
*
* @param ignoreClasses an array of {@link java.lang.String} objects.
*/
public void setIgnoreClasses( String[] ignoreClasses )
{
this.ignoreClasses = ignoreClasses;
}
/** {@inheritDoc} */
@Override
public String toString()
{
StringBuffer sb = new StringBuffer();
sb.append( groupId ).append( ':' ).append( artifactId ).append( ':' ).append( type );
if ( classifier != null )
{
sb.append( ':' ).append( classifier );
}
return sb.toString();
}
}