-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add mojo as a replacement for the rp2.emove-iu and task
- Loading branch information
Showing
11 changed files
with
520 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- includes three bundles in different ways; note: the bundles do not require each other --> | ||
<site> | ||
<bundle id="org.eclipse.osgi" version="3.5.2.R35x_v20100126"/> | ||
</site> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>tycho-its-project.p2Repository</groupId> | ||
<artifactId>testrepo</artifactId> | ||
<version>1.0.0</version> | ||
|
||
<properties> | ||
<tycho-version>5.0.0-SNAPSHOT</tycho-version> | ||
</properties> | ||
<packaging>eclipse-repository</packaging> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.eclipse.tycho</groupId> | ||
<artifactId>tycho-maven-plugin</artifactId> | ||
<version>${tycho-version}</version> | ||
<extensions>true</extensions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.eclipse.tycho</groupId> | ||
<artifactId>tycho-p2-repository-plugin</artifactId> | ||
<version>${tycho-version}</version> | ||
<configuration> | ||
<compress>false</compress> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>remove-iu</goal> | ||
</goals> | ||
<phase>package</phase> | ||
<configuration> | ||
<iu> | ||
<remove> | ||
<query>property[@name='org.eclipse.equinox.p2.name' @value='Uncategorized']</query> | ||
</remove> | ||
<remove> | ||
<id>a.jre.javase</id> | ||
</remove> | ||
</iu> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<repositories> | ||
<repository> | ||
<id>test-data-repo</id> | ||
<layout>p2</layout> | ||
<url>${test-data-repo}</url> | ||
</repository> | ||
</repositories> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
tycho-its/src/test/java/org/eclipse/tycho/test/P2RepositoryPluginTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 Christoph Läubrich 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: | ||
* Christoph Läubrich - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.tycho.test; | ||
|
||
import static org.junit.Assert.assertNotEquals; | ||
|
||
import java.io.File; | ||
import java.util.List; | ||
|
||
import org.apache.maven.it.Verifier; | ||
import org.eclipse.tycho.test.util.P2RepositoryTool; | ||
import org.eclipse.tycho.test.util.P2RepositoryTool.IU; | ||
import org.eclipse.tycho.test.util.P2RepositoryTool.IdAndVersion; | ||
import org.eclipse.tycho.test.util.ResourceUtil; | ||
import org.junit.Test; | ||
|
||
public class P2RepositoryPluginTest extends AbstractTychoIntegrationTest { | ||
|
||
@Test | ||
public void testP2RemoveUI() throws Exception { | ||
Verifier verifier = getVerifier("/p2Repository.removeUI"); | ||
verifier.addCliOption("-Dtest-data-repo=" + ResourceUtil.P2Repositories.ECLIPSE_352); | ||
verifier.executeGoals(List.of("clean", "package")); | ||
verifier.verifyErrorFreeLog(); | ||
P2RepositoryTool p2Repo = P2RepositoryTool.forEclipseRepositoryModule(new File(verifier.getBasedir())); | ||
List<IdAndVersion> allUnits = p2Repo.getAllUnits(); | ||
for (IdAndVersion idAndVersion : allUnits) { | ||
IU iu = p2Repo.getIU(idAndVersion.id(), idAndVersion.version()); | ||
for (String prop : iu.getProperties()) { | ||
assertNotEquals("org.eclipse.equinox.p2.name=Uncategorized", prop); | ||
} | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.