-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add license header Add license header Add license header (cherry picked from commit 69f9754)
- Loading branch information
1 parent
8226066
commit 5d4e258
Showing
10 changed files
with
186 additions
and
0 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
tycho-its/projects/target.eagerResolver/dependee/META-INF/MANIFEST.MF
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,9 @@ | ||
Manifest-Version: 1.0 | ||
Bundle-ManifestVersion: 2 | ||
Bundle-Name: dependee | ||
Bundle-SymbolicName: dependee | ||
Bundle-Version: 0.0.1.qualifier | ||
Export-Package: dependee, | ||
org.apache.commons.lang3 | ||
Bundle-ClassPath: ., | ||
lib/commons-lang3.jar |
5 changes: 5 additions & 0 deletions
5
tycho-its/projects/target.eagerResolver/dependee/build.properties
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 @@ | ||
source.. = src/ | ||
output.. = classes/ | ||
bin.includes = META-INF/,\ | ||
.,\ | ||
lib/commons-lang3.jar |
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 @@ | ||
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>tycho-its-project.osgitools.artifactsWithKnownLocation</groupId> | ||
<artifactId>parent</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
</parent> | ||
<artifactId>dependee</artifactId> | ||
<packaging>eclipse-plugin</packaging> | ||
<properties> | ||
<commons-lang3.version>3.17.0</commons-lang3.version> | ||
</properties> | ||
<!-- Taken and adapted from https://stackoverflow.com/questions/28542595/how-to-embed-a-library-jar-in-an-osgi-bundle-using-tycho/30872071#30872071 --> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-dependency-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>copy-libraries</id> | ||
<phase>validate</phase> | ||
<goals> | ||
<goal>copy</goal> | ||
</goals> | ||
<configuration> | ||
<artifactItems> | ||
<item> | ||
<groupId>org.apache.commons</groupId> | ||
<artifactId>commons-lang3</artifactId> | ||
<version>${commons-lang3.version}</version> | ||
</item> | ||
</artifactItems> | ||
<outputDirectory>lib</outputDirectory> | ||
<stripVersion>true</stripVersion> | ||
<overWriteReleases>true</overWriteReleases> | ||
<overWriteSnapshots>true</overWriteSnapshots> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
25 changes: 25 additions & 0 deletions
25
tycho-its/projects/target.eagerResolver/dependee/src/dependee/DependeeExample.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,25 @@ | ||
/******************************************************************************* | ||
* 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 dependee; | ||
|
||
import org.apache.commons.lang3.BitField; | ||
import org.apache.commons.lang3.StringUtils; | ||
|
||
public class DependeeExample { | ||
|
||
public DependeeExample() { } | ||
|
||
public boolean isStringBlank(String s) { | ||
return StringUtils.isBlank(s); | ||
} | ||
|
||
public BitField getBitField() { | ||
return new BitField(0xFFFFFF); | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
tycho-its/projects/target.eagerResolver/dependent/META-INF/MANIFEST.MF
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,7 @@ | ||
Manifest-Version: 1.0 | ||
Bundle-ManifestVersion: 2 | ||
Bundle-Name: dependent | ||
Bundle-SymbolicName: dependent | ||
Bundle-Version: 0.0.1.qualifier | ||
Require-Bundle: dependee | ||
Bundle-ClassPath: . |
4 changes: 4 additions & 0 deletions
4
tycho-its/projects/target.eagerResolver/dependent/build.properties
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,4 @@ | ||
source.. = src/ | ||
output.. = classes/ | ||
bin.includes = META-INF/,\ | ||
.,\ |
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,11 @@ | ||
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>tycho-its-project.osgitools.artifactsWithKnownLocation</groupId> | ||
<artifactId>parent</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
</parent> | ||
<artifactId>dependent</artifactId> | ||
<packaging>eclipse-plugin</packaging> | ||
</project> |
22 changes: 22 additions & 0 deletions
22
tycho-its/projects/target.eagerResolver/dependent/src/DependentExample.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,22 @@ | ||
/******************************************************************************* | ||
* 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 | ||
*******************************************************************************/ | ||
import org.apache.commons.lang3.StringUtils; | ||
import dependee.DependeeExample; | ||
|
||
public class DependentExample { | ||
|
||
public static void main(String[] args) { | ||
DependeeExample dependeeEx = new DependeeExample(); | ||
String s = " "; | ||
boolean sIsBlank = StringUtils.isBlank(s); | ||
|
||
System.out.println("s is blank: " + sIsBlank); | ||
System.out.println("bitfield is: " + dependeeEx.getBitField()); | ||
} | ||
} |
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,33 @@ | ||
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>tycho-its-project.osgitools.artifactsWithKnownLocation</groupId> | ||
<artifactId>parent</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
<packaging>pom</packaging> | ||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
<modules> | ||
<module>dependee</module> | ||
<module>dependent</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> | ||
<requireEagerResolve>true</requireEagerResolve> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
25 changes: 25 additions & 0 deletions
25
tycho-its/src/test/java/org/eclipse/tycho/test/target/TargetPlatformEagerResolverTest.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,25 @@ | ||
/******************************************************************************* | ||
* 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.target; | ||
|
||
import org.apache.maven.it.Verifier; | ||
import org.eclipse.tycho.test.AbstractTychoIntegrationTest; | ||
import org.junit.Test; | ||
|
||
import java.util.List; | ||
|
||
// See issue https://github.com/eclipse-tycho/tycho/issues/4653 | ||
public class TargetPlatformEagerResolverTest extends AbstractTychoIntegrationTest { | ||
@Test | ||
public void testTargetPlatformForJUnit5() throws Exception { | ||
Verifier verifier = getVerifier("target.eagerResolver", false, true); | ||
verifier.executeGoals(List.of("clean", "verify")); | ||
verifier.verifyErrorFreeLog(); | ||
} | ||
} |