public static File getMuleLibFolder() { return new File(getMuleHomeFolder(), LIB_FOLDER); }
private File findRepositoryFolder(File artifactFile) { while (!getMuleHomeFolder().equals(artifactFile) && !REPOSITORY_FOLDER.equals(artifactFile.getName())) { artifactFile = artifactFile.getParentFile(); } if (!REPOSITORY_FOLDER.equals(artifactFile.getName()) || !artifactFile.isDirectory()) { throw new IllegalStateException("Unable to find repository folder for artifact " + artifactFile.getAbsolutePath()); } return artifactFile; }
/** * @return the mule runtime base folder. */ public static File getMuleBaseFolder() { File muleBase = getMuleBase().orElse(null); if (muleBase == null) { muleBase = getMuleHomeFolder(); } return muleBase; }
protected File getLogConfigFile(M artifactModel) { File logConfigFile = null; if (artifactModel.getLogConfigFile() != null) { Path logConfigFilePath = new File(artifactModel.getLogConfigFile()).toPath(); Path muleHomeFolderPath = getMuleHomeFolder().toPath(); logConfigFile = muleHomeFolderPath.resolve(logConfigFilePath).toFile(); } return logConfigFile; }
@Test public void getsMuleHome() throws Exception { MuleTestUtils.testWithSystemProperty(MuleProperties.MULE_HOME_DIRECTORY_PROPERTY, muleHome.getRoot().getAbsolutePath(), () -> { File folder = MuleFoldersUtil.getMuleHomeFolder(); assertThat(folder.getAbsolutePath(), equalTo(muleHome.getRoot().getAbsolutePath())); }); } }
private File findRepositoryFolder(File artifactFile) { while (!getMuleHomeFolder().equals(artifactFile) && !REPOSITORY_FOLDER.equals(artifactFile.getName())) { artifactFile = artifactFile.getParentFile(); } if (!REPOSITORY_FOLDER.equals(artifactFile.getName()) || !artifactFile.isDirectory()) { throw new IllegalStateException("Unable to find repository folder for artifact " + artifactFile.getAbsolutePath()); } return artifactFile; }
File containerRepository; if (isStandalone() && !getBoolean("mule.mode.embedded")) { containerRepository = new File(getMuleHomeFolder(), "repository"); if (!containerRepository.exists()) { if (!containerRepository.mkdirs()) {