Skip to content

Commit

Permalink
Update shared-lib name
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Wisniewski <[email protected]>
  • Loading branch information
Adam Wisniewski authored and Adam Wisniewski committed Oct 17, 2023
1 parent fa50d7a commit 7ec0f1a
Show file tree
Hide file tree
Showing 6 changed files with 689 additions and 658 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ private void addRuntimeDependencies(IProject project) throws CoreException {
// If the project is a java project, get classpath entries for runtime dependencies
if (project.isNatureEnabled(JavaCore.NATURE_ID)) {
List<IRuntimeClasspathEntry> runtimeDependencies = Arrays
.asList(JavaRuntime.computeUnresolvedRuntimeDependencies(JavaCore.create(project)));
.asList(JavaRuntime.computeUnresolvedRuntimeClasspath(JavaCore.create(project)));
for (IRuntimeClasspathEntry runtimeDependency : runtimeDependencies) {
if (!unresolvedClasspathEntries.contains(runtimeDependency)) {
unresolvedClasspathEntries.add(runtimeDependency);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ tasks.withType(JavaCompile) {
buildscript {
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
classpath 'io.openliberty.tools:liberty-gradle-plugin:3.6.2'
Expand All @@ -21,6 +22,7 @@ buildscript {

repositories {
mavenCentral()
mavenLocal()
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<groupId>test</groupId>
<artifactId>shared-lib</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,12 @@
import static io.openliberty.tools.eclipse.test.it.utils.SWTBotPluginOperations.refreshProjectUsingExplorerView;
import static io.openliberty.tools.eclipse.test.it.utils.SWTBotPluginOperations.setBuildCmdPathInPreferences;
import static io.openliberty.tools.eclipse.test.it.utils.SWTBotPluginOperations.unsetBuildCmdPathInPreferences;
import static org.junit.jupiter.api.Assertions.assertEquals;

import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
Expand Down Expand Up @@ -105,7 +108,7 @@ public class LibertyPluginSWTBotGradleTest extends AbstractLibertyPluginSWTBotTe
/**
* Shared lib jar project name.
*/
static final String MVN_SHARED_LIB_NAME = "test-shared-lib-jar";
static final String MVN_SHARED_LIB_NAME = "shared-lib";

static String testAppPath;
static String testWrapperAppPath;
Expand Down Expand Up @@ -142,6 +145,7 @@ public class LibertyPluginSWTBotGradleTest extends AbstractLibertyPluginSWTBotTe
/**
* Setup.
*
* @throws IOException
* @throws CoreException
* @throws InterruptedException
*/
Expand Down Expand Up @@ -171,6 +175,19 @@ public static void setup() throws Exception {
}
importMavenProjects(ResourcesPlugin.getWorkspace().getRoot().getLocation().toFile(), mavenProjectToInstall);

// Build shared lib project
Process process = new ProcessBuilder("mvn", "clean", "install").directory(sharedLibProjectPath.toFile()).start();

BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));

String line;
while ((line = reader.readLine()) != null) {
System.out.println(line);
}

int exitCode = process.waitFor();
assertEquals(0, exitCode, "Building of shared lib jar project failed with RC " + exitCode);

// Check basic plugin artifacts are functioning before running tests.
validateBeforeTestRun();

Expand Down Expand Up @@ -828,6 +845,8 @@ public void testDefaultJRECompliance() {
@Test
public void testDebugSourceLookupContent() {

deleteLibertyToolsRunConfigEntriesFromAppRunAs(GRADLE_APP_NAME);

Shell configShell = launchDebugConfigurationsDialogFromAppRunAs(GRADLE_APP_NAME);

boolean jarEntryFound = false;
Expand Down
Loading

0 comments on commit 7ec0f1a

Please sign in to comment.