Skip to content

Commit

Permalink
Add test about consideration of properties in maven.config
Browse files Browse the repository at this point in the history
  • Loading branch information
HannesWell committed Feb 20, 2024
1 parent dea2df6 commit e8a3f83
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<extensions>
<extension>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-build</artifactId>
<version>${tycho-version-for-extension-test}</version>
</extension>
</extensions>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-Dtycho-version-for-extension-test=4.0.6
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Bundle
Bundle-SymbolicName: my.bundle3
Bundle-Version: 1.0.0.qualifier
Automatic-Module-Name: my.bundle
Bundle-RequiredExecutionEnvironment: JavaSE-17
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.
20 changes: 20 additions & 0 deletions org.eclipse.m2e.core.tests/resources/projects/mavenConfig/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>test</groupId>
<artifactId>tycho-pomless</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>bundle</module>
</modules>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho-version-for-extension-test}</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2022 Christoph Läubrich and others.
* Copyright (c) 2022, 2023 Christoph Läubrich and others.
* All rights reserved. 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
Expand Down Expand Up @@ -73,15 +73,25 @@ public void testLoadSameExtensionFromMultipleLocations() throws Exception {

@Test
public void testReloadExtensionAfterDeletion() throws Exception {
IProject project1 = importPomlessProject("pomless", "bundle/pom.xml");
IProject project = importPomlessProject("pomless", "bundle/pom.xml");

waitForJobsToComplete(monitor);
assertEquals("my.bundle", project1.getName());
assertEquals("my.bundle", project.getName());

WorkspaceHelpers.cleanWorkspace();

project1 = importPomlessProject("pomless", "bundle/pom.xml");
project = importPomlessProject("pomless", "bundle/pom.xml");
waitForJobsToComplete(monitor);
assertEquals("my.bundle", project1.getName());
assertEquals("my.bundle", project.getName());
}

@Test
public void testMavenConfigWithCoreExtension() throws Exception {
IProject project = importPomlessProject("mavenConfig", "bundle/pom.xml");

assertEquals("my.bundle3", project.getName());
assertTrue(project.hasNature("org.eclipse.m2e.core.maven2Nature"));
assertNoErrors(project);
}

@Test
Expand Down

0 comments on commit e8a3f83

Please sign in to comment.