geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r902666 - in /geronimo/server/trunk/framework: assemblies/geronimo-framework/ buildsupport/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/
Date Sun, 24 Jan 2010 22:25:51 GMT
Author: djencks
Date: Sun Jan 24 22:25:50 2010
New Revision: 902666

URL: http://svn.apache.org/viewvc?rev=902666&view=rev
Log:
GERONIMO-5045 geronimo-maven-plugin works at least a bit

Modified:
    geronimo/server/trunk/framework/assemblies/geronimo-framework/pom.xml
    geronimo/server/trunk/framework/buildsupport/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/InstallerMojoSupport.java
    geronimo/server/trunk/framework/buildsupport/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/StartServerMojo.java

Modified: geronimo/server/trunk/framework/assemblies/geronimo-framework/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/assemblies/geronimo-framework/pom.xml?rev=902666&r1=902665&r2=902666&view=diff
==============================================================================
--- geronimo/server/trunk/framework/assemblies/geronimo-framework/pom.xml (original)
+++ geronimo/server/trunk/framework/assemblies/geronimo-framework/pom.xml Sun Jan 24 22:25:50
2010
@@ -46,4 +46,124 @@
         </dependency>
     </dependencies>
 
+    <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.geronimo.buildsupport</groupId>
+                    <artifactId>geronimo-maven-plugin</artifactId>
+                    <version>${version}</version>
+
+                    <configuration>
+                        <!--<assemblies>-->
+                            <!--<assembly>-->
+                                <!--<id>activemq</id>-->
+                                <!--<groupId>org.apache.geronimo.plugins</groupId>-->
+                                <!--<artifactId>activemq-server</artifactId>-->
+                                <!--<version>${geronimoVersion}</version>-->
+                                <!--<classifier>bin</classifier>-->
+                                <!--<type>zip</type>-->
+                            <!--</assembly>-->
+                        <!--</assemblies>-->
+
+                        <!--<defaultAssemblyId>activemq</defaultAssemblyId>-->
+                       <assemblyArchive>${project.build.directory}/${pom.artifactId}-${pom.version}-bin.zip</assemblyArchive>
+                        <optionSets>
+                            <optionSet>
+                                <id>morememory</id>
+                                <options>
+                                    <option>-Xmx512m</option>
+                                    <option>-XX:MaxPermSize=128m</option>
+                                </options>
+                            </optionSet>
+
+                            <optionSet>
+                                <id>debug</id>
+                                <options>
+                                    <option>-Xdebug</option>
+                                    <option>-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n</option>
+                                </options>
+                            </optionSet>
+                        </optionSets>
+                    </configuration>
+                    <executions>
+                         <execution>
+                             <id>start</id>
+                             <phase>pre-integration-test</phase>
+                             <goals>
+                                 <goal>start-server</goal>
+                             </goals>
+                             <configuration>
+                                 <assemblyId>${it-server}</assemblyId>
+                                 <logOutput>true</logOutput>
+                                 <background>true</background>
+                                 <verifyTimeout>300</verifyTimeout>
+                                 <refresh>true</refresh>
+                                 <optionSets>
+                                     <optionSet>
+                                         <id>default</id>
+                                         <options>
+                                            <option>-XX:MaxPermSize=128m</option>
+                                         </options>
+                                     </optionSet>
+
+                                     <optionSet>
+                                          <id>morememory</id>
+                                          <options>
+                                              <option>-Xmx512m</option>
+                                              <option>-XX:MaxPermSize=128m</option>
+                                          </options>
+                                      </optionSet>
+
+                                      <optionSet>
+                                          <id>debug</id>
+                                          <options>
+                                              <option>-Xdebug</option>
+                                              <option>-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n</option>
+                                          </options>
+                                      </optionSet>
+                                 </optionSets>
+                             </configuration>
+                         </execution>
+                         <!--<execution>-->
+                             <!--<id>install-plugin</id>-->
+                             <!--<phase>install</phase>-->
+                             <!--<goals>-->
+                                 <!--<goal>install-plugin</goal>-->
+                             <!--</goals>-->
+                             <!--<configuration>-->
+                                 <!--<defaultGeronimoRepository>http://geronimo.apache.org/plugins/geronimo-${geronimoVersion}/</defaultGeronimoRepository>-->
+                             <!--</configuration>-->
+                         <!--</execution>-->
+                         <execution>
+                             <id>stop</id>
+                             <phase>install</phase>
+                             <goals>
+                                 <goal>stop-server</goal>
+                             </goals>
+                         </execution>
+                     </executions>
+                </plugin>
+                
+            </plugins>
+        </pluginManagement>
+    </build>
+
+    <profiles>
+        <profile>
+            <id>it</id>
+            <!--<properties>-->
+            <!--<it-server>jetty</it-server>-->
+            <!--</properties>-->
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.geronimo.buildsupport</groupId>
+                        <artifactId>geronimo-maven-plugin</artifactId>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+    
 </project>

Modified: geronimo/server/trunk/framework/buildsupport/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/InstallerMojoSupport.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/buildsupport/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/InstallerMojoSupport.java?rev=902666&r1=902665&r2=902666&view=diff
==============================================================================
--- geronimo/server/trunk/framework/buildsupport/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/InstallerMojoSupport.java
(original)
+++ geronimo/server/trunk/framework/buildsupport/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/InstallerMojoSupport.java
Sun Jan 24 22:25:50 2010
@@ -123,8 +123,8 @@
             Enumeration n = zipFile.entries();
             while (n.hasMoreElements()) {
                 ZipEntry entry = (ZipEntry)n.nextElement();
-                // look for bin/server.jar under a single directory                     
-                if (entry.getName().endsWith("bin/server.jar") && entry.getName().split("/").length
== 3) {
+                // look for lib/karaf.jar under a single directory                     
+                if (entry.getName().endsWith("lib/karaf.jar") && entry.getName().split("/").length
== 3) {
                     File file = new File(installDirectory, entry.getName());
                     dir = file.getParentFile().getParentFile();
                     break;
@@ -134,7 +134,7 @@
             zipFile.close();
         }
         catch (IOException e) {
-            throw new MojoExecutionException("Failed to determine geronimoHome while scanning
archive for 'bin/server.jar'", e);
+            throw new MojoExecutionException("Failed to determine geronimoHome while scanning
archive for 'lib/karaf.jar'", e);
         }
 
         if (dir == null) {
@@ -153,9 +153,9 @@
                 geronimoHome = geronimoHome.getCanonicalFile();
                 
                 // Quick sanity check
-                File file = new File(geronimoHome, "bin/server.jar");
+                File file = new File(geronimoHome, "lib/karaf.jar");
                 if (!file.exists()) {
-                    throw new MojoExecutionException("When geronimoHome is set, it must point
to a directory that contains 'bin/server.jar'");
+                    throw new MojoExecutionException("When geronimoHome is set, it must point
to a directory that contains 'lib/karaf.jar'");
                 }
                 log.info("Using pre-installed assembly: " + geronimoHome);
 

Modified: geronimo/server/trunk/framework/buildsupport/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/StartServerMojo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/buildsupport/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/StartServerMojo.java?rev=902666&r1=902665&r2=902666&view=diff
==============================================================================
--- geronimo/server/trunk/framework/buildsupport/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/StartServerMojo.java
(original)
+++ geronimo/server/trunk/framework/buildsupport/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/StartServerMojo.java
Sun Jan 24 22:25:50 2010
@@ -35,6 +35,9 @@
 
 import org.apache.tools.ant.taskdefs.Java;
 
+import org.apache.tools.ant.types.DirSet;
+import org.apache.tools.ant.types.FileSet;
+import org.apache.tools.ant.types.Path;
 import org.codehaus.mojo.pluginsupport.util.ObjectHolder;
 
 import org.apache.geronimo.mavenplugins.geronimo.ServerProxy;
@@ -164,7 +167,12 @@
 
         // Setup the JVM to start the server with
         final Java java = (Java)createTask("java");
-        java.setJar(new File(geronimoHome, "bin/server.jar"));
+        java.setClassname("org.apache.geronimo.cli.daemon.DaemonCLI");
+        Path path = java.createClasspath();
+        File libDir = new File(geronimoHome, "lib");
+        FileSet fileSet = new FileSet();
+        fileSet.setDir(libDir);
+        path.addFileset(fileSet);
         java.setDir(geronimoHome);
         java.setFailonerror(true);
         java.setFork(true);
@@ -253,6 +261,8 @@
 
         // Set the properties which we pass to the JVM from the startup script
         setSystemProperty(java, "org.apache.geronimo.home.dir", geronimoHome);
+        setSystemProperty(java, "karaf.home", geronimoHome);
+        setSystemProperty(java, "karaf.base", geronimoHome);
         // Use relative path
         setSystemProperty(java, "java.io.tmpdir", "var/temp");
         setSystemProperty(java, "java.endorsed.dirs", prefixSystemPath("java.endorsed.dirs",
new File(geronimoHome, "lib/endorsed")));



Mime
View raw message