Package org.eclipse.m2e.core.embedder

Examples of org.eclipse.m2e.core.embedder.ArtifactKey


        Map<String, String> attributes = entry.getClasspathAttributes();
        String g = attributes.get( IClasspathManager.GROUP_ID_ATTRIBUTE );
        String a = attributes.get( IClasspathManager.ARTIFACT_ID_ATTRIBUTE );
        String v = attributes.get( IClasspathManager.VERSION_ATTRIBUTE );
        String c = attributes.get( IClasspathManager.CLASSIFIER_ATTRIBUTE );
        return classpathMap.get( new ArtifactKey( g, a, v, c ) );
    }
View Full Code Here


                            String v = me.getAttribute( "v" );
                            String c = me.getAttribute( "c" );

                            if ( g != null && a != null && v != null && path != null )
                            {
                                result.put( new ArtifactKey( g, a, v, c ), path );
                            }
                            else
                            {
                                log.debug( "Malformd Include-Artifacts element paht={};g={};a={};v={};c={}",
                                           new Object[] { path, g, a, v, c } );
View Full Code Here

  public static Artifact getArtifact(Collection<Artifact> artifacts, ArtifactKey key) {
    if (artifacts == null || key == null || artifacts.isEmpty()) {
      return null;
    }
    for (Artifact a : artifacts) {
      ArtifactKey ak = toArtifactKey(a);
      if (key.equals(ak)) {
        return a;
      }
    }
    return null;
View Full Code Here

  /**
   * Gets an ArtifactKey from an Artifact. This method fixes the flawed ArtifactKey(Artifact a) constructor
   * which doesn't copy the artifact classifier;
   */
  public static ArtifactKey toArtifactKey(Artifact a) {
    return new ArtifactKey(a.getGroupId(), a.getArtifactId(), a.getBaseVersion(), a.getClassifier());
  }
View Full Code Here

      }
      MavenProject depMavenProject =  dependency.getMavenProject(monitor);

      IVirtualComponent depComponent = ComponentCore.createComponent(dependency.getProject());
         
      ArtifactKey artifactKey = ArtifactHelper.toArtifactKey(depMavenProject.getArtifact());
      //Get artifact using the proper classifier
      Artifact artifact = ArtifactHelper.getArtifact(mavenProject.getArtifacts(), artifactKey);
      if (artifact == null) {
        //could not map key to artifact
        artifact = depMavenProject.getArtifact();
View Full Code Here

TOP

Related Classes of org.eclipse.m2e.core.embedder.ArtifactKey

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.