@Override public void configureNexus() { final Properties nexusProperties = new Properties(); nexusProperties.setProperty("application-port", String.valueOf(getPort())); nexusProperties.setProperty("application-port-ssl", String.valueOf(getSslPort())); nexusProperties.setProperty(commandMonitorProperty(), String.valueOf(commandMonitorPort)); nexusProperties.setProperty(keepAliveProperty(), String.valueOf(keepAlivePort)); if (getConfiguration().getContextPath() != null) { nexusProperties.setProperty("nexus-webapp-context-path", getConfiguration().getContextPath()); } final Map<String, String> systemProperties = getConfiguration().getSystemProperties(); if (!systemProperties.isEmpty()) { for (final Map.Entry<String, String> entry : systemProperties.entrySet()) { nexusProperties.setProperty(entry.getKey(), entry.getValue() == null ? "true" : entry.getValue()); } } onDirectory(getConfiguration().getTargetDirectory()).apply( fileTaskBuilder.properties(path("nexus/conf/nexus-test.properties")) .properties(nexusProperties) ); }
@Override public void configureNexus() { onDirectory(getConfiguration().getTargetDirectory()).apply( fileTaskBuilder.properties(path("nexus/conf/nexus.properties")) .property("application-port", String.valueOf(getPort())) ); }
private void makeExecutable(final File baseDir, final String scriptName) { if (!Os.isFamily(Os.FAMILY_WINDOWS)) { onDirectory(baseDir).apply( fileTaskBuilder.chmod(path("/")) .include("**/" + scriptName) .permissions("u+x") ); } }
onDirectory( config.getTargetDirectory() ).apply( getFileTaskBuilder().copy() .file( file( serverXml ) )
@Override protected void createBundle() { BundleConfiguration config = getConfiguration(); File bundle = config.getBundle(); if ( bundle == null ) { return; } if ( bundle.isDirectory() ) { onDirectory( config.getTargetDirectory() ).apply( getFileTaskBuilder().copy().directory( file( bundle ) ) .to().directory( path( "/" ) ) ); } else { onDirectory( config.getTargetDirectory() ).apply( getFileTaskBuilder().expand( file( bundle ) ) .exclude( "*/contexts/**" ) .exclude( "*/contexts-available/**" ) .exclude( "*/javadoc/**" ) .exclude( "*/overlays/**" ) .exclude( "*/webapps/**" ) .to().directory( path( "/" ) ) ); } }
private void installWARs() { final SCBC config = getConfiguration(); final List<WAR> wars = config.getWARs(); for ( WAR war : wars ) { if ( war.getFile().isDirectory() ) { onDirectory( config.getTargetDirectory() ).apply( getFileTaskBuilder().copy() .directory( file( war.getFile() ) ) .to().directory( path( getName() + "/" + getWebAppPath() + "/" + war.getContext() ) ) ); } else { onDirectory( config.getTargetDirectory() ).apply( getFileTaskBuilder().expand( file( war.getFile() ) ) .to().directory( path( getName() + "/" + getWebAppPath() + "/" + war.getContext() ) ) ); } } }
onDirectory(nexusDir).apply( fileTaskBuilder.exec().spawn() .script(path("bin/nexus" + (Os.isFamily(Os.FAMILY_WINDOWS) ? ".bat" : "")))