aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2014-07-14 09:14:47 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2014-07-14 09:14:47 +0200
commite54940fd9ea100740082939b9a28157d3803d462 (patch)
treeb60e9a22f98fdd33815252f9a18da133eb786116 /server
parent1de4e949ef73b086e5ff5cef2b39fdb3c3553d41 (diff)
downloadsonarqube-e54940fd9ea100740082939b9a28157d3803d462.tar.gz
sonarqube-e54940fd9ea100740082939b9a28157d3803d462.zip
Temporarily re-enable Rails dev mode in sonar-web
Diffstat (limited to 'server')
-rw-r--r--server/sonar-web/.gitignore4
-rwxr-xr-xserver/sonar-web/h2-start.sh3
-rwxr-xr-xserver/sonar-web/mysql-start.sh3
-rw-r--r--server/sonar-web/pom.xml284
-rwxr-xr-xserver/sonar-web/postgresql-start.sh3
-rw-r--r--server/sonar-web/src/dev/sonar.properties1
6 files changed, 297 insertions, 1 deletions
diff --git a/server/sonar-web/.gitignore b/server/sonar-web/.gitignore
index aaf8a673ae6..88be9357e05 100644
--- a/server/sonar-web/.gitignore
+++ b/server/sonar-web/.gitignore
@@ -7,4 +7,6 @@ node_modules/
# build
src/main/webapp/build/
src/main/webapp/js/
-src/main/webapp/css/ \ No newline at end of file
+src/main/webapp/css/
+src/main/webapp/WEB-INF/lib/*.jar
+!src/main/webapp/WEB-INF/lib/eastwood-1.1.0.jar
diff --git a/server/sonar-web/h2-start.sh b/server/sonar-web/h2-start.sh
new file mode 100755
index 00000000000..185d31df28b
--- /dev/null
+++ b/server/sonar-web/h2-start.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+export MAVEN_OPTS='-Xmx512m -XX:MaxPermSize=160m'
+mvn org.apache.tomcat.maven:tomcat7-maven-plugin::run -Pstart-dev-server,h2 $*
diff --git a/server/sonar-web/mysql-start.sh b/server/sonar-web/mysql-start.sh
new file mode 100755
index 00000000000..e805a7ddc3c
--- /dev/null
+++ b/server/sonar-web/mysql-start.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+export MAVEN_OPTS='-Xmx512m -XX:MaxPermSize=160m'
+mvn org.apache.tomcat.maven:tomcat7-maven-plugin::run -Pstart-dev-server,mysql $*
diff --git a/server/sonar-web/pom.xml b/server/sonar-web/pom.xml
index 98ecf83d8d9..ef74b2cd81d 100644
--- a/server/sonar-web/pom.xml
+++ b/server/sonar-web/pom.xml
@@ -235,6 +235,290 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>h2</id>
+ <properties>
+ <sonar.jdbc.url>jdbc:h2:tcp://localhost:9092/sonar</sonar.jdbc.url>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-jdbc-driver</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <configuration>
+ <overWriteIfNewer>false</overWriteIfNewer>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>false</overWriteSnapshots>
+ <includeArtifactIds>h2</includeArtifactIds>
+ <outputDirectory>${project.build.directory}/dev/extensions/jdbc-driver/h2</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>start-dev-server</id>
+ <properties>
+ <gruntTask>dev</gruntTask>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-plugins</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <configuration>
+ <overWriteIfNewer>false</overWriteIfNewer>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>false</overWriteSnapshots>
+ <includeTypes>sonar-plugin</includeTypes>
+ <outputDirectory>${project.build.directory}/dev/lib/core-plugins</outputDirectory>
+ </configuration>
+ </execution>
+ <execution>
+ <id>copy-server</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <configuration>
+ <overWriteIfNewer>false</overWriteIfNewer>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>false</overWriteSnapshots>
+ <outputDirectory>src/main/webapp/WEB-INF/lib</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-conf</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/dev/conf</outputDirectory>
+ <overwrite>false</overwrite>
+ <resources>
+ <resource>
+ <directory>src/dev</directory>
+ <includes>
+ <include>sonar.properties</include>
+ </includes>
+ <filtering>false</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.tomcat.maven</groupId>
+ <artifactId>tomcat7-maven-plugin</artifactId>
+ <version>2.1</version>
+ <configuration>
+ <port>9000</port>
+ <path>/dev</path>
+ <contextFile>${project.basedir}/src/main/webapp/META-INF/context.xml</contextFile>
+ <useNaming>false</useNaming>
+ <systemProperties>
+ <SONAR_HOME>${project.build.directory}/dev</SONAR_HOME>
+ <jruby.max.runtimes>3</jruby.max.runtimes>
+ <sonar.jdbc.url>${sonar.jdbc.url}</sonar.jdbc.url>
+ <sonar.es.http.host>127.0.0.1</sonar.es.http.host>
+ <sonar.es.http.port>9200</sonar.es.http.port>
+ <sonar.log.console>true</sonar.log.console>
+ <sonar.log.profilingLevel>BASIC</sonar.log.profilingLevel>
+ <sonar.web.context>/dev</sonar.web.context>
+ </systemProperties>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.sonar</groupId>
+ <artifactId>sonar-server</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <!-- core plugins -->
+ <dependency>
+ <groupId>org.codehaus.sonar.plugins</groupId>
+ <artifactId>sonar-core-plugin</artifactId>
+ <version>${project.version}</version>
+ <type>sonar-plugin</type>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.sonar.plugins</groupId>
+ <artifactId>sonar-design-plugin</artifactId>
+ <version>${project.version}</version>
+ <type>sonar-plugin</type>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.sonar-plugins.java</groupId>
+ <artifactId>sonar-findbugs-plugin</artifactId>
+ <version>${sonarJava.version}</version>
+ <type>sonar-plugin</type>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.sonar.plugins</groupId>
+ <artifactId>sonar-dbcleaner-plugin</artifactId>
+ <version>${project.version}</version>
+ <type>sonar-plugin</type>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.sonar-plugins.java</groupId>
+ <artifactId>sonar-squid-java-plugin</artifactId>
+ <version>${sonarJava.version}</version>
+ <type>sonar-plugin</type>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.sonar-plugins.java</groupId>
+ <artifactId>sonar-surefire-plugin</artifactId>
+ <version>${sonarJava.version}</version>
+ <type>sonar-plugin</type>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.sonar.plugins</groupId>
+ <artifactId>sonar-cpd-plugin</artifactId>
+ <version>${project.version}</version>
+ <type>sonar-plugin</type>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.sonar.plugins</groupId>
+ <artifactId>sonar-l10n-en-plugin</artifactId>
+ <version>${project.version}</version>
+ <type>sonar-plugin</type>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.sonar.plugins</groupId>
+ <artifactId>sonar-email-notifications-plugin</artifactId>
+ <version>${project.version}</version>
+ <type>sonar-plugin</type>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.sonar-plugins.java</groupId>
+ <artifactId>sonar-jacoco-plugin</artifactId>
+ <version>${sonarJava.version}</version>
+ <type>sonar-plugin</type>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.sonar-plugins.java</groupId>
+ <artifactId>sonar-java-plugin</artifactId>
+ <version>${sonarJava.version}</version>
+ <type>sonar-plugin</type>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>postgresql</id>
+ <properties>
+ <sonar.jdbc.url>jdbc:postgresql://localhost:15432/sonar</sonar.jdbc.url>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-jdbc-driver</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <configuration>
+ <overWriteIfNewer>false</overWriteIfNewer>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>false</overWriteSnapshots>
+ <includeArtifactIds>postgresql</includeArtifactIds>
+ <outputDirectory>${project.build.directory}/dev/extensions/jdbc-driver/postgresql</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>postgresql</groupId>
+ <artifactId>postgresql</artifactId>
+ </dependency>
+ </dependencies>
+ </profile>
+
+ <profile>
+ <id>mysql</id>
+ <properties>
+ <sonar.jdbc.url>jdbc:mysql://localhost:13306/sonar?autoReconnect=true&amp;useUnicode=true&amp;characterEncoding=utf8&amp;rewriteBatchedStatements=true</sonar.jdbc.url>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-jdbc-driver</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <configuration>
+ <overWriteIfNewer>false</overWriteIfNewer>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>false</overWriteSnapshots>
+ <includeArtifactIds>mysql-connector-java</includeArtifactIds>
+ <outputDirectory>${project.build.directory}/dev/extensions/jdbc-driver/mysql</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-java</artifactId>
+ </dependency>
+ </dependencies>
+ </profile>
</profiles>
</project>
diff --git a/server/sonar-web/postgresql-start.sh b/server/sonar-web/postgresql-start.sh
new file mode 100755
index 00000000000..8a8d12609aa
--- /dev/null
+++ b/server/sonar-web/postgresql-start.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+export MAVEN_OPTS='-Xmx1512m -XX:MaxPermSize=256m'
+mvn org.apache.tomcat.maven:tomcat7-maven-plugin::run -Pstart-dev-server,postgresql $*
diff --git a/server/sonar-web/src/dev/sonar.properties b/server/sonar-web/src/dev/sonar.properties
new file mode 100644
index 00000000000..2c27f707a9b
--- /dev/null
+++ b/server/sonar-web/src/dev/sonar.properties
@@ -0,0 +1 @@
+# Properties are set by Maven. See profile start-dev-server.