Skip to content

Commit

Permalink
Issue 2331: Enhanced test case for resolving product deps
Browse files Browse the repository at this point in the history
  • Loading branch information
BenShelbourne committed Jun 26, 2023
1 parent e3e22e2 commit 34c7319
Show file tree
Hide file tree
Showing 8 changed files with 165 additions and 2 deletions.
8 changes: 8 additions & 0 deletions tycho-its/projects/issue2331/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: Bundle01 Plug-in
Bundle-SymbolicName: ISSUE2331passwordProtectedCompositeP2Repository.bundle
Bundle-Version: 0.0.1.qualifier
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Export-Package: bundle01
Require-Bundle: org.eclipse.osgi;bundle-version="3.2.0"
4 changes: 4 additions & 0 deletions tycho-its/projects/issue2331/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/,\
.
23 changes: 23 additions & 0 deletions tycho-its/projects/issue2331/bundle/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2008 Arm Ltd. All rights reserved. This program
and the accompanying materials are made available under the terms of
the Eclipse Public License v1.0 which accompanies this distribution,
and is available at https://www.eclipse.org/legal/epl-v10.html
-->
<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 https://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<artifactId>ISSUE2331passwordProtectedCompositeP2Repository.bundle</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

<parent>
<groupId>Issue2331passwordProtectedCompositeP2Repository</groupId>
<artifactId>Issue2331passwordProtectedCompositeP2Repository.parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>

</project>
78 changes: 78 additions & 0 deletions tycho-its/projects/issue2331/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2008 Sonatype, Inc. All rights reserved. This program
and the accompanying materials are made available under the terms of
the Eclipse Public License v1.0 which accompanies this distribution,
and is available at https://www.eclipse.org/legal/epl-v10.html
-->
<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 https://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>Issue2331passwordProtectedCompositeP2Repository</groupId>
<artifactId>Issue2331passwordProtectedCompositeP2Repository.parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>

<modules>
<module>bundle</module>
<module>product</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>
<resolver>p2</resolver>
</configuration>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>repository</id>
<repositories>
<repository>
<id>test-server</id>
<layout>p2</layout>
<url>${p2.repo}</url>
</repository>
</repositories>
</profile>

<profile>
<id>target-definition</id>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho-version}</version>
<configuration>
<resolver>p2</resolver>
<target>
<artifact>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
<classifier>platform</classifier>
</artifact>
</target>
</configuration>
</plugin>
</plugins>
</build>
</profile>

</profiles>
</project>
19 changes: 19 additions & 0 deletions tycho-its/projects/issue2331/product/issue2331.product
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>

<product uid="issue2331" version="0.0.1.qualifier" useFeatures="false" includeLaunchers="true">

<configIni use="default">
</configIni>

<launcherArgs>
<vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts
</vmArgsMac>
</launcherArgs>

<plugins>
<plugin id="org.eclipse.osgi"/>
</plugins>


</product>
23 changes: 23 additions & 0 deletions tycho-its/projects/issue2331/product/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2008 Arm Ltd. All rights reserved. This program
and the accompanying materials are made available under the terms of
the Eclipse Public License v1.0 which accompanies this distribution,
and is available at https://www.eclipse.org/legal/epl-v10.html
-->
<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 https://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<artifactId>ISSUE2331passwordProtectedCompositeP2Repository.product</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>eclipse-repository</packaging>

<parent>
<groupId>Issue2331passwordProtectedCompositeP2Repository</groupId>
<artifactId>Issue2331passwordProtectedCompositeP2Repository.parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>

</project>
9 changes: 9 additions & 0 deletions tycho-its/projects/issue2331/settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<settings>
<servers>
<server>
<id>test-server</id>
<username>test-user</username>
<password>test-password</password>
</server>
</servers>
</settings>
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ private Verifier createVerifier(String settingsFile) throws Exception {
}

private Verifier createVerifier(String settingsFile, String settingsSecurityFile) throws Exception {
Verifier verifier = getVerifier("target.httpAuthentication", false,
new File("projects/target.httpAuthentication/" + settingsFile));
Verifier verifier = getVerifier("issue2331", false, new File("projects/issue2331/" + settingsFile));
Properties systemProperties = verifier.getSystemProperties();
systemProperties.setProperty("p2.repo", p2RepoUrl);
if (settingsSecurityFile != null) {
Expand Down

0 comments on commit 34c7319

Please sign in to comment.