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

Add integration test illustrating issue #1512 #1513

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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,2 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
8 changes: 8 additions & 0 deletions tycho-its/projects/issue1512/bundle/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Bundle
Bundle-SymbolicName: bundle
Bundle-Version: 0.0.1.qualifier
Automatic-Module-Name: bundle
Bundle-RequiredExecutionEnvironment: JavaSE-17
Require-Bundle: host
4 changes: 4 additions & 0 deletions tycho-its/projects/issue1512/bundle/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.
35 changes: 35 additions & 0 deletions tycho-its/projects/issue1512/bundle/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.eclipse.tycho.tycho-its.issue1512</groupId>
<artifactId>bundle</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

<repositories>
<repository>
<id>target</id>
<url>file:../site/target/repository</url>
<layout>p2</layout>
</repository>
</repositories>

<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-compiler-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<showWarnings>true</showWarnings>
</configuration>
</plugin>
</plugins>
</build>
</project>
10 changes: 10 additions & 0 deletions tycho-its/projects/issue1512/bundle/src/bundle/A.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package bundle;

import fragment.internal.Internal;

@SuppressWarnings("restriction")
public class A {

public Internal internal;

}
9 changes: 9 additions & 0 deletions tycho-its/projects/issue1512/fragment/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Fragment
Bundle-SymbolicName: fragment
Bundle-Version: 0.0.1.qualifier
Fragment-Host: host
Automatic-Module-Name: fragment
Bundle-RequiredExecutionEnvironment: JavaSE-17
Export-Package: fragment.internal; x-internal:=true
4 changes: 4 additions & 0 deletions tycho-its/projects/issue1512/fragment/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.
11 changes: 11 additions & 0 deletions tycho-its/projects/issue1512/fragment/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.eclipse.tycho.tycho-its.issue1512</groupId>
<artifactId>parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>fragment</artifactId>
<packaging>eclipse-plugin</packaging>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package fragment.internal;

public class Internal {

}
8 changes: 8 additions & 0 deletions tycho-its/projects/issue1512/host/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Host
Bundle-SymbolicName: host
Bundle-Version: 0.0.1.qualifier
Automatic-Module-Name: host
Bundle-RequiredExecutionEnvironment: JavaSE-17
Eclipse-ExtensibleAPI: true
4 changes: 4 additions & 0 deletions tycho-its/projects/issue1512/host/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.
11 changes: 11 additions & 0 deletions tycho-its/projects/issue1512/host/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.eclipse.tycho.tycho-its.issue1512</groupId>
<artifactId>parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>host</artifactId>
<packaging>eclipse-plugin</packaging>
</project>
25 changes: 25 additions & 0 deletions tycho-its/projects/issue1512/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.eclipse.tycho.tycho-its.issue1512</groupId>
<artifactId>parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>

<modules>
<module>fragment</module>
<module>host</module>
<module>site</module>
</modules>

<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho-version}</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
</project>
5 changes: 5 additions & 0 deletions tycho-its/projects/issue1512/site/category.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<site>
<bundle id="host"/>
<bundle id="fragment"/>
</site>
11 changes: 11 additions & 0 deletions tycho-its/projects/issue1512/site/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.eclipse.tycho.tycho-its.issue1512</groupId>
<artifactId>parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>site</artifactId>
<packaging>eclipse-repository</packaging>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package org.eclipse.tycho.test.issue1512;

import java.util.List;

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

public class Issue1512Test extends AbstractTychoIntegrationTest {

@Test
public void test() throws Exception {
Verifier verifierRepo = getVerifier("issue1512");
verifierRepo.executeGoals(List.of("clean", "package"));
verifierRepo.verifyErrorFreeLog();

Verifier verifierBundle = getVerifier("issue1512/bundle");
verifierBundle.executeGoals(List.of("clean", "compile"));
verifierBundle.verifyErrorFreeLog();
}

}
Loading