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

A simple circular requirement that should be properly filtered #3227

Closed
wants to merge 1 commit into from
Closed
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
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();
}
}
Loading