Skip to content

Commit

Permalink
A simple circular requirement that should be properly filtered
Browse files Browse the repository at this point in the history
  • Loading branch information
merks authored and laeubi committed Dec 15, 2023
1 parent e0e562d commit 4a6a02c
Show file tree
Hide file tree
Showing 9 changed files with 162 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: circular.bundle1
Bundle-SymbolicName: circular.bundle1;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: TEST
Bundle-RequiredExecutionEnvironment: JavaSE-17
5 changes: 5 additions & 0 deletions tycho-its/projects/p2Inf.circular/bundle1/META-INF/p2.inf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Require build2 at runtime but not at builtime.
requires.0.namespace=org.eclipse.equinox.p2.iu
requires.0.name=circular.bundle2
requires.0.range=0.0.0
requires.0.filter = (!(org.eclipse.circular.buildtime=true))
2 changes: 2 additions & 0 deletions tycho-its/projects/p2Inf.circular/bundle1/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bin.includes = META-INF/,\
.
16 changes: 16 additions & 0 deletions tycho-its/projects/p2Inf.circular/bundle1/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>tycho-its-project.p2Inf.circular</groupId>
<artifactId>parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>

<artifactId>circular.bundle1</artifactId>
<packaging>eclipse-plugin</packaging>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: circular.bundle2
Bundle-SymbolicName: circular.bundle2;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: TEST
Bundle-RequiredExecutionEnvironment: JavaSE-17
Require-Bundle: circular.bundle1
2 changes: 2 additions & 0 deletions tycho-its/projects/p2Inf.circular/bundle2/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bin.includes = META-INF/,\
.
16 changes: 16 additions & 0 deletions tycho-its/projects/p2Inf.circular/bundle2/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>tycho-its-project.p2Inf.circular</groupId>
<artifactId>parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>

<artifactId>circular.bundle2</artifactId>
<packaging>eclipse-plugin</packaging>

</project>
79 changes: 79 additions & 0 deletions tycho-its/projects/p2Inf.circular/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>

<groupId>tycho-its-project.p2Inf.circular</groupId>
<artifactId>parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>

<properties>
<tycho-version>4.0.4</tycho-version>
</properties>

<modules>
<module>bundle1</module>
<module>bundle2</module>
</modules>

<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>target-platform-configuration</artifactId>
<version>${tycho-version}</version>
<configuration>
<target>
</target>
<environments>
<environment>
<os>win32</os>
<ws>win32</ws>
<arch>x86_64</arch>
</environment>
<environment>
<os>macosx</os>
<ws>cocoa</ws>
<arch>x86_64</arch>
</environment>
<environment>
<os>macosx</os>
<ws>cocoa</ws>
<arch>aarch64</arch>
</environment>
<environment>
<os>linux</os>
<ws>gtk</ws>
<arch>x86_64</arch>
</environment>
<environment>
<os>linux</os>
<ws>gtk</ws>
<arch>aarch64</arch>
</environment>
<environment>
<os>linux</os>
<ws>gtk</ws>
<arch>ppc64le</arch>
</environment>
</environments>
<dependency-resolution>
<profileProperties>
<org.eclipse.circular.buildtime>true</org.eclipse.circular.buildtime>
</profileProperties>
</dependency-resolution>
</configuration>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*******************************************************************************
* Copyright (c) 2023 Eclipse Contributors 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
*******************************************************************************/
package org.eclipse.tycho.test.p2Inf;

import static java.util.Arrays.asList;

import org.apache.maven.it.Verifier;
import org.eclipse.tycho.test.AbstractTychoIntegrationTest;
import org.junit.Test;

/**
*/
public class CircularTest extends AbstractTychoIntegrationTest {
@Test
public void testVirtualUnitRequirementDoesNotFailBuild() throws Exception {
Verifier verifier = getVerifier("/p2Inf.circular", false);
verifier.executeGoals(asList("verify"));
verifier.verifyErrorFreeLog();
}
}

0 comments on commit 4a6a02c

Please sign in to comment.