directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r376197 - in /directory/trunks/daemon/installers-plugin/src/main: java/org/apache/directory/daemon/installers/ java/org/apache/directory/daemon/installers/inno/ resources/org/apache/directory/daemon/installers/inno/
Date Thu, 09 Feb 2006 06:01:44 GMT
Author: akarasulu
Date: Wed Feb  8 22:01:43 2006
New Revision: 376197

URL: http://svn.apache.org/viewcvs?rev=376197&view=rev
Log:
added support for inno to include docs

Modified:
    directory/trunks/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/CreateImageCommand.java
    directory/trunks/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/ServiceInstallersMojo.java
    directory/trunks/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/Target.java
    directory/trunks/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/inno/InnoInstallerCommand.java
    directory/trunks/daemon/installers-plugin/src/main/resources/org/apache/directory/daemon/installers/inno/install.iss

Modified: directory/trunks/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/CreateImageCommand.java
URL: http://svn.apache.org/viewcvs/directory/trunks/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/CreateImageCommand.java?rev=376197&r1=376196&r2=376197&view=diff
==============================================================================
--- directory/trunks/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/CreateImageCommand.java
(original)
+++ directory/trunks/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/CreateImageCommand.java
Wed Feb  8 22:01:43 2006
@@ -369,7 +369,7 @@
         
         if ( target.getSourcesDirectory() != null )
         {
-            File sourcesDirectory = new File( layout.getBaseDirectory(), "src" );
+            File sourcesDirectory = new File( layout.getBaseDirectory(), target.getSourcesTargetPath()
);
             try
             {
                 FileUtils.copyDirectoryStructure( target.getSourcesDirectory(), sourcesDirectory
);
@@ -385,7 +385,7 @@
         
         if ( target.getDocsDirectory() != null )
         {
-            File docsDirectory = new File( layout.getBaseDirectory(), "docs" );
+            File docsDirectory = new File( layout.getBaseDirectory(), target.getDocsTargetPath()
);
             try
             {
                 FileUtils.copyDirectoryStructure( target.getDocsDirectory(), docsDirectory
);

Modified: directory/trunks/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/ServiceInstallersMojo.java
URL: http://svn.apache.org/viewcvs/directory/trunks/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/ServiceInstallersMojo.java?rev=376197&r1=376196&r2=376197&view=diff
==============================================================================
--- directory/trunks/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/ServiceInstallersMojo.java
(original)
+++ directory/trunks/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/ServiceInstallersMojo.java
Wed Feb  8 22:01:43 2006
@@ -40,6 +40,7 @@
 import org.apache.maven.project.MavenProject;
 import org.apache.tools.ant.util.JavaEnvUtils;
 import org.codehaus.plexus.util.FileUtils;
+import org.codehaus.plexus.util.Os;
 
 
 /**
@@ -148,6 +149,16 @@
     private boolean packageDocs = false;
     
     /**
+     * @parameter expression="src"
+     */
+    private String sourcesTargetPath;
+
+    /**
+     * @parameter expression="docs"
+     */
+    private String docsTargetPath;
+
+    /**
      * @parameter
      */
     private Set excludes;
@@ -406,6 +417,16 @@
             {
                 target.setDocsDirectory( docsBase );
             }
+            
+            if ( target.getSourcesTargetPath() == null )
+            {
+            	target.setSourcesTargetPath( sourcesTargetPath );
+            }
+            
+            if ( target.getDocsTargetPath() == null )
+            {
+            	target.setDocsTargetPath( docsTargetPath );
+            }
         }
     }
     
@@ -536,7 +557,15 @@
                 + exportTarget.getAbsolutePath() + " to " + docsTarget.getAbsolutePath()
);
         }
         
-        String[] cmd = new String[] { "mvn", "site", "--non-recursive" };
+        String[] cmd = null;
+        if ( Os.isFamily( "windows" ) )
+        {
+        	cmd = new String[] { "mvn.bat", "site", "--non-recursive" };
+        }
+        else
+        {
+        	cmd = new String[] { "mvn", "site", "--non-recursive" };
+        }
         MojoHelperUtils.exec( cmd, docsTarget, false );
     }
     

Modified: directory/trunks/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/Target.java
URL: http://svn.apache.org/viewcvs/directory/trunks/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/Target.java?rev=376197&r1=376196&r2=376197&view=diff
==============================================================================
--- directory/trunks/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/Target.java
(original)
+++ directory/trunks/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/Target.java
Wed Feb  8 22:01:43 2006
@@ -68,6 +68,8 @@
     private File bootstrapperConfiguraitonFile;
     private File sourcesDirectory;
     private File docsDirectory;
+    private String sourcesTargetPath;
+    private String docsTargetPath;
 
     
     private InstallationLayout layout;
@@ -283,4 +285,28 @@
     {
         return docsDirectory;
     }
+
+
+	public void setSourcesTargetPath( String sourcesTargetDirectory ) 
+	{
+		this.sourcesTargetPath = sourcesTargetDirectory;
+	}
+
+
+	public String getSourcesTargetPath() 
+	{
+		return sourcesTargetPath;
+	}
+
+
+	public void setDocsTargetPath( String docsTargetDirectory ) 
+	{
+		this.docsTargetPath = docsTargetDirectory;
+	}
+
+
+	public String getDocsTargetPath() 
+	{
+		return docsTargetPath;
+	}
 }

Modified: directory/trunks/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/inno/InnoInstallerCommand.java
URL: http://svn.apache.org/viewcvs/directory/trunks/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/inno/InnoInstallerCommand.java?rev=376197&r1=376196&r2=376197&view=diff
==============================================================================
--- directory/trunks/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/inno/InnoInstallerCommand.java
(original)
+++ directory/trunks/daemon/installers-plugin/src/main/java/org/apache/directory/daemon/installers/inno/InnoInstallerCommand.java
Wed Feb  8 22:01:43 2006
@@ -245,6 +245,44 @@
         filterProperties.put( "image.basedir", target.getLayout().getBaseDirectory().getPath()
);
         filterProperties.put( "app.lib.jars", getApplicationLibraryJars() );
         filterProperties.put( "installer.output.directory", target.getLayout().getBaseDirectory().getParent()
);
+        
+        if ( target.getDocsDirectory() != null )
+        {
+        	filterProperties.put( "docs.directive", getDocsDirective() );
+        }
+        else
+        {
+        	filterProperties.put( "docs.directive", "" );
+        }
+        
+        if ( target.getSourcesDirectory() != null )
+        {
+        	filterProperties.put( "sources.directive", getSourcesDirective() );
+        }
+        else
+        {
+        	filterProperties.put( "sources.directive", "" );
+        }
+    }
+    
+    
+    private String getSourcesDirective()
+    {
+        StringBuffer buf = new StringBuffer();
+        buf.append( "Source: {#SourceBase}\\" ).append( target.getSourcesTargetPath() );
+        buf.append( "\\*; DestDir: {app}\\" ).append( target.getSourcesTargetPath() );
+        buf.append( "\\; Flags: ignoreversion recursesubdirs createallsubdirs" );
+        return buf.toString();
+    }
+    
+    
+    private String getDocsDirective()
+    {
+        StringBuffer buf = new StringBuffer();
+        buf.append( "Source: {#SourceBase}\\" ).append( target.getDocsTargetPath() );
+        buf.append( "\\*; DestDir: {app}\\" ).append( target.getDocsTargetPath() );
+        buf.append( "\\; Flags: ignoreversion recursesubdirs createallsubdirs" );
+        return buf.toString();
     }
     
     

Modified: directory/trunks/daemon/installers-plugin/src/main/resources/org/apache/directory/daemon/installers/inno/install.iss
URL: http://svn.apache.org/viewcvs/directory/trunks/daemon/installers-plugin/src/main/resources/org/apache/directory/daemon/installers/inno/install.iss?rev=376197&r1=376196&r2=376197&view=diff
==============================================================================
--- directory/trunks/daemon/installers-plugin/src/main/resources/org/apache/directory/daemon/installers/inno/install.iss
(original)
+++ directory/trunks/daemon/installers-plugin/src/main/resources/org/apache/directory/daemon/installers/inno/install.iss
Wed Feb  8 22:01:43 2006
@@ -63,6 +63,8 @@
 Source: {#SourceBase}\lib\ext; DestDir: "{app}\lib"; Flags: ignoreversion recursesubdirs
createallsubdirs
 ; lib directory targets
 ${app.lib.jars}
+${docs.directive}
+${sources.directive}
 
 [Icons]
 Name: {group}\Service Settings; Filename: {app}\bin\${app}w.exe; Parameters: //ES//${app};
IconIndex: 0



Mime
View raw message