incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject svn commit: r1397800 - in /incubator/ambari/branches/AMBARI-666: AMBARI-666-CHANGES.txt ambari-server/src/main/assemblies/server.xml ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java ambari-web/pom.xml pom.xml
Date Sat, 13 Oct 2012 07:49:28 GMT
Author: yusaku
Date: Sat Oct 13 07:49:28 2012
New Revision: 1397800

URL: http://svn.apache.org/viewvc?rev=1397800&view=rev
Log:
AMBARI-854. Serve ambari-web from jetty. (Jaimin Jetly via yusaku)

Added:
    incubator/ambari/branches/AMBARI-666/ambari-web/pom.xml
Modified:
    incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt
    incubator/ambari/branches/AMBARI-666/ambari-server/src/main/assemblies/server.xml
    incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
    incubator/ambari/branches/AMBARI-666/pom.xml

Modified: incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt?rev=1397800&r1=1397799&r2=1397800&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt (original)
+++ incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt Sat Oct 13 07:49:28 2012
@@ -12,6 +12,8 @@ AMBARI-666 branch (unreleased changes)
 
   NEW FEATURES
 
+  AMBARI-854. Serve ambari-web from jetty. (Jaimin Jely via yusaku)
+ 
   AMBARI-850. Flatten ExecutionCommand structure. (jitendra)
   
   AMBARI-848. Various tests for FSM and Controller impl. (hitesh)

Modified: incubator/ambari/branches/AMBARI-666/ambari-server/src/main/assemblies/server.xml
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-server/src/main/assemblies/server.xml?rev=1397800&r1=1397799&r2=1397800&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-server/src/main/assemblies/server.xml (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-server/src/main/assemblies/server.xml Sat
Oct 13 07:49:28 2012
@@ -42,6 +42,15 @@
         <include>*.txt</include>
       </includes>
     </fileSet>
+     <!--
+    <fileSet>
+      <directory>${project.build.directory}/web/</directory>
+      <outputDirectory>ambari-server-${project.version}/web/</outputDirectory>
+      <includes>
+        <include>*</include>
+      </includes>
+    </fileSet>
+    -->
     <!--
     <fileSet>
       <directory>${basedir}/src/main/bin</directory>

Modified: incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java?rev=1397800&r1=1397799&r2=1397800&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
(original)
+++ incubator/ambari/branches/AMBARI-666/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
Sat Oct 13 07:49:28 2012
@@ -29,6 +29,7 @@ import org.apache.ambari.server.orm.Guic
 import org.apache.ambari.server.security.CertificateManager;
 import org.apache.ambari.server.state.Clusters;
 import org.mortbay.jetty.Server;
+import org.mortbay.jetty.handler.ResourceHandler;
 import org.mortbay.jetty.security.SslSocketConnector;
 import org.mortbay.jetty.servlet.Context;
 import org.mortbay.jetty.servlet.DefaultServlet;
@@ -75,7 +76,13 @@ public class AmbariServer {
   public static AmbariManagementController getController() {
     return clusterController;
   }
-  
+
+  private void setAmbariWebContext(Server server) {
+    Context webContext = new Context(server, "/", 0);
+    webContext.setHandler(new ResourceHandler());
+    webContext.setResourceBase("web");
+  }
+
   public void run() {
     server = new Server(CLIENT_API_PORT);
     serverForAgent = new Server();
@@ -92,6 +99,8 @@ public class AmbariServer {
       String[] contextLocations = {SPRING_CONTEXT_LOCATION};
       ClassPathXmlApplicationContext springAppContext = new
           ClassPathXmlApplicationContext(contextLocations, parentSpringAppContext);
+       //setting ambari web context
+      setAmbariWebContext(server);
 
       Context root = new Context(server, CONTEXT_PATH, Context.ALL);
 

Added: incubator/ambari/branches/AMBARI-666/ambari-web/pom.xml
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/pom.xml?rev=1397800&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/pom.xml (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/pom.xml Sat Oct 13 07:49:28 2012
@@ -0,0 +1,84 @@
+<?xml version="1.0"?>
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor 
+  license agreements. See the NOTICE file distributed with this work for additional 
+  information regarding copyright ownership. The ASF licenses this file to 
+  You 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. -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.ambari</groupId>
+  <artifactId>ambari-web</artifactId>
+  <packaging>pom</packaging>
+  <name>Ambari Web</name>
+  <version>1.0.3-SNAPSHOT</version>
+  <description>Ambari Web</description>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.ambari</groupId>
+      <artifactId>ambari-server</artifactId>
+      <version>1.0.3-SNAPSHOT</version>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <version>1.7</version>
+        <executions>
+          <execution>
+            <id>compile</id>
+            <phase>compile</phase>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <configuration>
+              <target name="ambari-web-compile">
+                <exec dir="${basedir}" executable="brunch" failonerror="false">
+                  <arg value="build"/>
+                </exec>
+              </target>
+            </configuration>
+          </execution>
+          <execution>
+            <id>test</id>
+            <phase>test</phase>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <configuration>
+              <target name="ambari-web-test">
+                <exec dir="${basedir}" executable="brunch" failonerror="false">
+                  <arg value="test"/>
+                </exec>
+              </target>
+            </configuration>
+          </execution>
+          <execution>
+            <id>package</id>
+            <phase>package</phase>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <configuration>
+              <target name="ambari-web-package">
+                <!--
+                <copy toDir="${project.build.directory}/ambari-server-${project.version}-dist/ambari-server-${project.version}/web/">
+                  <fileset dir="${basedir}/../ambari-web/public"/>
+                </copy>
+                -->
+                <symlink overwrite="true" link="${basedir}/../ambari-server/target/ambari-server-${project.version}-dist/ambari-server-${project.version}/web"
resource="${basedir}/public" failonerror="false" />
+              </target>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Modified: incubator/ambari/branches/AMBARI-666/pom.xml
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/pom.xml?rev=1397800&r1=1397799&r2=1397800&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/pom.xml (original)
+++ incubator/ambari/branches/AMBARI-666/pom.xml Sat Oct 13 07:49:28 2012
@@ -40,6 +40,7 @@
     <module>ambari-project</module>
     <module>ambari-server</module>
     <module>ambari-agent</module>
+    <module>ambari-web</module>
   </modules>
   <build>
     <pluginManagement>



Mime
View raw message