Package org.sonatype.p2.bridge.model

Examples of org.sonatype.p2.bridge.model.TouchpointType


        logger.debug("[{}:{}] is neither an OSGi bundle nor an feature. Bailing out.", item.getRepositoryId(),
            item.getPath());
        return;
      }

      final InstallableArtifact artifact = new InstallableArtifact();
      artifact.setId(desc.getId());
      artifact.setClassifier(desc.getType().getClassifier());
      artifact.setVersion(desc.getVersion());
      artifact.setPath(file.getAbsolutePath());
      artifact.setRepositoryPath(item.getPath());

      final Collection<InstallableUnit> ius;
      final Collection<InstallableUnit> artifactsUis;
      switch (desc.getType()) {
        case BUNDLE:
View Full Code Here


    StorageItem item = mock(StorageItem.class);
    when(item.getPath()).thenReturn(new File(tempP2Repository, "feature.jar").getAbsolutePath());
    when(item.getRepositoryId()).thenReturn("mockId");

    InstallableUnit jarUnit = mock(InstallableUnit.class);
    when(jarUnit.getId()).thenReturn("feature.feature.jar");
    InstallableUnit groupUnit = mock(InstallableUnit.class);
    when(groupUnit.getId()).thenReturn("feature.feature.group");
    when(publisher.generateFeatureIUs(any(Boolean.class), any(Boolean.class), any(File[].class)))
        .thenReturn(Arrays.asList(jarUnit, groupUnit));

    generator.addConfiguration(config);
    generator.generateP2Metadata(item);
View Full Code Here

   * @param artifact The artifact to attach
   * @param ius      The {@link InstallableUnit}s were to attach the artifact
   */
  private void attachArtifact(InstallableArtifact artifact, Collection<InstallableUnit> ius) {
    for (final InstallableUnit iu : ius) {
      final InstallableUnitArtifact iuArtifact = new InstallableUnitArtifact();
      iuArtifact.setId(artifact.getId());
      iuArtifact.setClassifier(artifact.getClassifier());
      iuArtifact.setVersion(artifact.getVersion());

      iu.addArtifact(iuArtifact);

      final TouchpointType touchpointType = new TouchpointType();
      touchpointType.setId("org.eclipse.equinox.p2.osgi");
View Full Code Here

      iuArtifact.setClassifier(artifact.getClassifier());
      iuArtifact.setVersion(artifact.getVersion());

      iu.addArtifact(iuArtifact);

      final TouchpointType touchpointType = new TouchpointType();
      touchpointType.setId("org.eclipse.equinox.p2.osgi");
      touchpointType.setVersion("1.0.0");

      iu.setTouchpointType(touchpointType);
    }
  }
View Full Code Here

TOP

Related Classes of org.sonatype.p2.bridge.model.TouchpointType

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.