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

Issue 2331: Enhanced test case for resolving product deps #2587

Merged
merged 2 commits into from
Jul 16, 2023
Merged
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
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="false">

<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