@@ -379,7 +379,7 @@ class DevTask extends AbstractFeatureTask {
379379 boolean libertyDebug , boolean pollingTest , boolean container , File containerfile , File containerBuildContext ,
380380 String containerRunOpts , int containerBuildTimeout , boolean skipDefaultPorts , boolean keepTempContainerfile ,
381381 String mavenCacheLocation , String packagingType , File buildFile , boolean generateFeatures , List<Path > webResourceDirs ,
382- List<ProjectModule > projectModuleList , Map<String , List<String > > parentBuildGradle
382+ List<ProjectModule > projectModuleList , Map<String , List<String > > parentBuildGradle , File serverOutputDir
383383 ) throws IOException , PluginExecutionException {
384384 super (buildDir, serverDirectory, sourceDirectory, testSourceDirectory, configDirectory, projectDirectory, /* multi module project directory */ projectDirectory,
385385 resourceDirs, changeOnDemandTestsAction, hotTests, skipTests, false /* skipUTs */ , false /* skipITs */ , skipInstallFeature, artifactId, serverStartTimeout,
@@ -388,7 +388,7 @@ class DevTask extends AbstractFeatureTask {
388388 null /* compileOptions not needed since useBuildRecompile is true */ , keepTempContainerfile, mavenCacheLocation, projectModuleList /* multi module upstream projects */ ,
389389 projectModuleList. size() > 0 /* recompileDependencies as true for multi module */ , packagingType, buildFile, parentBuildGradle /* parent build files */ , generateFeatures, null /* compileArtifactPaths */ , null /* testArtifactPaths */ , webResourceDirs /* webResources */
390390 );
391- this . libertyDirPropertyFiles = LibertyPropFilesUtility . getLibertyDirectoryPropertyFiles(new CommonLogger (project), installDirectory, userDirectory, serverDirectory);
391+ this . libertyDirPropertyFiles = LibertyPropFilesUtility . getLibertyDirectoryPropertyFiles(new CommonLogger (project), installDirectory, userDirectory, serverDirectory, serverOutputDir );
392392 ServerFeatureUtil servUtil = getServerFeatureUtil(true , libertyDirPropertyFiles);
393393 FeaturesPlatforms fp = servUtil. getServerFeatures(serverDirectory, libertyDirPropertyFiles);
394394
@@ -1246,11 +1246,11 @@ class DevTask extends AbstractFeatureTask {
12461246 initializeConfigDirectory();
12471247 File configDirectory = server. configDirectory;
12481248 // getOutputDir returns a string
1249- File serverOutputDir = new File (getOutputDir(project));
1249+ File outputDir = new File (getOutputDir(project));
12501250
12511251 if (! container) {
12521252 if (serverDirectory. exists()) {
1253- if (ServerStatusUtil . isServerRunning(serverInstallDir, serverOutputDir , serverName)) {
1253+ if (ServerStatusUtil . isServerRunning(serverInstallDir, outputDir , serverName)) {
12541254 throw new Exception (" The server " + serverName
12551255 + " is already running. Terminate all instances of the server before starting dev mode."
12561256 + " You can stop a server instance with the command 'gradle libertyStop'." );
@@ -1292,7 +1292,7 @@ class DevTask extends AbstractFeatureTask {
12921292 verifyAppStartTimeout. intValue(), verifyAppStartTimeout. intValue(), compileWait. doubleValue(),
12931293 libertyDebug. booleanValue(), pollingTest. booleanValue(), container. booleanValue(), containerfile, containerBuildContext, containerRunOpts,
12941294 containerBuildTimeout, skipDefaultPorts. booleanValue(), keepTempContainerfile. booleanValue(), localMavenRepoForFeatureUtility,
1295- DevTaskHelper . getPackagingType(project), buildFile, generateFeatures. booleanValue(), webResourceDirs, projectModules, parentBuildGradle
1295+ DevTaskHelper . getPackagingType(project), buildFile, generateFeatures. booleanValue(), webResourceDirs, projectModules, parentBuildGradle, new File (outputDir, serverName)
12961296 );
12971297 } catch (IOException | PluginExecutionException e) {
12981298 throw new GradleException (" Error initializing dev mode." , e)
0 commit comments