Skip to content

Commit

Permalink
Remove support for deployableFeature option
Browse files Browse the repository at this point in the history
The deployableFeature option will create "standard eclipse update site
directory with feature content will be created under target folder" but
we already removed site-packaging from tycho for a while, if one wants
to archive similar a category.xml with eclipse-repository packaging
gives much more control and power to the user.
  • Loading branch information
laeubi committed Nov 24, 2023
1 parent a6dfcba commit 0f99be6
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 336 deletions.
6 changes: 6 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ If filtering provided artifacts is enabled, the repository references automatica
using exclusion and inclusion patterns and therefore allows more fine-grained control which references are added.
Additionally the automatically added references can be filter based on if they provide any of the filtered units or not.
If `addOnlyProviding` is `true` repositories that don't provide any filtered unit are not added to the assembled repo.

```xml
<plugin>
<groupId>org.eclipse.tycho</groupId>
Expand All @@ -98,6 +99,11 @@ If `addOnlyProviding` is `true` repositories that don't provide any filtered uni

```

### Remove support for deployableFeature option

The deployableFeature option will create "standard eclipse update site directory with feature content will be created under target folder" but we already removed site-packaging from Tycho for a while, if one wants to archive similar a category.xml with eclipse-repository packaging gives much more control and power to the user.


## 4.0.3

### new option to filter added repository-references when assembling a p2-repository
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
import org.codehaus.plexus.component.annotations.Component;
import org.codehaus.plexus.component.annotations.Requirement;
import org.codehaus.plexus.logging.Logger;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.osgi.container.namespaces.EclipsePlatformNamespace;
import org.eclipse.osgi.internal.framework.FilterImpl;
import org.eclipse.tycho.ArtifactDescriptor;
Expand All @@ -58,10 +57,8 @@
import org.eclipse.tycho.ResolvedArtifactKey;
import org.eclipse.tycho.TargetEnvironment;
import org.eclipse.tycho.TychoConstants;
import org.eclipse.tycho.core.ArtifactDependencyVisitor;
import org.eclipse.tycho.core.ArtifactDependencyWalker;
import org.eclipse.tycho.core.BundleProject;
import org.eclipse.tycho.core.PluginDescription;
import org.eclipse.tycho.core.TargetPlatformConfiguration;
import org.eclipse.tycho.core.TychoProject;
import org.eclipse.tycho.core.ee.ExecutionEnvironmentUtils;
Expand All @@ -73,9 +70,6 @@
import org.eclipse.tycho.core.osgitools.project.EclipsePluginProjectImpl;
import org.eclipse.tycho.core.resolver.P2ResolverFactory;
import org.eclipse.tycho.core.utils.TychoProjectUtils;
import org.eclipse.tycho.model.Feature;
import org.eclipse.tycho.model.ProductConfiguration;
import org.eclipse.tycho.model.UpdateSite;
import org.eclipse.tycho.model.classpath.JUnitBundle;
import org.eclipse.tycho.model.classpath.JUnitClasspathContainerEntry;
import org.eclipse.tycho.model.classpath.LibraryClasspathEntry;
Expand Down Expand Up @@ -118,40 +112,7 @@ public class OsgiBundleProject extends AbstractTychoProject implements BundlePro

@Override
public ArtifactDependencyWalker getDependencyWalker(ReactorProject project) {
final DependencyArtifacts artifacts = getDependencyArtifacts(project);

final List<ClasspathEntry> cp = getClasspath(project);

return new ArtifactDependencyWalker() {
@Override
public void walk(ArtifactDependencyVisitor visitor) {
for (ClasspathEntry entry : cp) {
ArtifactDescriptor artifact = artifacts.getArtifact(entry.getArtifactKey());
ArtifactKey key = artifact.getKey();
File location = artifact.getLocation(true);
ReactorProject project = artifact.getMavenProject();
String classifier = artifact.getClassifier();
Collection<IInstallableUnit> installableUnits = artifact.getInstallableUnits();

PluginDescription plugin = new DefaultPluginDescription(key, location, project, classifier, null,
installableUnits);

visitor.visitPlugin(plugin);
}
}

@Override
public void traverseFeature(File location, Feature feature, ArtifactDependencyVisitor visitor) {
}

@Override
public void traverseUpdateSite(UpdateSite site, ArtifactDependencyVisitor artifactDependencyVisitor) {
}

@Override
public void traverseProduct(ProductConfiguration productConfiguration, ArtifactDependencyVisitor visitor) {
}
};
throw new UnsupportedOperationException();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import org.eclipse.tycho.DefaultArtifactKey;
import org.eclipse.tycho.ReactorProject;
import org.eclipse.tycho.TargetEnvironment;
import org.eclipse.tycho.core.ArtifactDependencyVisitor;
import org.eclipse.tycho.core.ArtifactDependencyWalker;
import org.eclipse.tycho.core.TychoProject;
import org.eclipse.tycho.model.IU;
Expand All @@ -28,13 +27,7 @@
public class P2IUProject extends AbstractArtifactBasedProject {
@Override
protected ArtifactDependencyWalker newDependencyWalker(ReactorProject project, TargetEnvironment environment) {
return new AbstractArtifactDependencyWalker(getDependencyArtifacts(project, environment),
getEnvironments(project, environment)) {
@Override
public void walk(ArtifactDependencyVisitor visitor) {
//Nothing to do
}
};
throw new UnsupportedOperationException();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,14 @@
import org.eclipse.tycho.DefaultArtifactKey;
import org.eclipse.tycho.ReactorProject;
import org.eclipse.tycho.TargetEnvironment;
import org.eclipse.tycho.core.ArtifactDependencyVisitor;
import org.eclipse.tycho.core.ArtifactDependencyWalker;
import org.eclipse.tycho.core.TychoProject;

@Component(role = TychoProject.class, hint = org.eclipse.tycho.ArtifactType.TYPE_P2_MAVEN_REPOSITORY)
public class P2SiteProject extends AbstractArtifactBasedProject {
@Override
protected ArtifactDependencyWalker newDependencyWalker(ReactorProject project, TargetEnvironment environment) {
return new AbstractArtifactDependencyWalker(getDependencyArtifacts(project, environment),
getEnvironments(project, environment)) {
@Override
public void walk(ArtifactDependencyVisitor visitor) {
//Nothing to do
}
};
throw new UnsupportedOperationException();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,6 @@ public class PackageFeatureMojo extends AbstractTychoPackagingMojo {
@Parameter(property = "project.build.finalName", alias = "jarName", required = true)
private String finalName;

/**
* If set to <code>true</code>, standard eclipse update site directory with feature content will
* be created under target folder.
*/
@Parameter(defaultValue = "false")
private boolean deployableFeature = false;

@Parameter(defaultValue = "${project.build.directory}/site")
private File target;

Expand Down Expand Up @@ -200,10 +193,6 @@ public void execute() throws MojoExecutionException, MojoFailureException {
}

project.getArtifact().setFile(outputJar);

if (deployableFeature) {
assembleDeployableFeature();
}
}
}

Expand Down Expand Up @@ -278,11 +267,6 @@ private FileSet getManuallyIncludedFiles(BuildProperties buildProperties) {
return getFileSet(basedir, buildProperties.getBinIncludes(), binExcludes);
}

private void assembleDeployableFeature() throws MojoExecutionException {
UpdateSiteAssembler assembler = new UpdateSiteAssembler(plexus, target);
getTychoProjectFacet().getDependencyWalker(DefaultReactorProject.adapt(project)).walk(assembler);
}

private void expandVersionQualifiers(Feature feature) throws MojoFailureException {
ReactorProject reactorProject = DefaultReactorProject.adapt(project);
feature.setVersion(reactorProject.getExpandedVersion());
Expand Down
Loading

0 comments on commit 0f99be6

Please sign in to comment.