You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2006/01/24 09:55:28 UTC
svn commit: r371868 - in /directory/trunks/apacheds/standalone:
daemon/src/main/java/org/apache/directory/server/standalone/daemon/
installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/
installers/plugin/src/main/resources/...
Author: akarasulu
Date: Tue Jan 24 00:55:16 2006
New Revision: 371868
URL: http://svn.apache.org/viewcvs?rev=371868&view=rev
Log:
changes ...
o added izpack installer files and shortcut files
o added headers to files
o added command pattern
o moved some util methods used by many commands to MojoHelperUtil
o got izpack ant task driving izpack build which is still broken
o modified layout to take readme, license and logo icon into account
o added izpack installer command
Added:
directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/IzPackInstallerCommand.java (with props)
directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/MojoHelperUtils.java (with props)
directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack_install_shortcuts_unix.xml (with props)
directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack_install_shortcuts_windows.xml
directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack_install_template.xml (with props)
directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack_install_user_input.xml (with props)
Modified:
directory/trunks/apacheds/standalone/daemon/src/main/java/org/apache/directory/server/standalone/daemon/InstallationLayout.java
directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/CreateImageCommand.java
directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/DebTarget.java
directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/InnoTarget.java
directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/IzPackTarget.java
directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/MojoCommand.java
directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/PkgTarget.java
directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/ReflectionProperties.java
directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/RpmTarget.java
directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/ServiceInstallersMojo.java
directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/Target.java
directory/trunks/apacheds/standalone/installers/test/pom.xml
Modified: directory/trunks/apacheds/standalone/daemon/src/main/java/org/apache/directory/server/standalone/daemon/InstallationLayout.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/standalone/daemon/src/main/java/org/apache/directory/server/standalone/daemon/InstallationLayout.java?rev=371868&r1=371867&r2=371868&view=diff
==============================================================================
--- directory/trunks/apacheds/standalone/daemon/src/main/java/org/apache/directory/server/standalone/daemon/InstallationLayout.java (original)
+++ directory/trunks/apacheds/standalone/daemon/src/main/java/org/apache/directory/server/standalone/daemon/InstallationLayout.java Tue Jan 24 00:55:16 2006
@@ -171,6 +171,42 @@
}
+ public File getLogoIconFile()
+ {
+ return getLogoIconFile( "logo.png" );
+ }
+
+
+ public File getLogoIconFile( String name )
+ {
+ return new File( getBaseDirectory(), name );
+ }
+
+
+ public File getLicenseFile()
+ {
+ return getLicenseFile( "LICENSE.txt" );
+ }
+
+
+ public File getLicenseFile( String name )
+ {
+ return new File( getBaseDirectory(), name );
+ }
+
+
+ public File getReadmeFile()
+ {
+ return getReadmeFile( "README.txt" );
+ }
+
+
+ public File getReadmeFile( String name )
+ {
+ return new File( getBaseDirectory(), name );
+ }
+
+
public File getBootstrapperConfigurationFile()
{
return new File( getConfigurationDirectory(), "bootstrapper.properties" );
Modified: directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/CreateImageCommand.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/CreateImageCommand.java?rev=371868&r1=371867&r2=371868&view=diff
==============================================================================
--- directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/CreateImageCommand.java (original)
+++ directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/CreateImageCommand.java Tue Jan 24 00:55:16 2006
@@ -1,32 +1,44 @@
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
package org.apache.directory.server.standalone.installers;
-import java.io.BufferedReader;
+
import java.io.File;
-import java.io.FileOutputStream;
-import java.io.FileWriter;
import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
-import java.io.Reader;
-import java.io.Writer;
-import java.util.Iterator;
import java.util.Properties;
import org.apache.directory.server.standalone.daemon.InstallationLayout;
-import org.apache.maven.artifact.Artifact;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.codehaus.plexus.util.FileUtils;
-import org.codehaus.plexus.util.IOUtil;
-import org.codehaus.plexus.util.InterpolationFilterReader;
+/**
+ * Command to create installation image (footprint) before installers are triggered.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
public class CreateImageCommand implements MojoCommand
{
private final Properties filterProperties = new Properties( System.getProperties() );
private final ServiceInstallersMojo mymojo;
private final Target target;
+ private InstallationLayout layout;
public CreateImageCommand( ServiceInstallersMojo mojo, Target target )
@@ -60,7 +72,7 @@
{
// make the layout directories
File dir = new File( mymojo.getOutputDirectory(), target.getId() );
- InstallationLayout layout = new InstallationLayout( dir );
+ layout = new InstallationLayout( dir );
layout.mkdirs();
// copy over the REQUIRED bootstrapper.jar file
@@ -123,7 +135,8 @@
{
try
{
- copyAsciiFile( getClass().getResourceAsStream( "template.init" ), layout.getInitScript(), true );
+ MojoHelperUtils.copyAsciiFile( mymojo, filterProperties,
+ getClass().getResourceAsStream( "template.init" ), layout.getInitScript(), true );
}
catch ( IOException e )
{
@@ -140,7 +153,7 @@
File executable = new File ( layout.getBinDirectory(), mymojo.getApplicationName() );
try
{
- copyBinaryFile( getClass().getResourceAsStream( "jsvc_linux_i386" ), executable );
+ MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream( "jsvc_linux_i386" ), executable );
}
catch ( IOException e )
{
@@ -157,7 +170,7 @@
File executable = new File ( layout.getBinDirectory(), mymojo.getApplicationName() );
try
{
- copyBinaryFile( getClass().getResourceAsStream( "jsvc_solaris_sparc" ), executable );
+ MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream( "jsvc_solaris_sparc" ), executable );
}
catch ( IOException e )
{
@@ -173,7 +186,7 @@
File executable = new File ( layout.getBinDirectory(), mymojo.getApplicationName() );
try
{
- copyBinaryFile( getClass().getResourceAsStream( "jsvc_macosx_ppc" ), executable );
+ MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream( "jsvc_macosx_ppc" ), executable );
}
catch ( IOException e )
{
@@ -189,7 +202,7 @@
File executable = new File ( layout.getBinDirectory(), mymojo.getApplicationName() + ".exe" );
try
{
- copyBinaryFile( getClass().getResourceAsStream( "prunsrv.exe" ), executable );
+ MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream( "prunsrv.exe" ), executable );
}
catch ( IOException e )
{
@@ -201,7 +214,7 @@
executable = new File ( layout.getBinDirectory(), mymojo.getApplicationName() + "w.exe" );
try
{
- copyBinaryFile( getClass().getResourceAsStream( "prunmgr.exe" ), executable );
+ MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream( "prunmgr.exe" ), executable );
}
catch ( IOException e )
{
@@ -211,108 +224,12 @@
}
}
- copyDependencies( layout );
+ MojoHelperUtils.copyDependencies( mymojo, layout );
}
-
-
- private void copyBinaryFile( InputStream from, File to ) throws IOException
- {
- FileOutputStream out = null;
- try
- {
- out = new FileOutputStream( to );
- IOUtil.copy( from, out );
- }
- finally
- {
- IOUtil.close( from );
- IOUtil.close( out );
- }
- }
-
- private void copyAsciiFile( InputStream from, File to, boolean filtering ) throws IOException
- {
- // buffer so it isn't reading a byte at a time!
- Reader fileReader = null;
- Writer fileWriter = null;
- try
- {
- if ( mymojo.getEncoding() == null || mymojo.getEncoding().length() < 1 )
- {
- fileReader = new BufferedReader( new InputStreamReader( from ) );
- fileWriter = new FileWriter( to );
- }
- else
- {
- FileOutputStream outstream = new FileOutputStream( to );
- fileReader = new BufferedReader( new InputStreamReader( from, mymojo.getEncoding() ) );
- fileWriter = new OutputStreamWriter( outstream, mymojo.getEncoding() );
- }
-
- Reader reader = null;
- if ( filtering )
- {
- // support _${token}
- reader = new InterpolationFilterReader( fileReader, filterProperties, "_${", "}" );
- // support ${token}
- reader = new InterpolationFilterReader( reader, filterProperties, "${", "}" );
- // support @token@
- reader = new InterpolationFilterReader( reader, filterProperties, "@", "@" );
- boolean isPropertiesFile = false;
- if ( to.isFile() && to.getName().endsWith( ".properties" ) )
- {
- isPropertiesFile = true;
- }
- reader = new InterpolationFilterReader( reader,
- new ReflectionProperties( mymojo.getProject(), isPropertiesFile ), "${", "}" );
- }
- else
- {
- reader = fileReader;
- }
- IOUtil.copy( reader, fileWriter );
- }
- finally
- {
- IOUtil.close( fileReader );
- IOUtil.close( fileWriter );
- }
- }
-
-
- private void copyDependencies( InstallationLayout layout ) throws MojoFailureException
+ InstallationLayout getLayout()
{
- Artifact artifact = null;
- Iterator artifacts = mymojo.getProject().getRuntimeArtifacts().iterator();
- while ( artifacts.hasNext() )
- {
- artifact = ( Artifact ) artifacts.next();
- if ( artifact.equals( mymojo.getBootstrapper() ) )
- {
- mymojo.getLog().info( "Not copying bootstrapper " + artifact );
- }
- else
- {
- String key = artifact.getGroupId() + ":" + artifact.getArtifactId();
- if ( mymojo.getExcludes().contains( key ) )
- {
- mymojo.getLog().info( "<<<=== excluded <<<=== " + key );
- continue;
- }
-
- try
- {
- FileUtils.copyFileToDirectory( artifact.getFile(), layout.getLibDirectory() );
- mymojo.getLog().info( "===>>> included ===>>> " + key );
- }
- catch ( IOException e )
- {
- throw new MojoFailureException( "Failed to copy dependency artifact "
- + artifact + " into position " + layout.getLibDirectory() );
- }
- }
- }
+ return layout;
}
}
Modified: directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/DebTarget.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/DebTarget.java?rev=371868&r1=371867&r2=371868&view=diff
==============================================================================
--- directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/DebTarget.java (original)
+++ directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/DebTarget.java Tue Jan 24 00:55:16 2006
@@ -1,6 +1,28 @@
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
package org.apache.directory.server.standalone.installers;
+/**
+ * A Debian package target.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
public class DebTarget extends Target
{
Modified: directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/InnoTarget.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/InnoTarget.java?rev=371868&r1=371867&r2=371868&view=diff
==============================================================================
--- directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/InnoTarget.java (original)
+++ directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/InnoTarget.java Tue Jan 24 00:55:16 2006
@@ -1,5 +1,28 @@
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
package org.apache.directory.server.standalone.installers;
+
+/**
+ * An Inno installer target for Windows platforms.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
public class InnoTarget extends Target
{
Added: directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/IzPackInstallerCommand.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/IzPackInstallerCommand.java?rev=371868&view=auto
==============================================================================
--- directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/IzPackInstallerCommand.java (added)
+++ directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/IzPackInstallerCommand.java Tue Jan 24 00:55:16 2006
@@ -0,0 +1,225 @@
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.directory.server.standalone.installers;
+
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Properties;
+
+import org.apache.directory.server.standalone.daemon.InstallationLayout;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.taskdefs.Touch;
+
+import com.izforge.izpack.ant.IzPackTask;
+
+
+/**
+ * The IzPack installer command.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class IzPackInstallerCommand implements MojoCommand
+{
+ private final Properties filterProperties = new Properties( System.getProperties() );
+ private final ServiceInstallersMojo mymojo;
+ private final IzPackTarget target;
+ private final InstallationLayout layout;
+
+ private File izPackInput;
+ private File izPackUserInput;
+ private File izPackWindowsShortcuts;
+ private File izPackUnixShortcuts;
+ private File izPackOutput;
+
+
+ IzPackInstallerCommand( ServiceInstallersMojo mymojo, IzPackTarget target, InstallationLayout layout )
+ {
+ this.target = target;
+ this.layout = layout;
+ this.mymojo = mymojo;
+
+ izPackOutput = layout.getBaseDirectory().getParentFile();
+ izPackOutput = new File( izPackOutput, target.getId() + "_izpack_installer.jar" );
+
+ izPackInput = layout.getBaseDirectory().getParentFile();
+ izPackInput = new File( izPackInput, target.getId() + "_izpack_install.xml" );
+
+ izPackUserInput = layout.getBaseDirectory().getParentFile();
+ izPackUserInput = new File( izPackUserInput, target.getId() + "_izpack_install_user_input.xml" );
+
+ izPackWindowsShortcuts = layout.getBaseDirectory().getParentFile();
+ izPackWindowsShortcuts = new File( izPackWindowsShortcuts, target.getId() + "_izpack_windows_shortcuts.xml" );
+
+ izPackUnixShortcuts = layout.getBaseDirectory().getParentFile();
+ izPackUnixShortcuts = new File( izPackUnixShortcuts, target.getId() + "_izpack_unix_shortcuts.xml" );
+
+ initializeFiltering();
+ }
+
+
+ public void execute() throws MojoExecutionException, MojoFailureException
+ {
+ generateInstallerFiles( target, layout );
+ Project antProject = new Project();
+ IzPackTask task = new IzPackTask();
+ task.setBasedir( layout.getBaseDirectory().getParent() );
+ task.setProject( antProject );
+ task.setInput( izPackInput.getPath() );
+ task.setOutput( izPackOutput.getPath() );
+ task.setTaskName( "izpack" );
+ task.execute();
+ }
+
+
+ private void generateInstallerFiles( IzPackTarget target, InstallationLayout layout ) throws MojoFailureException
+ {
+ try
+ {
+ MojoHelperUtils.copyAsciiFile( mymojo, filterProperties,
+ getClass().getResourceAsStream( "izpack_install_template.xml" ), izPackInput, true );
+ }
+ catch ( IOException e )
+ {
+ mymojo.getLog().error( "Failed to copy izpack input file "
+ + getClass().getResource( "izpack_install_template.xml" )
+ + " into position " + izPackInput, e );
+ }
+
+ try
+ {
+ MojoHelperUtils.copyAsciiFile( mymojo, filterProperties,
+ getClass().getResourceAsStream( "izpack_install_user_input.xml" ), izPackUserInput, true );
+ }
+ catch ( IOException e )
+ {
+ mymojo.getLog().error( "Failed to copy izpack input file "
+ + getClass().getResource( "izpack_install_user_input.xml" )
+ + " into position " + izPackUserInput, e );
+ }
+
+ try
+ {
+ MojoHelperUtils.copyAsciiFile( mymojo, filterProperties,
+ getClass().getResourceAsStream( "izpack_install_shortcuts_windows.xml" ), izPackWindowsShortcuts, true );
+ }
+ catch ( IOException e )
+ {
+ mymojo.getLog().error( "Failed to copy izpack windows shortcuts file "
+ + getClass().getResource( "izpack_install_shortcuts_windows.xml" )
+ + " into position " + izPackWindowsShortcuts, e );
+ }
+
+ try
+ {
+ MojoHelperUtils.copyAsciiFile( mymojo, filterProperties,
+ getClass().getResourceAsStream( "izpack_install_shortcuts_unix.xml" ), izPackUnixShortcuts, true );
+ }
+ catch ( IOException e )
+ {
+ mymojo.getLog().error( "Failed to copy izpack unix shortcuts file "
+ + getClass().getResource( "izpack_install_shortcuts_unix.xml" )
+ + " into position " + izPackUnixShortcuts, e );
+ }
+ }
+
+
+ private void initializeFiltering()
+ {
+ filterProperties.putAll( mymojo.getProject().getProperties() );
+ filterProperties.put( "app" , mymojo.getApplicationName() );
+ filterProperties.put( "app.caps" , mymojo.getApplicationName().toUpperCase() );
+ filterProperties.put( "app.server.class", mymojo.getApplicationClass() );
+
+ if ( mymojo.getApplicationVersion() != null )
+ {
+ filterProperties.put( "app.version", mymojo.getApplicationVersion() );
+ }
+
+ if ( mymojo.getApplicationDescription() != null )
+ {
+ filterProperties.put( "app.init.message", mymojo.getApplicationDescription() );
+ }
+
+/*
+optional properties from mojo but should default:
+${app.author}
+${app.email}
+${app.url}
+${app.java.version}
+
+files which are user specified also from mojo:
+${app.license}
+${app.readme}
+${app.icon}
+
+files generated:
+${windows.shortcuts}
+${unix.shortcuts}
+${user.input}
+${image.basedir}
+${server.init}
+*/
+ // -------------------------------------------------------------------
+ // WARNING: hard code values just to for testing
+ // -------------------------------------------------------------------
+
+ // optional properties from mojo but should default:
+ filterProperties.put( "app.author" , "Directory Project Team" );
+ filterProperties.put( "app.email" , "dev@directory.apache.org" );
+ filterProperties.put( "app.url" , "http://directory.apache.org" );
+ filterProperties.put( "app.java.version" , "1.4" );
+
+ // izpack compiler will barf if these files are not present
+ // files which are user specified also from mojo
+ // these files need to be copied to the image folder of the target
+ if ( ! layout.getLicenseFile().exists() )
+ {
+ touchFile( layout.getLicenseFile() );
+ }
+ filterProperties.put( "app.license" , layout.getLicenseFile().getPath() );
+ if ( ! layout.getReadmeFile().exists() )
+ {
+ touchFile( layout.getReadmeFile() );
+ }
+ filterProperties.put( "app.readme" , layout.getReadmeFile().getPath() );
+ if ( ! layout.getLogoIconFile().exists() )
+ {
+ touchFile( layout.getLogoIconFile() );
+ }
+ filterProperties.put( "app.icon" , layout.getLogoIconFile().getPath() );
+
+ // generated files
+ filterProperties.put( "windows.shortcuts" , izPackWindowsShortcuts.getPath() );
+ filterProperties.put( "unix.shortcuts", izPackUnixShortcuts.getPath() );
+ filterProperties.put( "user.input", izPackUserInput.getPath() );
+ filterProperties.put( "image.basedir", layout.getBaseDirectory().getPath() );
+ filterProperties.put( "server.init", layout.getInitScript().getPath() );
+ }
+
+
+ static void touchFile( File file )
+ {
+ Touch touch = new Touch();
+ touch.setProject( new Project() );
+ touch.setFile( file );
+ touch.execute();
+ }
+}
Propchange: directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/IzPackInstallerCommand.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/IzPackTarget.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/IzPackTarget.java?rev=371868&r1=371867&r2=371868&view=diff
==============================================================================
--- directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/IzPackTarget.java (original)
+++ directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/IzPackTarget.java Tue Jan 24 00:55:16 2006
@@ -1,6 +1,28 @@
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
package org.apache.directory.server.standalone.installers;
+/**
+ * An IzPack multiplatform installer target.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
public class IzPackTarget extends Target
{
Modified: directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/MojoCommand.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/MojoCommand.java?rev=371868&r1=371867&r2=371868&view=diff
==============================================================================
--- directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/MojoCommand.java (original)
+++ directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/MojoCommand.java Tue Jan 24 00:55:16 2006
@@ -1,3 +1,19 @@
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
package org.apache.directory.server.standalone.installers;
@@ -5,6 +21,12 @@
import org.apache.maven.plugin.MojoFailureException;
+/**
+ * A Mojo command pattern interface.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
public interface MojoCommand
{
public abstract void execute() throws MojoExecutionException, MojoFailureException;
Added: directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/MojoHelperUtils.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/MojoHelperUtils.java?rev=371868&view=auto
==============================================================================
--- directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/MojoHelperUtils.java (added)
+++ directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/MojoHelperUtils.java Tue Jan 24 00:55:16 2006
@@ -0,0 +1,149 @@
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.directory.server.standalone.installers;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.io.Reader;
+import java.io.Writer;
+import java.util.Iterator;
+import java.util.Properties;
+
+import org.apache.directory.server.standalone.daemon.InstallationLayout;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.plugin.MojoFailureException;
+import org.codehaus.plexus.util.FileUtils;
+import org.codehaus.plexus.util.IOUtil;
+import org.codehaus.plexus.util.InterpolationFilterReader;
+
+
+/**
+ * Some helper/utility methods for this plugin.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class MojoHelperUtils
+{
+ static void copyBinaryFile( InputStream from, File to ) throws IOException
+ {
+ FileOutputStream out = null;
+ try
+ {
+ out = new FileOutputStream( to );
+ IOUtil.copy( from, out );
+ }
+ finally
+ {
+ IOUtil.close( from );
+ IOUtil.close( out );
+ }
+ }
+
+
+ static void copyAsciiFile( ServiceInstallersMojo mymojo, Properties filterProperties, InputStream from,
+ File to, boolean filtering ) throws IOException
+ {
+ // buffer so it isn't reading a byte at a time!
+ Reader fileReader = null;
+ Writer fileWriter = null;
+ try
+ {
+ if ( mymojo.getEncoding() == null || mymojo.getEncoding().length() < 1 )
+ {
+ fileReader = new BufferedReader( new InputStreamReader( from ) );
+ fileWriter = new FileWriter( to );
+ }
+ else
+ {
+ FileOutputStream outstream = new FileOutputStream( to );
+ fileReader = new BufferedReader( new InputStreamReader( from, mymojo.getEncoding() ) );
+ fileWriter = new OutputStreamWriter( outstream, mymojo.getEncoding() );
+ }
+
+ Reader reader = null;
+ if ( filtering )
+ {
+ // support _${token}
+ reader = new InterpolationFilterReader( fileReader, filterProperties, "_${", "}" );
+ // support ${token}
+ reader = new InterpolationFilterReader( reader, filterProperties, "${", "}" );
+ // support @token@
+ reader = new InterpolationFilterReader( reader, filterProperties, "@", "@" );
+
+ boolean isPropertiesFile = false;
+ if ( to.isFile() && to.getName().endsWith( ".properties" ) )
+ {
+ isPropertiesFile = true;
+ }
+ reader = new InterpolationFilterReader( reader,
+ new ReflectionProperties( mymojo.getProject(), isPropertiesFile ), "${", "}" );
+ }
+ else
+ {
+ reader = fileReader;
+ }
+ IOUtil.copy( reader, fileWriter );
+ }
+ finally
+ {
+ IOUtil.close( fileReader );
+ IOUtil.close( fileWriter );
+ }
+ }
+
+
+ static void copyDependencies( ServiceInstallersMojo mymojo, InstallationLayout layout ) throws MojoFailureException
+ {
+ Artifact artifact = null;
+ Iterator artifacts = mymojo.getProject().getRuntimeArtifacts().iterator();
+ while ( artifacts.hasNext() )
+ {
+ artifact = ( Artifact ) artifacts.next();
+ if ( artifact.equals( mymojo.getBootstrapper() ) )
+ {
+ mymojo.getLog().info( "Not copying bootstrapper " + artifact );
+ }
+ else
+ {
+ String key = artifact.getGroupId() + ":" + artifact.getArtifactId();
+ if ( mymojo.getExcludes().contains( key ) )
+ {
+ mymojo.getLog().info( "<<<=== excluded <<<=== " + key );
+ continue;
+ }
+
+ try
+ {
+ FileUtils.copyFileToDirectory( artifact.getFile(), layout.getLibDirectory() );
+ mymojo.getLog().info( "===>>> included ===>>> " + key );
+ }
+ catch ( IOException e )
+ {
+ throw new MojoFailureException( "Failed to copy dependency artifact "
+ + artifact + " into position " + layout.getLibDirectory() );
+ }
+ }
+ }
+ }
+}
Propchange: directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/MojoHelperUtils.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/PkgTarget.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/PkgTarget.java?rev=371868&r1=371867&r2=371868&view=diff
==============================================================================
--- directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/PkgTarget.java (original)
+++ directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/PkgTarget.java Tue Jan 24 00:55:16 2006
@@ -1,6 +1,28 @@
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
package org.apache.directory.server.standalone.installers;
+/**
+ * A Solaris pkg target.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
public class PkgTarget extends Target
{
Modified: directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/ReflectionProperties.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/ReflectionProperties.java?rev=371868&r1=371867&r2=371868&view=diff
==============================================================================
--- directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/ReflectionProperties.java (original)
+++ directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/ReflectionProperties.java Tue Jan 24 00:55:16 2006
@@ -1,3 +1,19 @@
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
package org.apache.directory.server.standalone.installers;
/*
@@ -15,6 +31,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.util.StringUtils;
Modified: directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/RpmTarget.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/RpmTarget.java?rev=371868&r1=371867&r2=371868&view=diff
==============================================================================
--- directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/RpmTarget.java (original)
+++ directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/RpmTarget.java Tue Jan 24 00:55:16 2006
@@ -1,5 +1,28 @@
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
package org.apache.directory.server.standalone.installers;
+
+/**
+ * An Rpm package target.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
public class RpmTarget extends Target
{
Modified: directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/ServiceInstallersMojo.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/ServiceInstallersMojo.java?rev=371868&r1=371867&r2=371868&view=diff
==============================================================================
--- directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/ServiceInstallersMojo.java (original)
+++ directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/ServiceInstallersMojo.java Tue Jan 24 00:55:16 2006
@@ -1,3 +1,19 @@
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
package org.apache.directory.server.standalone.installers;
@@ -136,12 +152,23 @@
// search for and find the bootstrapper artifact
setBootstrapperArtifact();
- // creates installation images for all targets
+ // generate installers for all targets
for ( int ii = 0; ii < allTargets.size(); ii++ )
{
- CreateImageCommand command = new CreateImageCommand( this, ( Target ) allTargets.get( ii ) );
- command.execute();
- }
+ Target target = ( Target ) allTargets.get( ii );
+
+ // create the installation image first
+ CreateImageCommand imgCommand = new CreateImageCommand( this, target );
+ imgCommand.execute();
+
+ // generate the installer
+ if ( target instanceof IzPackTarget )
+ {
+ IzPackInstallerCommand izPackCmd = null;
+ izPackCmd = new IzPackInstallerCommand( this, ( IzPackTarget ) target, imgCommand.getLayout() );
+ izPackCmd.execute();
+ }
+ }
}
Modified: directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/Target.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/Target.java?rev=371868&r1=371867&r2=371868&view=diff
==============================================================================
--- directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/Target.java (original)
+++ directory/trunks/apacheds/standalone/installers/plugin/src/main/java/org/apache/directory/server/standalone/installers/Target.java Tue Jan 24 00:55:16 2006
@@ -1,3 +1,19 @@
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
package org.apache.directory.server.standalone.installers;
@@ -5,6 +21,12 @@
import java.util.Locale;
+/**
+ * The superclass for all installer targets.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
public class Target
{
/**
Added: directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack_install_shortcuts_unix.xml
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack_install_shortcuts_unix.xml?rev=371868&view=auto
==============================================================================
--- directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack_install_shortcuts_unix.xml (added)
+++ directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack_install_shortcuts_unix.xml Tue Jan 24 00:55:16 2006
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<!--
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+ -->
+
+<shortcuts>
+ <programGroup defaultName="${app}" location="applications"/>
+
+ <shortcut
+ name="Start ${app} Server"
+ programGroup="yes"
+ desktop="yes"
+ applications="no"
+ startMenu="no"
+ startup="no"
+ target="sh"
+ workingDirectory="$INSTALL_PATH/bin"
+ commandLine="$INSTALL_PATH/etc/${server.init} start"
+ iconFile="$INSTALL_PATH/icons/${app.icon}"
+ type="Application"
+ encoding="UTF-8"
+ description="Start ${app} Server">
+ <createForPack name="Binaries"/>
+ </shortcut>
+
+ <shortcut
+ name="Stop ${app} Server"
+ programGroup="yes"
+ desktop="yes"
+ applications="no"
+ startMenu="no"
+ startup="no"
+ target="sh"
+ workingDirectory="$INSTALL_PATH/bin"
+ commandLine="$INSTALL_PATH/etc/${server.init} stop"
+ iconFile="$INSTALL_PATH/icons/${app.icon}"
+ type="Application"
+ encoding="UTF-8"
+ description="Start ${app} Server">
+ <createForPack name="Binaries"/>
+ </shortcut>
+
+ <shortcut
+ name="Uninstaller"
+ programGroup="yes"
+ desktop="no"
+ applications="no"
+ startMenu="no"
+ startup="no"
+ target="java"
+ commandLine="-jar "$INSTALL_PATH/Uninstaller/uninstaller.jar""
+ initialState="noShow"
+ iconFile="trashcan_full"
+ iconIndex="0"
+ workingDirectory=""
+ type="Application"
+ encoding="UTF-8"
+ description="Uninstall ${app} Server">
+ <createForPack name="Binaries" />
+ </shortcut>
+</shortcuts>
Propchange: directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack_install_shortcuts_unix.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack_install_shortcuts_windows.xml
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack_install_shortcuts_windows.xml?rev=371868&view=auto
==============================================================================
--- directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack_install_shortcuts_windows.xml (added)
+++ directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack_install_shortcuts_windows.xml Tue Jan 24 00:55:16 2006
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<!--
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+ -->
+
+<shortcuts>
+ <programGroup defaultName="${app}" location="applications"/>
+
+ <shortcut
+ name="Service Settings"
+ programGroup="yes"
+ desktop="no"
+ applications="no"
+ startMenu="no"
+ startup="no"
+ target="$INSTALL_PATH\bin\${app}w.exe"
+ commandLine="//ES//${app}"
+ workingDirectory="$INSTALL_PATH\bin"
+ description="Edit ${app} Service"
+ iconFile="$INSTALL_PATH\icons\${app.icon}">
+
+ <createForPack name="Binaries" />
+ </shortcut>
+
+ <shortcut
+ name="Tray Monitor"
+ programGroup="yes"
+ desktop="no"
+ applications="no"
+ startMenu="no"
+ startup="no"
+ target="$INSTALL_PATH\bin\${app}w.exe"
+ commandLine="//MS//${app}"
+ workingDirectory="$INSTALL_PATH\bin"
+ description="Monitor ${app} Service"
+ iconFile="$INSTALL_PATH\icons\${app.icon}">
+
+ <createForPack name="Binaries" />
+ </shortcut>
+
+ <shortcut
+ name="Test Service"
+ programGroup="yes"
+ desktop="no"
+ applications="no"
+ startMenu="no"
+ startup="no"
+ target="$INSTALL_PATH\bin\${app}.exe"
+ commandLine=""
+ workingDirectory="$INSTALL_PATH\bin"
+ description="Test Service on Console"
+ iconFile="$INSTALL_PATH\icons\${app.icon}">
+
+ <createForPack name="Binaries" />
+ </shortcut>
+
+ <shortcut
+ name="Uninstaller"
+ programGroup="yes"
+ desktop="no"
+ applications="no"
+ startMenu="no"
+ startup="no"
+ target="$INSTALL_PATH\Uninstaller\uninstaller.jar"
+ commandLine=""
+ description="${app} Server Uninstaller">
+
+ <createForPack name="Binaries" />
+ </shortcut>
+</shortcuts>
Added: directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack_install_template.xml
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack_install_template.xml?rev=371868&view=auto
==============================================================================
--- directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack_install_template.xml (added)
+++ directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack_install_template.xml Tue Jan 24 00:55:16 2006
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<!--
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+ -->
+
+<installation version="1.0">
+
+ <!--
+ The info section.
+ The meaning of the tags should be natural ...
+ -->
+ <info>
+ <appname>${app}</appname>
+ <appversion>${app.version}</appversion>
+ <appsubpath>${app}-${app.version}</appsubpath>
+ <authors>
+ <author name="${app.author}" email="${app.email}"/>
+ </authors>
+ <url>${app.url}</url>
+ <javaversion>${app.java.version}</javaversion>
+ </info>
+
+ <!--
+ The gui preferences indication.
+ Sets the installer window to 640x480. It will not be able to change the size.
+ -->
+
+ <guiprefs height="480" resizable="yes" width="640">
+ <laf name="metouia">
+ <os family="unix" />
+ </laf>
+ <laf name="looks">
+ <os family="windows" />
+ <param name="variant" value="extwin" />
+ </laf>
+ </guiprefs>
+
+ <!--
+ The variables section
+ -->
+ <variables>
+ </variables>
+
+ <!--
+ The locale section.
+ -->
+ <locale>
+ <langpack iso3="eng"/>
+ <langpack iso3="chn"/>
+ <langpack iso3="deu"/>
+ <langpack iso3="spa"/>
+ <langpack iso3="fra"/>
+ </locale>
+
+ <!--
+ The resources section.
+ The ids must be these ones if you want to use the LicencePanel and/or the InfoPanel.
+ -->
+ <resources>
+ <res id="installer.langsel.img" src="${app.icon}"/>
+ <res id="Installer.image" src="${app.icon}"/>
+ <res id="Installer.image.0" src="${app.icon}"/>
+ <res id="Installer.image.1" src="${app.icon}"/>
+ <res id="Installer.image.2" src="${app.icon}"/>
+ <res id="Installer.image.3" src="${app.icon}"/>
+ <res id="Installer.image.4" src="${app.icon}"/>
+ <res id="Installer.image.5" src="${app.icon}"/>
+
+ <res id="LicencePanel.licence" src="${app.license}"/>
+ <res id="InfoPanel.info" src="${app.readme}"/>
+
+ <res id="ImgPacksPanel.img.0" src="${app.icon}"/>
+ <res id="ImgPacksPanel.img.1" src="${app.icon}"/>
+
+ <res id="shortcutSpec.xml" src="${unix.shortcuts}"/>
+ <res id="Win_shortcutSpec.xml" src="${windows.shortcuts}"/>
+ <res id="Unix_shortcutSpec.xml" src="${unix.shortcuts}"/>
+
+ <res id="userInputSpec.xml" src="${user.input}"/>
+ </resources>
+
+ <native type="izpack" name="ShellLink.dll"/>
+
+ <!--
+ The panels section.
+ We indicate here which panels we want to use. The order will be respected.
+ -->
+ <panels>
+ <panel classname="HelloPanel"/>
+ <panel classname="InfoPanel"/>
+ <panel classname="LicencePanel"/>
+ <panel classname="TargetPanel"/>
+ <panel classname="ImgPacksPanel"/>
+ <!--
+ <panel classname="UserInputPanel"/>
+ -->
+ <panel classname="InstallPanel"/>
+ <!-- Use a ProcessPanel to make server a service or drop
+ a startup script with links
+ -->
+ <panel classname="ShortcutPanel"/>
+ <panel classname="FinishPanel"/>
+ </panels>
+
+ <!--
+ The packs section. We specify here our packs.
+ -->
+ <packs>
+ <pack name="Binaries" required="yes">
+ <description>Binary executables</description>
+ <fileset dir="${image.basedir}" targetdir="$INSTALL_PATH">
+ <include name="**/*"/>
+ </fileset>
+
+ <!-- MAC section
+ <executable os="mac" targetfile="$INSTALL_PATH/bin/${app}" stage="never" keep="true"/>
+ -->
+ <!-- the servier.init file is really the substituted one that is copied to this file name -->
+ <!--
+ <executable os="mac" targetfile="$INSTALL_PATH/etc/${server.init}" stage="never" keep="true"/>
+ <parsable os="mac" targetfile="$INSTALL_PATH/etc/${server.init}" type="shell"/>
+ -->
+
+ <executable os="unix" targetfile="$INSTALL_PATH/bin/${app}" stage="never" keep="true"/>
+ <singlefile os="unix" src="../bin/${app}-init-sub.sh" target="/etc/init.d/${app}"/>
+ <parsable os="unix" targetfile="/etc/init.d/${app}" type="shell"/>
+ <executable os="unix" targetfile="/etc/init.d/${app}" stage="never" keep="true"/>
+
+ <!-- WINDOWS section
+ <parsable os="windows" targetfile="$INSTALL_PATH/bin/${windows.uninstall.bat}" />
+ <executable os="windows" targetfile="$INSTALL_PATH/bin/${windows.uninstall.bat}" failure="warn" stage="uninstall" keep="false"/>
+ <singlefile os="windows" src="../bin/win32/${app}.exe" target="$INSTALL_PATH/bin/${app}.exe"/>
+ <singlefile os="windows" src="../bin/win32/${app}w.exe" target="$INSTALL_PATH/bin/${app}w.exe"/>
+ <executable os="windows" targetfile="$INSTALL_PATH/bin/${app}.exe" stage="never" keep="true"/>
+ <executable os="windows" targetfile="$INSTALL_PATH/bin/${app}w.exe" stage="never" keep="true"/>
+ <parsable os="windows" targetfile="$INSTALL_PATH/bin/install-service.bat" />
+ <executable os="windows" targetfile="$INSTALL_PATH/bin/install-service.bat" failure="warn" stage="postinstall" keep="false"/>
+ <executable os="windows" targetfile="$INSTALL_PATH/bin/${app}w.exe" stage="postinstall" keep="true"/>
+ -->
+ <!-- looks like we're going to need a batch file for registering the service
+ <executable os="windows" targetfile="$INSTALL_PATH/bin/install-service.bat" stage="postinstall" keep="false"/>
+ -->
+ </pack>
+ </packs>
+</installation>
Propchange: directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack_install_template.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack_install_user_input.xml
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack_install_user_input.xml?rev=371868&view=auto
==============================================================================
--- directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack_install_user_input.xml (added)
+++ directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack_install_user_input.xml Tue Jan 24 00:55:16 2006
@@ -0,0 +1,24 @@
+<!--
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+ -->
+<userInput>
+ <panel order="0">
+ <field id="input.comment" type="staticText" align="left" txt="Please configure ${app} Server."/>
+ </panel>
+</userInput>
+
Propchange: directory/trunks/apacheds/standalone/installers/plugin/src/main/resources/org/apache/directory/server/standalone/installers/izpack_install_user_input.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: directory/trunks/apacheds/standalone/installers/test/pom.xml
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/standalone/installers/test/pom.xml?rev=371868&r1=371867&r2=371868&view=diff
==============================================================================
--- directory/trunks/apacheds/standalone/installers/test/pom.xml (original)
+++ directory/trunks/apacheds/standalone/installers/test/pom.xml Tue Jan 24 00:55:16 2006
@@ -104,6 +104,7 @@
<osArch>i386</osArch>
<daemonFramework>jsvc</daemonFramework>
</izPackTarget>
+ <!--
<izPackTarget>
<id>macosx-jsvc-izpack</id>
<osName>macosx</osName>
@@ -111,6 +112,7 @@
<osArch>ppc</osArch>
<daemonFramework>jsvc</daemonFramework>
</izPackTarget>
+ -->
<izPackTarget>
<id>solaris-jsvc-izpack</id>
<osName>sunos</osName>