Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Commit

Permalink
Fix more itest dependency resolution issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
Simeon Pinder committed Jul 23, 2014
1 parent d4c78b6 commit 5da8c5e
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ public abstract class AbstractAgentPluginTest extends Arquillian {
@Deployment(name = "platform", order = 1)
public static RhqAgentPluginArchive getPlatformPlugin() throws Exception {
MavenResolverSystem mavenDependencyResolver = Maven.resolver();
// String platformPluginArtifact = "org.rhq:rhq-platform-plugin:jar:" + getRhqVersion();
String platformPluginArtifact = "org.rhq:rhq-platform-plugin:jar:" + getPlatformPluginVersion();

return mavenDependencyResolver.offline().loadPomFromFile("pom.xml").resolve(platformPluginArtifact)
Expand Down Expand Up @@ -148,7 +147,13 @@ protected static File getPluginJarFile() {
File targetDir = new File("target").getAbsoluteFile();
File[] files = targetDir.listFiles(new FilenameFilter() {
public boolean accept(File dir, String name) {
return (name.endsWith("-" + getRhqVersion() + ".jar"));
boolean locatedPlugin = name.endsWith("-" + getRhqVersion() + ".jar");
if (!locatedPlugin) {//try again to look for -redhat-*.jar
if (((name.indexOf(getRhqVersion() + "-redhat-")) > -1) && (name.endsWith("*.jar"))) {
locatedPlugin = true;
}
}
return locatedPlugin;
}
});
return files[0];
Expand Down Expand Up @@ -640,7 +645,7 @@ private long getDefaultTimeout(ResourceType resourceType, String operationName)
private static String getRhqVersion() {
MavenArtifactProperties rhqPluginContainerPom = null;
try {
rhqPluginContainerPom = MavenArtifactProperties.getInstance("org.rhq", "rhq-core-plugin-container");
rhqPluginContainerPom = MavenArtifactProperties.getInstance("org.rhq", "rhq-parent");
} catch (MavenArtifactNotFoundException e) {
throw new RuntimeException(e);
}
Expand Down

0 comments on commit 5da8c5e

Please sign in to comment.