public String getAppServerDefaultDeploymentDir ( ) throws Exception { final String [ ] addressArr = { SUBSYSTEM , DEPLOYMENT_SCANNER , SCANNER , "default" } ; final Address address = Address . root ( ) . add ( addressArr ) ; final ModelNode resourceAttributes = readResource ( address ) ; if ( resourceAttributes == null ) { return null ; // there is no default scanner } final String path = resourceAttributes . get ( "path" ) . asString ( ) ; String relativeTo = null ; if ( resourceAttributes . hasDefined ( "relative-to" ) ) { relativeTo = resourceAttributes . get ( "relative-to" ) . asString ( ) ; } // path = the actual filesystem path to be scanned. Treated as an absolute path, // unless 'relative-to' is specified, in which case value is treated as relative to that path. // relative-to = Reference to a filesystem path defined in the "paths" section of the server // configuration, or one of the system properties specified on startup. // NOTE: here we will assume that if specified, it is a system property name. if ( relativeTo != null ) { String syspropValue = System . getProperty ( relativeTo ) ; if ( syspropValue == null ) { throw new IllegalStateException ( "Cannot support relative-to that isn't a sysprop: " + relativeTo ) ; } relativeTo = syspropValue ; } final File dir = new File ( relativeTo , path ) ; return dir . getAbsolutePath ( ) ; }
Returns the location where the default deployment scanner is pointing to . This is where EARs WARs and the like are deployed to .