Tabnine Logo
ArchivaProjectModel
Code IndexAdd Tabnine to your IDE (free)

How to use
ArchivaProjectModel
in
org.apache.maven.archiva.model

Best Java code snippets using org.apache.maven.archiva.model.ArchivaProjectModel (Showing top 19 results out of 315)

origin: org.apache.maven.archiva/archiva-model

public static ArchivaProjectModel clone( ArchivaProjectModel model )
{
  if ( model == null )
  {
    return null;
  }
  ArchivaProjectModel cloned = new ArchivaProjectModel();
  cloned.setGroupId( model.getGroupId() );
  cloned.setArtifactId( model.getArtifactId() );
  cloned.setVersion( model.getVersion() );
  cloned.setParentProject( clone( model.getParentProject() ) );
  cloned.setName( model.getName() );
  cloned.setDescription( model.getDescription() );
  cloned.setUrl( model.getUrl() );
  cloned.setPackaging( model.getPackaging() );
  cloned.setOrigin( model.getOrigin() );
  cloned.setMailingLists( cloneMailingLists( model.getMailingLists() ) );
  cloned.setCiManagement( clone( model.getCiManagement() ) );
  cloned.setIndividuals( cloneIndividuals( model.getIndividuals() ) );
  cloned.setIssueManagement( clone( model.getIssueManagement() ) );
  cloned.setLicenses( cloneLicenses( model.getLicenses() ) );
  cloned.setOrganization( clone( model.getOrganization() ) );
  cloned.setScm( clone( model.getScm() ) );
  cloned.setRepositories( cloneRepositories( model.getRepositories() ) );
  cloned.setDependencies( cloneDependencies( model.getDependencies() ) );
  cloned.setPlugins( clonePlugins( model.getPlugins() ) );
  cloned.setReports( cloneReports( model.getReports() ) );
  cloned.setDependencyManagement( cloneDependencies( model.getDependencyManagement() ) );
  return cloned;
}
origin: org.apache.maven.archiva/archiva-model

public static String toKey( ArchivaProjectModel model )
{
  return toKey( model.getGroupId(), model.getArtifactId(), model.getVersion() );
}

origin: org.apache.maven.archiva/archiva-database-consumers

private void appendModel( StringBuffer buf, ArchivaProjectModel model )
{
  buf.append( "groupId:" ).append( model.getGroupId() );
  buf.append( "|artifactId:" ).append( model.getArtifactId() );
  buf.append( "|version:" ).append( model.getVersion() );
  buf.append( "|packaging:" ).append( model.getPackaging() );
}
origin: org.apache.archiva/archiva-dependency-graph

  private ArchivaProjectModel createDefaultModel( ArtifactReference reference )
  {
    ArchivaProjectModel model = new ArchivaProjectModel();

    // Create default (dummy) model
    model = new ArchivaProjectModel();
    model.setGroupId( reference.getGroupId() );
    model.setArtifactId( reference.getArtifactId() );
    model.setVersion( reference.getVersion() );
    model.setPackaging( reference.getType() );
    return model;
  }
}
origin: org.apache.archiva/archiva-database-consumers

if ( !artifact.getArtifactId().equalsIgnoreCase( model.getArtifactId() ) )
  emsg.append( " has an invalid project model [" );
  appendModel( emsg, model );
  emsg.append( "]: The model artifactId [" ).append( model.getArtifactId() );
  emsg.append( "] does not match the artifactId portion of the filename: " ).append( artifact.getArtifactId() );
if ( !artifact.getVersion().equalsIgnoreCase( model.getVersion() ) &&
  !VersionUtil.getBaseVersion( artifact.getVersion() ).equalsIgnoreCase( model.getVersion() ) )
  emsg.append( " has an invalid project model [" );
  appendModel( emsg, model );
  emsg.append( "]; The model version [" ).append( model.getVersion() );
  emsg.append( "] does not match the version portion of the filename: " ).append( artifact.getVersion() );
origin: org.apache.maven.archiva/archiva-database-consumers

model.setOrigin( "filesystem" );
  model.setVersion( artifact.getVersion() );
origin: org.apache.archiva/archiva-dependency-graph

if ( model.getRelocation() != null )
  refTO.setType( fromNode.getArtifact().getType() );
  VersionedReference relocation = model.getRelocation();
if ( CollectionUtils.isNotEmpty( model.getDependencyManagement() ) )
  for ( Dependency dependency : model.getDependencyManagement() )
if ( CollectionUtils.isNotEmpty( model.getDependencies() ) )
  for ( Dependency dependency : model.getDependencies() )
origin: org.apache.archiva/archiva-database-consumers

model.setVersion( artifact.getVersion() );
origin: org.apache.maven.archiva/archiva-model

/**
 * Method addDependency
 * 
 * @param dependency
 */
public void addDependency(Dependency dependency)
{
  if ( !(dependency instanceof Dependency) )
  {
    throw new ClassCastException( "ArchivaProjectModel.addDependencies(dependency) parameter must be instanceof " + Dependency.class.getName() );
  }
  getDependencies().add( dependency );
} //-- void addDependency(Dependency) 
origin: org.apache.maven.archiva/archiva-model

/**
 * Method addDependencyManagement
 * 
 * @param dependency
 */
public void addDependencyManagement(Dependency dependency)
{
  if ( !(dependency instanceof Dependency) )
  {
    throw new ClassCastException( "ArchivaProjectModel.addDependencyManagement(dependency) parameter must be instanceof " + Dependency.class.getName() );
  }
  getDependencyManagement().add( dependency );
} //-- void addDependencyManagement(Dependency) 
origin: org.apache.archiva/archiva-database-consumers

  private String toProjectKey( ArchivaProjectModel project )
  {
    StringBuilder key = new StringBuilder();

    key.append( project.getGroupId() ).append( ":" );
    key.append( project.getArtifactId() ).append( ":" );
    key.append( project.getVersion() );

    return key.toString();
  }
}
origin: org.apache.archiva/archiva-database-consumers

private void appendModel( StringBuffer buf, ArchivaProjectModel model )
{
  buf.append( "groupId:" ).append( model.getGroupId() );
  buf.append( "|artifactId:" ).append( model.getArtifactId() );
  buf.append( "|version:" ).append( model.getVersion() );
  buf.append( "|packaging:" ).append( model.getPackaging() );
}
origin: org.apache.maven.archiva/archiva-database-consumers

if ( !artifact.getArtifactId().equalsIgnoreCase( model.getArtifactId() ) )
  emsg.append( " has an invalid project model [" );
  appendModel( emsg, model );
  emsg.append( "]: The model artifactId [" ).append( model.getArtifactId() );
  emsg.append( "] does not match the artifactId portion of the filename: " ).append( artifact.getArtifactId() );
if ( !artifact.getVersion().equalsIgnoreCase( model.getVersion() ) &&
  !VersionUtil.getBaseVersion( artifact.getVersion() ).equalsIgnoreCase( model.getVersion() ) )
  emsg.append( " has an invalid project model [" );
  appendModel( emsg, model );
  emsg.append( "]; The model version [" ).append( model.getVersion() );
  emsg.append( "] does not match the version portion of the filename: " ).append( artifact.getVersion() );
origin: org.apache.maven.archiva/archiva-model

/**
 * Method removeDependency
 * 
 * @param dependency
 */
public void removeDependency(Dependency dependency)
{
  if ( !(dependency instanceof Dependency) )
  {
    throw new ClassCastException( "ArchivaProjectModel.removeDependencies(dependency) parameter must be instanceof " + Dependency.class.getName() );
  }
  getDependencies().remove( dependency );
} //-- void removeDependency(Dependency) 
origin: org.apache.maven.archiva/archiva-model

/**
 * Method removeDependencyManagement
 * 
 * @param dependency
 */
public void removeDependencyManagement(Dependency dependency)
{
  if ( !(dependency instanceof Dependency) )
  {
    throw new ClassCastException( "ArchivaProjectModel.removeDependencyManagement(dependency) parameter must be instanceof " + Dependency.class.getName() );
  }
  getDependencyManagement().remove( dependency );
} //-- void removeDependencyManagement(Dependency) 
origin: org.apache.maven.archiva/archiva-model

/**
 * Method equals
 * 
 * @param other
 */
public boolean equals(Object other)
{
  if ( this == other)
  {
    return true;
  }
  
  if ( !(other instanceof ArchivaProjectModel) )
  {
    return false;
  }
  
  ArchivaProjectModel that = (ArchivaProjectModel) other;
  boolean result = true;
  result = result && ( getGroupId() == null ? that.getGroupId() == null : getGroupId().equals( that.getGroupId() ) );
  result = result && ( getArtifactId() == null ? that.getArtifactId() == null : getArtifactId().equals( that.getArtifactId() ) );
  result = result && ( getVersion() == null ? that.getVersion() == null : getVersion().equals( that.getVersion() ) );
  return result;
} //-- boolean equals(Object) 
origin: org.apache.archiva/archiva-database-consumers

private String toProjectKey( ArchivaProjectModel project )
{
  StringBuilder key = new StringBuilder();
  key.append( project.getGroupId() ).append( ":" );
  key.append( project.getArtifactId() ).append( ":" );
  key.append( project.getVersion() );
  return key.toString();
}
origin: org.apache.maven.archiva/archiva-model

/**
 * Method toString
 */
public java.lang.String toString()
{
  StringBuffer buf = new StringBuffer();
  buf.append( "groupId = '" );
  buf.append( getGroupId() + "'" );
  buf.append( "\n" ); 
  buf.append( "artifactId = '" );
  buf.append( getArtifactId() + "'" );
  buf.append( "\n" ); 
  buf.append( "version = '" );
  buf.append( getVersion() + "'" );
  return buf.toString();
} //-- java.lang.String toString() 
origin: org.apache.archiva/archiva-artifact-reports

private void validateAppropriateModel( String location, ArchivaArtifact artifact, ArchivaProjectModel model )
  throws ConsumerException
{
  if ( model != null )
  {
    if ( !StringUtils.equals( model.getGroupId(), artifact.getGroupId() ) )
    {
      addProblem( artifact, "The groupId of the " + location +
        " project model doesn't match with the artifact, expected <" + artifact.getGroupId() +
        ">, but was actually <" + model.getGroupId() + ">" );
    }
    if ( !StringUtils.equals( model.getArtifactId(), artifact.getArtifactId() ) )
    {
      addProblem( artifact, "The artifactId of the " + location +
        " project model doesn't match with the artifact, expected <" + artifact.getArtifactId() +
        ">, but was actually <" + model.getArtifactId() + ">" );
    }
    if ( !StringUtils.equals( model.getVersion(), artifact.getVersion() ) )
    {
      addProblem( artifact, "The version of the " + location +
        " project model doesn't match with the artifact, expected <" + artifact.getVersion() +
        ">, but was actually <" + model.getVersion() + ">" );
    }
  }
}
org.apache.maven.archiva.modelArchivaProjectModel

Most used methods

  • getArtifactId
    Get The Artifact ID of the repository content.
  • getGroupId
    Get The Group ID of the repository content.
  • getVersion
    Get The version of the repository content.
  • setVersion
    Set The version of the repository content.
  • getPackaging
    Get The declared packaging for this project model.
  • <init>
  • getDependencies
    Method getDependencies
  • getDependencyManagement
    Method getDependencyManagement
  • setArtifactId
    Set The Artifact ID of the repository content.
  • setGroupId
    Set The Group ID of the repository content.
  • setOrigin
    Set The Origin of this Model. (Filesystem, Proxy, or Deploy)
  • setPackaging
    Set The declared packaging for this project model.
  • setOrigin,
  • setPackaging,
  • getBuildExtensions,
  • getCiManagement,
  • getDescription,
  • getIndividuals,
  • getIssueManagement,
  • getLicenses,
  • getMailingLists,
  • getName

Popular in Java

  • Start an intent from android
  • setRequestProperty (URLConnection)
  • requestLocationUpdates (LocationManager)
  • onRequestPermissionsResult (Fragment)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Reference (javax.naming)
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now