|
From: <ian...@us...> - 2007-09-20 18:34:08
|
Revision: 430
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=430&view=rev
Author: iansmith
Date: 2007-09-20 11:34:07 -0700 (Thu, 20 Sep 2007)
Log Message:
-----------
First stage of externalization of all resources that are needed to run an ogoglio war.
Modified Paths:
--------------
maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/migrate/MigrationSupport.java
maven/trunk/ogoglio-integration-test/pom.xml
maven/trunk/ogoglio-server/pom.xml
maven/trunk/ogoglio-server/src/main/webapp/META-INF/context.xml
Modified: maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/migrate/MigrationSupport.java
===================================================================
--- maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/migrate/MigrationSupport.java 2007-09-19 20:33:25 UTC (rev 429)
+++ maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/migrate/MigrationSupport.java 2007-09-20 18:34:07 UTC (rev 430)
@@ -87,6 +87,8 @@
}
if (useJNDI) {
configuration.setProperty("hibernate.connection.datasource", "java:comp/env/jdbc/space");
+ //I have no idea why this is necessary if the datasource SPECIFIES the dialect
+ configuration.setProperty("hibernate.dialect","org.hibernate.dialect.MySQLDialect");
} else {
configuration.addProperties(ps.getAllProps(PropStorage.TEST_CONFIG_PROPS));
}
Modified: maven/trunk/ogoglio-integration-test/pom.xml
===================================================================
--- maven/trunk/ogoglio-integration-test/pom.xml 2007-09-19 20:33:25 UTC (rev 429)
+++ maven/trunk/ogoglio-integration-test/pom.xml 2007-09-20 18:34:07 UTC (rev 430)
@@ -90,56 +90,6 @@
</executions>
<configuration />
</plugin>
- <!--lots of CARGO magic to bring server up, do deploys... -->
- <plugin>
- <groupId>org.codehaus.cargo</groupId>
- <artifactId>cargo-maven2-plugin</artifactId>
- <version>0.3-SNAPSHOT</version>
- <configuration></configuration>
- <executions>
- <execution>
- <!--bring up server in /tmp -->
- <id>boot-server</id>
- <phase>pre-integration-test</phase>
- <goals>
- <goal>start</goal>
- </goals>
- <configuration>
- <wait>false</wait>
- <container>
- <containerId>tomcat5x</containerId>
- <home>${cargo.tomcat5x.home}</home>
- <log>${basedir}/tomcat5x.log</log>
- <output>${basedir}/tomcat5x.out</output>
- </container>
- <!-- container configuration -->
- <configuration>
- <type>standalone</type>
- <home>${ogoglio.tmp.tomcat5x}</home>
- <properties>
- <cargo.servlet.port>
- ${ogoglio.port}
- </cargo.servlet.port>
- <cargo.logging>high</cargo.logging>
- </properties>
- <!-- tricky: this gets put in *before* the server even boots -->
- <deployables>
- <deployable>
- <groupId>com.ogoglio</groupId>
- <artifactId>
- ogoglio-server
- </artifactId>
- <type>war</type>
- <properties>
- <context>og</context>
- </properties>
- </deployable>
- </deployables>
- </configuration>
- </configuration>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
Modified: maven/trunk/ogoglio-server/pom.xml
===================================================================
--- maven/trunk/ogoglio-server/pom.xml 2007-09-19 20:33:25 UTC (rev 429)
+++ maven/trunk/ogoglio-server/pom.xml 2007-09-20 18:34:07 UTC (rev 430)
@@ -14,41 +14,6 @@
<artifactId>ogoglio-server</artifactId>
<packaging>war</packaging>
- <profiles>
- <profile>
- <id>hot-deploy</id>
- <build>
- <plugins>
- <!-- CARGO CONFIG:INSTALL TO RUNNING SERVER -->
- <plugin>
- <groupId>org.codehaus.cargo</groupId>
- <artifactId>cargo-maven2-plugin</artifactId>
- <version>0.3-SNAPSHOT</version>
- <configuration>
- <container>
- <containerId>tomcat5x</containerId>
- </container>
- <!-- Configuration to use with the container -->
- <configuration>
- <type>existing</type>
- <home>${ogoglio.tmp.tomcat5x}</home>
- </configuration>
- <deployables>
- <deployable>
- <properties>
- <context>
- ${pom.artifactId}
- </context>
- </properties>
- </deployable>
- </deployables>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
<!-- -->
<!-- BUILD -->
<!-- -->
@@ -200,7 +165,9 @@
<serviceURI>${ogoglio.baseURL}</serviceURI>
<username>${ogoglio.bootstrapUser}</username>
<password>${ogoglio.bootstrapUserPW}</password>
- <populateDir>src/main/resources/populate</populateDir>
+ <populateDir>
+ src/main/resources/populate
+ </populateDir>
<reverseFile>/tmp/reverse.xml</reverseFile>
<goalPrefix>og</goalPrefix>
</configuration>
@@ -224,6 +191,26 @@
</execution>
</executions>
</plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>tomcat-maven-plugin</artifactId>
+ <configuration>
+ <server>localMachine</server>
+ <path>/og</path>
+ </configuration>
+
+ <executions>
+ <execution>
+ <phase>install</phase>
+ <goals>
+ <goal>undeploy</goal>
+ <goal>deploy</goal>
+ </goals>
+ </execution>
+ </executions>
+
+ </plugin>
</plugins>
</build>
Modified: maven/trunk/ogoglio-server/src/main/webapp/META-INF/context.xml
===================================================================
--- maven/trunk/ogoglio-server/src/main/webapp/META-INF/context.xml 2007-09-19 20:33:25 UTC (rev 429)
+++ maven/trunk/ogoglio-server/src/main/webapp/META-INF/context.xml 2007-09-20 18:34:07 UTC (rev 430)
@@ -2,24 +2,15 @@
<Context reloadable="true" path="/og" >
<Realm className="org.apache.catalina.realm.MemoryRealm" />
- <Resource name="jdbc/space" scope="Shareable"
- type="javax.sql.DataSource" auth='Container'
- factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
- url="${ogoglio.mysql.url}"
- driverClassName="com.mysql.jdbc.Driver"
- username="${ogoglio.mysql.user}"
- password="${ogoglio.mysql.password}"
- dialect="org.hibernate.dialect.MySQLDialect"
- show_sql="false"
- maxIdle="5"
- maxActive="50" />
-
- <Environment name="ogoglio/oktoZapDB" value="false" type="java.lang.String"/> <!-- not running tests! -->
- <Environment name="ogoglio/okToMigrateDB" value="${ogoglio.okToMigrateDB}" type="java.lang.String"/>
- <Environment name="ogoglio/mediaURL" value="${ogoglio.mediaURL}" type="java.lang.String"/>
- <Environment name="ogoglio/baseURL" value="${ogoglio.baseURL}" type="java.lang.String"/>
- <Environment name="ogoglio/simsAllowRemoteAccess" value="true" type="java.lang.String" />
- <Environment name="ogoglio/mediaDirectory" value="${ogoglio.mediaDirectory}" type="java.lang.String"/>
- <Environment name="ogoglio/bootstrapUser" value="${ogoglio.bootstrapUser}" type="java.lang.String"/>
- <Environment name="ogoglio/bootstrapUserPW" value="${ogoglio.bootstrapUserPW}" type="java.lang.String"/>
+ <ResourceLink name="jdbc/space"
+ global="ogoglioDB"
+ type="javax.sql.DataSource"/>
+
+ <ResourceLink name="ogoglio/mediaURL" global="mediaURL" type="java.lang.String"/>
+ <ResourceLink name="ogoglio/baseURL" global="baseURL" type="java.lang.String"/>
+
+ <ResourceLink name="ogoglio/oktoZapDB" global="oktoZapDB" type="java.lang.String"/>
+ <ResourceLink name="ogoglio/okMigrateDB" global="oktoMigrateDB" type="java.lang.String"/>
+ <ResourceLink name="ogoglio/simsAllowRemoteAccess" global="simsAllowRemoteAccess" type="java.lang.String"/>
+ <ResourceLink name="ogoglio/mediaDirectory" global="mediaDirectory" type="java.lang.String"/>
</Context>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|