forked from bndtools/bnd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fail test showing gav is not working in BndPomRepo
this PomRepositoryTest. testGetViaBSNAndGAV() will fail, which we try to fix in the next commit. Signed-off-by: Christoph Rueger <[email protected]>
- Loading branch information
1 parent
7c3e51f
commit 39eca3c
Showing
4 changed files
with
87 additions
and
11 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
biz.aQute.repository/test/aQute/bnd/repository/maven/helpers/MavenRepoTestHelper.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,33 @@ | ||
package aQute.bnd.repository.maven.helpers; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
import java.io.File; | ||
|
||
import aQute.bnd.service.RepositoryPlugin; | ||
import aQute.bnd.version.Version; | ||
|
||
public class MavenRepoTestHelper { | ||
|
||
/** | ||
* This method is called by two maven repo tests to ensure that both repos | ||
* behave the same and can get a resource by bns and gav in case both are | ||
* available. | ||
* | ||
* @param repo | ||
* @throws Exception | ||
*/ | ||
public static void assertMavenReposGetViaBSNAndGAV(RepositoryPlugin repo) throws Exception { | ||
assertEquals(1, repo.list("org.apache.commons.cli") | ||
.size()); | ||
System.out.println(repo.list("org.apache.commons.cli")); | ||
System.out.println(repo.versions("org.apache.commons.cli")); | ||
File f12maven = repo.get("commons-cli:commons-cli", new Version("1.2.0"), null); | ||
File f12osgi = repo.get("org.apache.commons.cli", new Version("1.2.0"), null); | ||
|
||
assertEquals("commons-cli-1.2.jar", f12maven.getName()); | ||
assertEquals(f12maven, f12osgi); | ||
|
||
} | ||
|
||
} |
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
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
20 changes: 20 additions & 0 deletions
20
biz.aQute.repository/testdata/pomrepo/simpleGetViaBSNAndGAV.xml
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,20 @@ | ||
<?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>test</groupId> | ||
<artifactId>test</artifactId> | ||
<version>1.0.0</version> | ||
<packaging>pom</packaging> | ||
|
||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>commons-cli</groupId> | ||
<artifactId>commons-cli</artifactId> | ||
<version>1.2</version> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
||
</project> |