You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by pa...@apache.org on 2010/09/20 17:37:04 UTC
svn commit: r998959 [2/2] - in
/directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers:
./ archive/ bin/ deb/ macosxpkg/ nsis/ rpm/ solarispkg/
Modified: directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmInstallerCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmInstallerCommand.java?rev=998959&r1=998958&r2=998959&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmInstallerCommand.java (original)
+++ directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/rpm/RpmInstallerCommand.java Mon Sep 20 15:37:03 2010
@@ -24,22 +24,18 @@ import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
-import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
-import org.apache.directory.daemon.installers.MojoCommand;
+import org.apache.directory.daemon.installers.AbstractMojoCommand;
+import org.apache.directory.daemon.installers.GenerateMojo;
import org.apache.directory.daemon.installers.MojoHelperUtils;
-import org.apache.directory.daemon.installers.ServiceInstallersMojo;
import org.apache.directory.daemon.installers.Target;
-
import org.apache.maven.artifact.Artifact;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.plugin.logging.Log;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.taskdefs.Touch;
-
import org.codehaus.plexus.util.FileUtils;
import org.codehaus.plexus.util.Os;
@@ -49,21 +45,16 @@ import org.codehaus.plexus.util.Os;
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
-public class RpmInstallerCommand extends MojoCommand
+public class RpmInstallerCommand extends AbstractMojoCommand<RpmTarget>
{
private final Properties filterProperties = new Properties( System.getProperties() );
- private final RpmTarget target;
private final File rpmConfigurationFile;
- private final Log log;
-
private File rpmBuilder;
- public RpmInstallerCommand( ServiceInstallersMojo mymojo, RpmTarget target )
+ public RpmInstallerCommand( GenerateMojo mojo, RpmTarget target )
{
- super( mymojo );
- this.target = target;
- this.log = mymojo.getLog();
+ super( mojo, target );
File imagesDir = target.getLayout().getInstallationDirectory().getParentFile();
rpmConfigurationFile = new File( imagesDir, target.getId() + ".spec" );
initializeFiltering();
@@ -152,25 +143,25 @@ public class RpmInstallerCommand extends
// Step 2 & 3: copy rpm spec file and filter
// -------------------------------------------------------------------
- String version = target.getApplication().getVersion().replace( '-', '_' );
+ String version = mojo.getProject().getVersion().replace( '-', '_' );
// TODO FIXME
// if ( target.getScriptFile() != null && target.getScriptFile().exists() )
// {
// try
// {
- // MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, target.getScriptFile(),
+ // MojoHelperUtils.copyAsciiFile( mojo, filterProperties, target.getScriptFile(),
// target.getLayout().getInitScript(), true );
// }
// catch ( IOException e )
// {
- // mymojo.getLog().error( "Failed to copy project supplied init script " + target.getScriptFile()
+ // mojo.getLog().error( "Failed to copy project supplied init script " + target.getScriptFile()
// + " into position " + target.getLayout().getInitScript(), e );
// }
//
- // if ( mymojo.getLog().isInfoEnabled() )
+ // if ( mojo.getLog().isInfoEnabled() )
// {
- // mymojo.getLog().info( "Using project supplied init script file: "
+ // mojo.getLog().info( "Using project supplied init script file: "
// + target.getScriptFile() );
// }
// }
@@ -178,24 +169,24 @@ public class RpmInstallerCommand extends
// {
// try
// {
- // MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, getClass().getResourceAsStream(
+ // MojoHelperUtils.copyAsciiFile( mojo, filterProperties, getClass().getResourceAsStream(
// "server.init" ), target.getLayout().getInitScript(), true );
// }
// catch ( IOException e )
// {
- // mymojo.getLog().error(
+ // mojo.getLog().error(
// "Failed to copy init script " + getClass().getResource( "server.init" ) + " into position "
// + target.getLayout().getInitScript(), e );
// }
// }
// check first to see if the default spec file is present in src/main/installers
- File projectRpmFile = new File( mymojo.getSourceDirectory(), "spec.template" );
+ File projectRpmFile = new File( mojo.getSourceDirectory(), "spec.template" );
if ( target.getRpmSpecificationFile() != null && target.getRpmSpecificationFile().exists() )
{
try
{
- MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, target.getRpmSpecificationFile(),
+ MojoHelperUtils.copyAsciiFile( mojo, filterProperties, target.getRpmSpecificationFile(),
rpmConfigurationFile, true );
}
catch ( IOException e )
@@ -208,7 +199,7 @@ public class RpmInstallerCommand extends
{
try
{
- MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, projectRpmFile, rpmConfigurationFile, true );
+ MojoHelperUtils.copyAsciiFile( mojo, filterProperties, projectRpmFile, rpmConfigurationFile, true );
}
catch ( IOException e )
{
@@ -222,7 +213,7 @@ public class RpmInstallerCommand extends
URL resource = getClass().getResource( "spec.template" );
try
{
- MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, in, rpmConfigurationFile, true );
+ MojoHelperUtils.copyAsciiFile( mojo, filterProperties, in, rpmConfigurationFile, true );
}
catch ( IOException e )
{
@@ -242,13 +233,13 @@ public class RpmInstallerCommand extends
"_topdir " + target.getRpmTopDir().getAbsolutePath(),
rpmConfigurationFile.getAbsolutePath() };
MojoHelperUtils.exec( cmd, target.getLayout().getInstallationDirectory().getParentFile(), target.isDoSudo() );
- String rpmName = target.getApplication().getName() + "-" + version + "-0." + target.getOsArch() + ".rpm";
+ String rpmName = "apacheds-" + version + "-0." + target.getOsArch() + ".rpm";
File srcFile = new File( target.getRpmTopDir(), "RPMS/" + target.getOsArch() + "/" + rpmName );
File dstFile = null;
if ( target.getFinalName() == null )
{
- dstFile = new File( mymojo.getOutputDirectory(), rpmName );
+ dstFile = new File( mojo.getOutputDirectory(), rpmName );
}
else
{
@@ -258,7 +249,7 @@ public class RpmInstallerCommand extends
finalName = finalName + ".rpm";
}
- dstFile = new File( mymojo.getOutputDirectory(), finalName );
+ dstFile = new File( mojo.getOutputDirectory(), finalName );
}
try
@@ -276,60 +267,60 @@ public class RpmInstallerCommand extends
private void initializeFiltering()
{
- filterProperties.putAll( mymojo.getProject().getProperties() );
- filterProperties.put( "app", target.getApplication().getName() );
- filterProperties.put( "app.caps", target.getApplication().getName().toUpperCase() );
- filterProperties.put( "app.java.home", "java" );
-
- char firstChar = target.getApplication().getName().charAt( 0 );
- firstChar = Character.toUpperCase( firstChar );
- filterProperties.put( "app.display.name", firstChar + target.getApplication().getName().substring( 1 ) );
- filterProperties.put( "app.release", "0" );
- filterProperties.put( "app.license.type", target.getApplication().getLicenseType() );
-
- String version = target.getApplication().getVersion().replace( '-', '_' );
- if ( target.getApplication().getVersion() != null )
- {
- filterProperties.put( "app.version", version );
- }
- else
- {
- filterProperties.put( "app.version", "1.0" );
- }
+ filterProperties.putAll( mojo.getProject().getProperties() );
+ // filterProperties.put( "app", target.getApplication().getName() );
+ // filterProperties.put( "app.caps", target.getApplication().getName().toUpperCase() );
+ // filterProperties.put( "app.java.home", "java" );
+ //
+ // char firstChar = target.getApplication().getName().charAt( 0 );
+ // firstChar = Character.toUpperCase( firstChar );
+ // filterProperties.put( "app.display.name", firstChar + target.getApplication().getName().substring( 1 ) );
+ // filterProperties.put( "app.release", "0" );
+ // filterProperties.put( "app.license.type", target.getApplication().getLicenseType() );
+ //
+ // String version = target.getApplication().getVersion().replace( '-', '_' );
+ // if ( target.getApplication().getVersion() != null )
+ // {
+ // filterProperties.put( "app.version", version );
+ // }
+ // else
+ // {
+ // filterProperties.put( "app.version", "1.0" );
+ // }
// -------------------------------------------------------------------
// WARNING: hard code values just to for testing
// -------------------------------------------------------------------
// @todo use the list of committers and add multiple authors to inno
- if ( target.getApplication().getAuthors().isEmpty() )
- {
- filterProperties.put( "app.author", "Apache Software Foundation" );
- }
- else
- {
- filterProperties.put( "app.author", target.getApplication().getAuthors().get( 0 ) );
- }
-
- if ( target.getFinalName() != null )
- {
- filterProperties.put( "app.final.name", target.getFinalName() );
- }
- else
- {
- String finalName = target.getApplication().getName() + "-" + target.getApplication().getVersion()
- + "-linux-" + target.getOsArch() + ".rpm";
- filterProperties.put( "app.final.name", finalName );
- }
-
- filterProperties.put( "app.email", target.getApplication().getEmail() );
- filterProperties.put( "app.url", target.getApplication().getUrl() );
- filterProperties.put( "app.java.version", target.getApplication().getMinimumJavaVersion() );
- filterProperties.put( "app.license", target.getLayout().getLicenseFile().getPath() );
- filterProperties.put( "app.license.name", target.getLayout().getLicenseFile().getName() );
- filterProperties.put( "app.company.name", target.getCompanyName() );
- filterProperties.put( "app.description", target.getApplication().getDescription() );
- filterProperties.put( "app.copyright.year", target.getCopyrightYear() );
+ // if ( target.getApplication().getAuthors().isEmpty() )
+ // {
+ // filterProperties.put( "app.author", "Apache Software Foundation" );
+ // }
+ // else
+ // {
+ // filterProperties.put( "app.author", target.getApplication().getAuthors().get( 0 ) );
+ // }
+ //
+ // if ( target.getFinalName() != null )
+ // {
+ // filterProperties.put( "app.final.name", target.getFinalName() );
+ // }
+ // else
+ // {
+ // String finalName = target.getApplication().getName() + "-" + target.getApplication().getVersion()
+ // + "-linux-" + target.getOsArch() + ".rpm";
+ // filterProperties.put( "app.final.name", finalName );
+ // }
+ //
+ // filterProperties.put( "app.email", target.getApplication().getEmail() );
+ // filterProperties.put( "app.url", target.getApplication().getUrl() );
+ // filterProperties.put( "app.java.version", target.getApplication().getMinimumJavaVersion() );
+ // filterProperties.put( "app.license", target.getLayout().getLicenseFile().getPath() );
+ // filterProperties.put( "app.license.name", target.getLayout().getLicenseFile().getName() );
+ // filterProperties.put( "app.company.name", target.getCompanyName() );
+ // filterProperties.put( "app.description", target.getApplication().getDescription() );
+ // filterProperties.put( "app.copyright.year", target.getCopyrightYear() );
// TODO FIXME
// if ( !target.getLayout().getReadmeFile().exists() )
@@ -346,21 +337,21 @@ public class RpmInstallerCommand extends
// filterProperties.put( "installer.output.directory", target.getLayout().getBaseDirectory().getParent() );
// filterProperties.put( "server.init", target.getLayout().getInitScript().getName() );
// filterProperties.put( "app.install.base", "/opt/" + target.getApplication().getName() + "-" + version );
-
-
- File noticeFile = new File( target.getLayout().getInstallationDirectory(), "NOTICE.txt" );
- if ( noticeFile.exists() )
- {
- filterProperties.put( "install.notice.file", "install -m 644 " + target.getLayout().getInstallationDirectory()
- + "/NOTICE.txt $RPM_BUILD_ROOT/opt/" + target.getApplication().getName() + "-%{version}" );
- filterProperties.put( "verify.notice.file", "/opt/" + target.getApplication().getName()
- + "-%{version}/NOTICE.txt" );
- }
- else
- {
- filterProperties.put( "install.notice.file", "" );
- filterProperties.put( "verify.notice.file", "" );
- }
+ //
+ // File noticeFile = new File( target.getLayout().getInstallationDirectory(), "NOTICE.txt" );
+ // if ( noticeFile.exists() )
+ // {
+ // filterProperties.put( "install.notice.file", "install -m 644 "
+ // + target.getLayout().getInstallationDirectory()
+ // + "/NOTICE.txt $RPM_BUILD_ROOT/opt/" + target.getApplication().getName() + "-%{version}" );
+ // filterProperties.put( "verify.notice.file", "/opt/" + target.getApplication().getName()
+ // + "-%{version}/NOTICE.txt" );
+ // }
+ // else
+ // {
+ // filterProperties.put( "install.notice.file", "" );
+ // filterProperties.put( "verify.notice.file", "" );
+ // }
}
@@ -380,7 +371,7 @@ public class RpmInstallerCommand extends
String path = file.getAbsolutePath().substring( basePathSize );
buf.append( "mkdir -p $RPM_BUILD_ROOT/opt/" );
- buf.append( target.getApplication().getName() );
+ buf.append( "apacheds" );
buf.append( "-%{version}/" );
buf.append( path );
buf.append( "\n" );
@@ -405,7 +396,7 @@ public class RpmInstallerCommand extends
String path = file.getAbsolutePath().substring( basePathSize );
buf.append( "mkdir -p $RPM_BUILD_ROOT/opt/" );
- buf.append( target.getApplication().getName() );
+ buf.append( "apacheds" );
buf.append( "-%{version}/" );
buf.append( path );
buf.append( "\n" );
@@ -455,7 +446,7 @@ public class RpmInstallerCommand extends
buf.append( target.getLayout().getInstallationDirectory() ).append( "/" );
buf.append( path );
buf.append( " $RPM_BUILD_ROOT/opt/" );
- buf.append( target.getApplication().getName() );
+ buf.append( "apacheds" );
buf.append( "-%{version}/" );
buf.append( path );
buf.append( "\n" );
@@ -475,7 +466,7 @@ public class RpmInstallerCommand extends
File file = ( File ) docList.get( ii );
String path = file.getAbsolutePath().substring( basePathSize );
buf.append( target.getLayout().getInstallationDirectory() );
- buf.append( target.getApplication().getName() );
+ buf.append( "apacheds" );
buf.append( "-%{version}/" );
buf.append( path );
buf.append( "\n" );
@@ -503,7 +494,7 @@ public class RpmInstallerCommand extends
buf.append( target.getLayout().getInstallationDirectory() ).append( "/" );
buf.append( path );
buf.append( " $RPM_BUILD_ROOT/opt/" );
- buf.append( target.getApplication().getName() );
+ buf.append( "apacheds" );
buf.append( "-%{version}/" );
buf.append( path );
buf.append( "\n" );
@@ -523,7 +514,7 @@ public class RpmInstallerCommand extends
File file = ( File ) sourceList.get( ii );
String path = file.getAbsolutePath().substring( basePathSize );
buf.append( "/opt/" );
- buf.append( target.getApplication().getName() );
+ buf.append( "apacheds" );
buf.append( "-%{version}/" );
buf.append( path );
buf.append( "\n" );
@@ -540,7 +531,7 @@ public class RpmInstallerCommand extends
{
File artifact = ( ( Artifact ) artifacts.get( ii ) ).getFile();
buf.append( "/opt/" );
- buf.append( target.getApplication().getName() );
+ buf.append( "apacheds" );
buf.append( "-%{version}/lib/" );
buf.append( artifact.getName() );
buf.append( "\n" );
@@ -560,7 +551,7 @@ public class RpmInstallerCommand extends
File artifact = ( ( Artifact ) artifacts.get( ii ) ).getFile();
buf.append( artifact.getAbsoluteFile() );
buf.append( " $RPM_BUILD_ROOT/opt/" );
- buf.append( target.getApplication().getName() );
+ buf.append( "apacheds" );
buf.append( "-%{version}/lib/" );
buf.append( artifact.getName() );
buf.append( "\n" );
@@ -581,8 +572,8 @@ public class RpmInstallerCommand extends
private void buildSourceTarball() throws MojoFailureException
{
- String version = target.getApplication().getVersion().replace( '-', '_' );
- String dirname = target.getApplication().getName() + "-" + version;
+ String version = mojo.getProject().getVersion().replace( '-', '_' );
+ String dirname = "apacheds-" + version;
File sourcesDir = new File( target.getLayout().getInstallationDirectory().getParentFile(), dirname );
try
{
@@ -598,8 +589,7 @@ public class RpmInstallerCommand extends
{
"tar",
"-zcvf",
- target.getRpmTopDir().getAbsolutePath() + "/SOURCES/" + target.getApplication().getName() + "-"
- + version + ".tar.gz",
+ target.getRpmTopDir().getAbsolutePath() + "/SOURCES/apacheds-" + version + ".tar.gz",
sourcesDir.getAbsolutePath() };
MojoHelperUtils.exec( cmd, target.getLayout().getInstallationDirectory().getParentFile(), target.isDoSudo() );
Modified: directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/solarispkg/SolarisPkgInstallerCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/solarispkg/SolarisPkgInstallerCommand.java?rev=998959&r1=998958&r2=998959&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/solarispkg/SolarisPkgInstallerCommand.java (original)
+++ directory/apacheds/branches/apacheds-apacheds-2.0/installers-plugin/src/main/java/org/apache/directory/daemon/installers/solarispkg/SolarisPkgInstallerCommand.java Mon Sep 20 15:37:03 2010
@@ -24,12 +24,11 @@ import java.io.File;
import java.io.IOException;
import java.util.Properties;
-import org.apache.directory.daemon.installers.MojoCommand;
+import org.apache.directory.daemon.installers.AbstractMojoCommand;
+import org.apache.directory.daemon.installers.GenerateMojo;
import org.apache.directory.daemon.installers.MojoHelperUtils;
-import org.apache.directory.daemon.installers.ServiceInstallersMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.plugin.logging.Log;
import org.apache.tools.ant.taskdefs.Execute;
@@ -38,13 +37,9 @@ import org.apache.tools.ant.taskdefs.Exe
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
-public class SolarisPkgInstallerCommand extends MojoCommand
+public class SolarisPkgInstallerCommand extends AbstractMojoCommand<SolarisPkgTarget>
{
private final Properties filterProperties = new Properties( System.getProperties() );
- /** The PKG target */
- private final SolarisPkgTarget target;
- /** The Maven logger */
- private final Log log;
private File pkgMaker;
private File pkgTranslator;
@@ -53,16 +48,14 @@ public class SolarisPkgInstallerCommand
/**
* Creates a new instance of SolarisPkgInstallerCommand.
*
- * @param mymojo
+ * @param mojo
* the Server Installers Mojo
* @param target
* the PKG target
*/
- public SolarisPkgInstallerCommand( ServiceInstallersMojo mymojo, SolarisPkgTarget target )
+ public SolarisPkgInstallerCommand( GenerateMojo mojo, SolarisPkgTarget target )
{
- super( mymojo );
- this.target = target;
- this.log = mymojo.getLog();
+ super( mojo, target );
initializeFiltering();
}
@@ -134,7 +127,7 @@ public class SolarisPkgInstallerCommand
MojoHelperUtils.copyFiles( baseDirectory, apacheDsHomeDirectory );
// Replacing the apacheds.conf file
- MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, getClass().getResourceAsStream( "apacheds.conf" ),
+ MojoHelperUtils.copyAsciiFile( mojo, filterProperties, getClass().getResourceAsStream( "apacheds.conf" ),
new File( apacheDsHomeDirectory, "conf/apacheds.conf" ), false );
}
catch ( IOException e )
@@ -159,20 +152,20 @@ public class SolarisPkgInstallerCommand
try
{
// Copying the apacheds.conf file in the default instance conf directory
- MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, getClass().getResourceAsStream(
+ MojoHelperUtils.copyAsciiFile( mojo, filterProperties, getClass().getResourceAsStream(
"apacheds-default.conf" ), new File( debDefaultInstanceConfDirectory, "apacheds.conf" ), false );
// Copying the log4j.properties file in the default instance conf directory
- MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, new File( apacheDsHomeDirectory,
+ MojoHelperUtils.copyAsciiFile( mojo, filterProperties, new File( apacheDsHomeDirectory,
"conf/log4j.properties" ), new File( debDefaultInstanceConfDirectory, "log4j.properties" ), false );
// Copying the server.xml file in the default instance conf directory
- MojoHelperUtils.copyAsciiFile( mymojo, filterProperties,
+ MojoHelperUtils.copyAsciiFile( mojo, filterProperties,
new File( apacheDsHomeDirectory, "conf/server.xml" ), new File( debDefaultInstanceConfDirectory,
"server.xml" ), false );
// Copying the init script in /etc/init.d/
- MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, getClass().getResourceAsStream( "apacheds-init" ),
+ MojoHelperUtils.copyAsciiFile( mojo, filterProperties, getClass().getResourceAsStream( "apacheds-init" ),
new File( etcInitdDirectory, "apacheds" + "-default" ), true );
// Removing the redundant server.xml file (see DIRSERVER-1112)
@@ -188,22 +181,22 @@ public class SolarisPkgInstallerCommand
// Copying the 'pkg' files
try
{
- MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, getClass().getResourceAsStream( "Prototype" ),
+ MojoHelperUtils.copyAsciiFile( mojo, filterProperties, getClass().getResourceAsStream( "Prototype" ),
new File( pkgDirectory, "Prototype" ), true );
- MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, getClass().getResourceAsStream( "pkginfo" ),
+ MojoHelperUtils.copyAsciiFile( mojo, filterProperties, getClass().getResourceAsStream( "pkginfo" ),
new File( pkgDirectory, "pkginfo" ), true );
- MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, getClass().getResourceAsStream( "preinstall" ),
+ MojoHelperUtils.copyAsciiFile( mojo, filterProperties, getClass().getResourceAsStream( "preinstall" ),
new File( pkgDirectory, "preinstall" ), true );
- MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, getClass().getResourceAsStream( "postinstall" ),
+ MojoHelperUtils.copyAsciiFile( mojo, filterProperties, getClass().getResourceAsStream( "postinstall" ),
new File( pkgDirectory, "postinstall" ), true );
- MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, getClass().getResourceAsStream( "preremove" ),
+ MojoHelperUtils.copyAsciiFile( mojo, filterProperties, getClass().getResourceAsStream( "preremove" ),
new File( pkgDirectory, "preremove" ), true );
- MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, getClass().getResourceAsStream( "postremove" ),
+ MojoHelperUtils.copyAsciiFile( mojo, filterProperties, getClass().getResourceAsStream( "postremove" ),
new File( pkgDirectory, "postremove" ), true );
}
catch ( IOException e )
@@ -249,13 +242,13 @@ public class SolarisPkgInstallerCommand
private void initializeFiltering()
{
- filterProperties.putAll( mymojo.getProject().getProperties() );
- filterProperties.put( "app", target.getApplication().getName() );
- filterProperties.put( "app.name", target.getApplication().getName() );
+ filterProperties.putAll( mojo.getProject().getProperties() );
+ filterProperties.put( "app", "apacheds" );
+ filterProperties.put( "app.name", "apacheds" );
filterProperties.put( "osArch", target.getOsArch() );
- if ( target.getApplication().getVersion() != null )
+ if ( mojo.getProject().getVersion() != null )
{
- filterProperties.put( "app.version", target.getApplication().getVersion() );
+ filterProperties.put( "app.version", mojo.getProject().getVersion() );
}
else
{
@@ -265,7 +258,7 @@ public class SolarisPkgInstallerCommand
/* (non-Javadoc)
- * @see org.apache.directory.daemon.installers.MojoCommand#getFilterProperties()
+ * @see org.apache.directory.daemon.installers.AbstractMojoCommand#getFilterProperties()
*/
public Properties getFilterProperties()
{