Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bp update versions #3096

Merged
merged 2 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@
<ecjVersion>3.35.0</ecjVersion>
<bnd.version>7.0.0</bnd.version>
<!-- these are referenced from src/main/resources/META-INF/plexus/components.xml -->
<resources-plugin.version>2.4.3</resources-plugin.version>
<install-plugin.version>2.3.1</install-plugin.version>
<deploy-plugin.version>2.5</deploy-plugin.version>
<clean-plugin.version>2.4.1</clean-plugin.version>
<resources-plugin.version>3.3.1</resources-plugin.version>
<install-plugin.version>3.1.1</install-plugin.version>
<deploy-plugin.version>3.1.1</deploy-plugin.version>
<clean-plugin.version>3.3.2</clean-plugin.version>
<surefire-plugin.version>${surefire-version}</surefire-plugin.version>
</properties>
<dependencyManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,14 @@

import org.apache.commons.io.FileUtils;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.handler.DefaultArtifactHandler;
import org.apache.maven.artifact.resolver.ArtifactResolutionRequest;
import org.apache.maven.artifact.resolver.ArtifactResolutionResult;
import org.apache.maven.execution.MavenSession;
import org.apache.maven.model.Dependency;
import org.apache.maven.model.Plugin;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecution;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.Component;
Expand All @@ -66,6 +68,7 @@
import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.p2.core.IProvisioningAgent;
import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
import org.eclipse.tycho.PackagingType;
import org.eclipse.tycho.TychoConstants;
import org.eclipse.tycho.core.PGPService;
import org.eclipse.tycho.p2maven.tools.TychoFeaturesAndBundlesPublisherApplication;
Expand Down Expand Up @@ -215,6 +218,9 @@ public class MavenP2SiteMojo extends AbstractMojo {
@Parameter(defaultValue = INCLUDE_PGP_DEFAULT + "")
private boolean includePGPSignature = INCLUDE_PGP_DEFAULT;

@Parameter(property = "mojoExecution", readonly = true)
MojoExecution execution;

@Override
public void execute() throws MojoExecutionException, MojoFailureException {
//fetch a random service to make sure OSGi framework is there ... even if the service is (yet) not used
Expand Down Expand Up @@ -399,7 +405,14 @@ public void execute() throws MojoExecutionException, MojoFailureException {
} catch (IOException e) {
throw new MojoExecutionException("failed to create archive", e);
}
projectHelper.attachArtifact(project, "zip", "p2site", destFile);
if (PackagingType.TYPE_P2_SITE.equals(project.getPackaging())
&& execution.getExecutionId().startsWith("default-")) {
Artifact artifact = project.getArtifact();
artifact.setFile(destFile);
artifact.setArtifactHandler(new DefaultArtifactHandler("zip"));
} else {
projectHelper.attachArtifact(project, "zip", "p2site", destFile);
}
}

private List<String> getKeyServers() {
Expand Down
Loading