[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-9150) What is the difference between this creation and what comes just below under //create temp deploy folder ?

Andre Dietisheim (JIRA) jira-events at lists.jboss.org
Wed Jun 15 10:03:29 EDT 2011


    [ https://issues.jboss.org/browse/JBIDE-9150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12608855#comment-12608855 ] 

Andre Dietisheim commented on JBIDE-9150:
-----------------------------------------

ServerUtil#createStandardFolders() :

{code}
public static void createStandardFolders(IServer server) {
	// create metadata area
	File location = JBossServerCorePlugin.getServerStateLocation(server).toFile();
	location.mkdirs();
	JBossServerCorePlugin.getServerStateLocation(server).append(IJBossToolingConstants.TEMP_DEPLOY).toFile().mkdirs();
		
	// create temp deploy folder
	JBossServer ds = ( JBossServer)server.loadAdapter(JBossServer.class, null);
	if( ds != null && !isJBoss7(server)) {
		File d1 = new File(location, IJBossRuntimeResourceConstants.DEPLOY);
		File d2 = new File(location, IJBossToolingConstants.TEMP_DEPLOY);
		d1.mkdirs();
		d2.mkdirs();
		if( !new File(ds.getDeployFolder()).equals(d1)) 
			new File(ds.getDeployFolder()).mkdirs();
		if( !new File(ds.getTempDeployFolder()).equals(d2))
			new File(ds.getTempDeployFolder()).mkdirs();
		IRuntime rt = server.getRuntime();
		IJBossServerRuntime jbsrt = (IJBossServerRuntime)rt.loadAdapter(IJBossServerRuntime.class, new NullProgressMonitor());
		if( jbsrt != null ) {
			String config = jbsrt.getJBossConfiguration();
			IPath newTemp = new Path(IJBossRuntimeResourceConstants.SERVER).append(config)
				.append(IJBossToolingConstants.TMP)
				.append(IJBossToolingConstants.JBOSSTOOLS_TMP).makeRelative();
			IPath newTempAsGlobal = ServerUtil.makeGlobal(jbsrt, newTemp);
			newTempAsGlobal.toFile().mkdirs();
		}
	}
}
{code}

The above code actually creates 2x a temp-deploy folder for server != as7. This should be fixed

> What is the difference between this creation and what comes just below under //create temp deploy folder ?
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: JBIDE-9150
>                 URL: https://issues.jboss.org/browse/JBIDE-9150
>             Project: Tools (JBoss Tools)
>          Issue Type: Sub-task
>          Components: JBossAS
>    Affects Versions: 3.3.0.M1
>            Reporter: Fisheye JIRA Integration
>             Fix For: 3.3.0.M2
>
>
> Created by Andre Dietisheim from Max Rydahl Andersen's Crucible comment on ServerUtil.java line 110 https://source.jboss.org/cru/REV-JBIDE-1#c1 :
> What is the difference between this creation and what comes just below under //create temp deploy folder ?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list