Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
thahnen authored Dec 4, 2024
2 parents 9fa7feb + b0fca73 commit 2c47d69
Show file tree
Hide file tree
Showing 14 changed files with 73 additions and 31 deletions.
14 changes: 7 additions & 7 deletions p2-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.equinox.p2.director</artifactId>
<version>2.6.400</version>
<version>2.6.500</version>
</dependency>
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.equinox.p2.engine</artifactId>
<version>2.10.200</version>
<version>2.10.300</version>
</dependency>
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.equinox.p2.metadata</artifactId>
<version>2.9.100</version>
<version>2.9.200</version>
</dependency>
<dependency>
<groupId>org.eclipse.platform</groupId>
Expand All @@ -75,7 +75,7 @@
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.equinox.preferences</artifactId>
<version>3.11.100</version>
<version>3.11.200</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
Expand All @@ -101,7 +101,7 @@
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.equinox.p2.updatesite</artifactId>
<version>1.3.400</version>
<version>1.3.500</version>
</dependency>
<!-- used API packages from Tycho -->
<dependency>
Expand Down Expand Up @@ -138,12 +138,12 @@
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.equinox.p2.garbagecollector</artifactId>
<version>1.3.300</version>
<version>1.3.400</version>
</dependency>
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.equinox.p2.director.app</artifactId>
<version>1.3.400</version>
<version>1.3.500</version>
</dependency>
<dependency>
<groupId>org.eclipse.platform</groupId>
Expand Down
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@
<minimal-maven-version>3.9.6</minimal-maven-version>
<!-- When updating surefire version, double-check Import-Package statements generated by bnd-maven-plugin and possibly adapt instructions in various bnd.bnd files -->
<surefire-version>3.5.2</surefire-version>
<equinoxVersion>3.21.0</equinoxVersion>
<equinoxVersion>3.22.0</equinoxVersion>
<ecjVersion>3.39.0</ecjVersion>
<bouncycastleVersion>1.79</bouncycastleVersion>
<bnd.version>7.0.0</bnd.version>
<bnd.version>7.1.0</bnd.version>
<junit5.version>5.11.3</junit5.version>
<junit5.platform.version>1.11.3</junit5.platform.version>
<!-- these are referenced from src/main/resources/META-INF/plexus/components.xml -->
Expand Down Expand Up @@ -300,12 +300,12 @@
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.equinox.p2.repository</artifactId>
<version>2.9.100</version>
<version>2.9.200</version>
</dependency>
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.equinox.p2.publisher.eclipse</artifactId>
<version>1.6.200</version>
<version>1.6.300</version>
</dependency>
<dependency>
<groupId>org.eclipse.platform</groupId>
Expand Down
2 changes: 1 addition & 1 deletion sisu-osgi/sisu-osgi-connect/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.equinox.registry</artifactId>
<version>3.12.100</version>
<version>3.12.200</version>
</dependency>
<dependency>
<groupId>org.eclipse.sisu</groupId>
Expand Down
10 changes: 5 additions & 5 deletions src/site/markdown/PackagingTypes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

Tycho defines the following custom Maven packaging types targeted for Eclipse Plug-in development.

* `eclipse-plugin` corresponds to [Eclipse Plug-in and Plug-in Fragment projects](https://wiki.eclipse.org/PDE/User_Guide#Plug-in).
* `eclipse-plugin` corresponds to [Eclipse Plug-in and Plug-in Fragment projects](https://github.com/eclipse-pde/eclipse.pde/blob/master/docs/User_Guide.md#Plug-in).
* `eclipse-test-plugin` is similar to `eclipse-plugin` but only contains Plugin Tests to be executed inside an OSGi runtime. There is a noticable difference between `eclipse-plugin` and `eclipse-test-plugin` with respect to the goal executed during `integration-test`. The former uses `tycho-surefire-plugin:integration-test` while the latter uses `tycho-surefire-plugin:test`.
* `eclipse-feature` corresponds to [Eclipse Feature projects](https://wiki.eclipse.org/PDE/User_Guide#Feature)
* `eclipse-repository` corresponds to projects containing a `category.xml` file, the support of [Eclipse Update Site projects](https://wiki.eclipse.org/PDE/User_Guide#Update_Site) has been removed in latest Tycho versions
* `eclipse-target-definition` corresponds to [Eclipse Target Platform](https://wiki.eclipse.org/PDE/User_Guide#Target_Platform)
* `p2-installable-unit` corresponds to [Installable Units](https://wiki.eclipse.org/Installable_Units)
* `eclipse-feature` corresponds to [Eclipse Feature projects](https://github.com/eclipse-pde/eclipse.pde/blob/master/docs/User_Guide.md#Feature)
* `eclipse-repository` corresponds to projects containing a `category.xml` file, the support of [Eclipse Update Site projects]https://github.com/eclipse-pde/eclipse.pde/blob/master/docs/User_Guide.md#Update-Site) has been removed in latest Tycho versions
* `eclipse-target-definition` corresponds to [Eclipse Target Platform](https://github.com/eclipse-pde/eclipse.pde/blob/master/docs/User_Guide.md#Target_Platform)
* `p2-installable-unit` corresponds to [Installable Units](https://github.com/eclipse-equinox/p2/blob/master/docs/Installable_Units.md)

The lifecycle bindings (i.e. which Maven plugins are executed in which Maven phase by default) are defined by `tycho-maven-plugin` in a [Maven extension](https://maven.apache.org/guides/mini/guide-using-extensions.html) therefore it needs to be loaded accordingly:

Expand Down
2 changes: 1 addition & 1 deletion tycho-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.equinox.p2.metadata</artifactId>
<version>2.9.100</version>
<version>2.9.200</version>
</dependency>
<dependency>
<groupId>org.eclipse.platform</groupId>
Expand Down
4 changes: 2 additions & 2 deletions tycho-apitools-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<dependency>
<groupId>org.eclipse.pde</groupId>
<artifactId>org.eclipse.pde.core</artifactId>
<version>3.19.0</version>
<version>3.20.0</version>
<type>jar</type>
<exclusions>
<exclusion>
Expand All @@ -71,7 +71,7 @@
<dependency>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.launching</artifactId>
<version>3.23.0</version>
<version>3.23.100</version>
</dependency>
<!-- libs -->
<dependency>
Expand Down
6 changes: 3 additions & 3 deletions tycho-build/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,20 @@
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.equinox.p2.director</artifactId>
<version>2.6.400</version>
<version>2.6.500</version>
</dependency>

<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.equinox.p2.engine</artifactId>
<version>2.10.200</version>
<version>2.10.300</version>
</dependency>


<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.equinox.p2.metadata</artifactId>
<version>2.9.100</version>
<version>2.9.200</version>
</dependency>
<dependency>
<groupId>org.eclipse.platform</groupId>
Expand Down
2 changes: 1 addition & 1 deletion tycho-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@
<dependency>
<groupId>org.eclipse.pde</groupId>
<artifactId>org.eclipse.pde.core</artifactId>
<version>3.19.0</version>
<version>3.20.0</version>
<scope>test</scope>
<exclusions>
<exclusion>
Expand Down
2 changes: 1 addition & 1 deletion tycho-eclipse-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<dependency>
<groupId>org.eclipse.pde</groupId>
<artifactId>org.eclipse.pde.core</artifactId>
<version>3.19.0</version>
<version>3.20.0</version>
<type>jar</type>
<exclusions>
<exclusion>
Expand Down
4 changes: 2 additions & 2 deletions tycho-extras/tycho-document-bundle-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.help.base</artifactId>
<version>4.4.500</version>
<version>4.4.600</version>
</dependency>
<dependency>
<groupId>org.eclipse.pde</groupId>
<artifactId>org.eclipse.pde.core</artifactId>
<version>3.19.0</version>
<version>3.20.0</version>
</dependency>
</dependencies>
<build>
Expand Down
2 changes: 1 addition & 1 deletion tycho-sbom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<dependency>
<groupId>org.cyclonedx</groupId>
<artifactId>cyclonedx-maven-plugin</artifactId>
<version>2.9.0</version>
<version>2.9.1</version>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ public static String expandProperties(String str, List<Property> properties) {
String unexpandedProperty = m.group();
String propertyName = m.group(1);
m.appendReplacement(resolvedVersionBuilder,
properties.stream().filter(p -> p.getName().equals(propertyName)).map(p -> p.getValue())
.findFirst().orElse(unexpandedProperty));
Matcher.quoteReplacement(properties.stream().filter(p -> p.getName().equals(propertyName))
.map(p -> p.getValue()).findFirst().orElse(unexpandedProperty)));
}
m.appendTail(resolvedVersionBuilder);
return resolvedVersionBuilder.toString();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*******************************************************************************
* Copyright (c) 2024 SAP SE 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:
* SAP SE - initial API and implementation
*******************************************************************************/
package org.eclipse.tycho.versions.pom.tests;

import static org.junit.Assert.assertEquals;

import java.io.ByteArrayInputStream;
import java.nio.charset.StandardCharsets;

import org.eclipse.tycho.versions.pom.PomFile;
import org.eclipse.tycho.versions.pom.PomUtil;
import org.junit.Test;

public class PomUtilTest {

@Test
public void expandProperties() throws Exception {
String pom = """
<project>
<properties>
<foo> fooValue </foo>
<bar>barValue</bar>
</properties>
</project>
""";
PomFile pomFile = PomFile.read(new ByteArrayInputStream(pom.getBytes(StandardCharsets.UTF_8)), true);

String expanded = PomUtil.expandProperties("${foo}-${bar}-${notFound}", pomFile.getProperties());

assertEquals("fooValue-barValue-${notFound}", expanded);
}
}
2 changes: 1 addition & 1 deletion tycho-wrap-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<dependency>
<groupId>biz.aQute.bnd</groupId>
<artifactId>biz.aQute.bnd.maven</artifactId>
<version>7.0.0</version>
<version>7.1.0</version>
</dependency>
</dependencies>
<build>
Expand Down

0 comments on commit 2c47d69

Please sign in to comment.