From 348a355738bbdb187a6790b7eb603b1b83e6243b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20L=C3=A4ubrich?= Date: Sun, 12 May 2024 08:04:02 +0200 Subject: [PATCH] Add mojo as a replacement for the rp2.emove-iu and task --- .../markdown/{Category.md => Repositories.md} | 18 +++++++++- src/site/site.xml | 4 +++ .../plugins/p2/repository/RemoveIUMojo.java | 35 +++++++++++++++++++ 3 files changed, 56 insertions(+), 1 deletion(-) rename src/site/markdown/{Category.md => Repositories.md} (78%) create mode 100644 tycho-p2-repository-plugin/src/main/java/org/eclipse/tycho/plugins/p2/repository/RemoveIUMojo.java diff --git a/src/site/markdown/Category.md b/src/site/markdown/Repositories.md similarity index 78% rename from src/site/markdown/Category.md rename to src/site/markdown/Repositories.md index c8517dc96e..7984001a8c 100644 --- a/src/site/markdown/Category.md +++ b/src/site/markdown/Repositories.md @@ -1,4 +1,8 @@ -# Category +# Repositories + +Repositories (also knows as P2 Updatesites) contain artifacts and metadata to install content into eclipse or use them in a Tycho build. + +## Create Repositories using category.xml A category.xml file can be used to define which content is placed into a p2 repository. It can also specify how to display the content in the p2 installation dialog. @@ -68,3 +72,15 @@ The following is an example, demonstrating a complex category definition. ``` You can read more about P2 Query Syntax [here](https://wiki.eclipse.org/Equinox/p2/Query_Language_for_p2). + +## Managing Repositories + +Tycho offers some tools to manage existing repositories as a replacement for the ant-tasks described [here](https://help.eclipse.org/latest/topic/org.eclipse.platform.doc.isv/guide/p2_repositorytasks.htm) + +### repo2runnable + +See [tycho-p2-repository:repo-to-runnable](tycho-p2-repository-plugin/repo-to-runnable-mojo.html) + +### remove.iu + +See [tycho-p2-repository:remove-iu](tycho-p2-repository-plugin/remove-iu-mojo.html) diff --git a/src/site/site.xml b/src/site/site.xml index 20b63980b9..43f5aa1818 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -19,7 +19,11 @@ + + + + diff --git a/tycho-p2-repository-plugin/src/main/java/org/eclipse/tycho/plugins/p2/repository/RemoveIUMojo.java b/tycho-p2-repository-plugin/src/main/java/org/eclipse/tycho/plugins/p2/repository/RemoveIUMojo.java new file mode 100644 index 0000000000..c7c36cf8ae --- /dev/null +++ b/tycho-p2-repository-plugin/src/main/java/org/eclipse/tycho/plugins/p2/repository/RemoveIUMojo.java @@ -0,0 +1,35 @@ +/******************************************************************************* + * Copyright (c) 2009, 2024 IBM Corporation and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * IBM Corporation - initial implementation in P2 as an ant task + * Christoph Läubrich - migration to maven-mojo + *******************************************************************************/ +package org.eclipse.tycho.plugins.p2.repository; + +import org.apache.maven.plugin.AbstractMojo; +import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.Mojo; + +/** + * Mojo that provides the p2.remove.iu ant task described here. + */ +@Mojo(name = "remove-iu") +public class RemoveIUMojo extends AbstractMojo { + + @Override + public void execute() throws MojoExecutionException, MojoFailureException { + // TODO Auto-generated method stub + + } + +}