You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by la...@apache.org on 2013/07/19 13:00:15 UTC

[32/51] [partial] applied 0001-Refactor-stratos-controller-product.patch

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/29f27ad9/products/stratos2/stratos_controller/1.0.0/modules/s2-gitblit-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/products/stratos2/stratos_controller/1.0.0/modules/s2-gitblit-plugin/pom.xml b/products/stratos2/stratos_controller/1.0.0/modules/s2-gitblit-plugin/pom.xml
deleted file mode 100644
index f0c10cd..0000000
--- a/products/stratos2/stratos_controller/1.0.0/modules/s2-gitblit-plugin/pom.xml
+++ /dev/null
@@ -1,188 +0,0 @@
-<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/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <groupId>org.wso2.carbon</groupId>
-    <artifactId>s2.gitblit.plugin</artifactId>
-    <version>0.0.1</version>
-    <packaging>jar</packaging>
-
-    <name>s2.gitblit-plugin</name>
-    <url>http://maven.apache.org</url>
-
-    <build>
-        <plugins>
-
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-antrun-plugin</artifactId>
-                <version>1.1</version>
-
-                <executions>
-                    <execution>
-                        <id>source-code-generation</id>
-                        <phase>process-resources</phase>
-                        <goals>
-                            <goal>run</goal>
-                        </goals>
-                        <configuration>
-                            <tasks>
-                                <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
-                                    <arg line="-uri src/main/resources/AuthenticationAdmin.wsdl -u -uw -o target/generated-code
-                                    -p  org.wso2.carbon.adc.repository.mgt.service"/>
-                                    <classpath refid="maven.dependency.classpath"/>
-                                    <classpath refid="maven.compile.classpath"/>
-                                    <classpath refid="maven.runtime.classpath"/>
-                                </java>
-                            </tasks>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>build-helper-maven-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>add-source</id>
-                        <phase>generate-sources</phase>
-                        <goals>
-                            <goal>add-source</goal>
-                        </goals>
-                        <configuration>
-                            <sources>
-                                <source>
-                                    target/generated-code/src
-                                </source>
-                            </sources>
-                        </configuration>
-                    </execution>
-                </executions>
-
-            </plugin>
-
-            <plugin>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <version>2.3</version>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>assembly</goal>
-                        </goals>
-                        <phase>package</phase>
-                        <configuration>
-                            <descriptorRefs>
-                                <descriptorRef>jar-with-dependencies</descriptorRef>
-                            </descriptorRefs>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-
-        </plugins>
-    </build>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.gitblit</groupId>
-            <artifactId>gitblit-manager</artifactId>
-            <version>${gitblit.version}</version>
-            <scope>system</scope>
-            <systemPath>${project.basedir}/lib/gitblit-manager-1.0.0.jar</systemPath>
-        </dependency>
-        <dependency>
-            <groupId>wsdl4j</groupId>
-            <artifactId>wsdl4j</artifactId>
-            <version>1.6.2</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.axis2</groupId>
-            <artifactId>axis2</artifactId>
-            <version>1.6.2</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.axis2</groupId>
-            <artifactId>axis2-transport-local</artifactId>
-            <version>1.6.2</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.axis2</groupId>
-            <artifactId>axis2-transport-http</artifactId>
-            <version>1.6.2</version>
-        </dependency>
-        <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-            <version>1.1.1</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.neethi</groupId>
-            <artifactId>neethi</artifactId>
-            <version>3.0.2</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.ws.commons.axiom</groupId>
-            <artifactId>axiom-dom</artifactId>
-            <version>1.2.13</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.ws.commons.axiom</groupId>
-            <artifactId>axiom-api</artifactId>
-            <version>1.2.13</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.ws.commons.axiom</groupId>
-            <artifactId>axiom-impl</artifactId>
-            <version>1.2.13</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.ws.commons.schema</groupId>
-            <artifactId>XmlSchema</artifactId>
-            <version>1.4.7</version>
-        </dependency>
-        <!--service-stubs-->
-        <dependency>
-            <groupId>org.wso2.carbon</groupId>
-            <artifactId>org.wso2.carbon.authenticator.stub</artifactId>
-            <version>4.1.0</version>
-        </dependency>
-        <dependency>
-            <groupId>org.wso2.carbon</groupId>
-            <artifactId>org.wso2.carbon.user.mgt.stub</artifactId>
-            <version>4.1.0</version>
-        </dependency>
-        <dependency>
-            <groupId>org.wso2.carbon</groupId>
-            <artifactId>org.wso2.carbon.core</artifactId>
-            <version>4.1.0</version>
-        </dependency>
-        <!-- dependencies provided by gitblit -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <version>${slf4j.version}</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>com.google.guava</groupId>
-            <artifactId>guava</artifactId>
-            <version>14.0.1</version>
-        </dependency>
-        <dependency>
-            <groupId>com.unboundid</groupId>
-            <artifactId>unboundid-ldapsdk</artifactId>
-            <version>2.3.0</version>
-        </dependency>
-
-    </dependencies>
-    <properties>
-        <maven.compiler.target>1.6</maven.compiler.target>
-        <maven.compiler.source>1.6</maven.compiler.source>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <gitblit.version>1.0.0</gitblit.version>
-        <slf4j.version>1.6.1</slf4j.version>
-    </properties>
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/29f27ad9/products/stratos2/stratos_controller/1.0.0/modules/s2-gitblit-plugin/src/main/java/org/wso2/carbon/s2/gitblit/service/GitAuthService.java
----------------------------------------------------------------------
diff --git a/products/stratos2/stratos_controller/1.0.0/modules/s2-gitblit-plugin/src/main/java/org/wso2/carbon/s2/gitblit/service/GitAuthService.java b/products/stratos2/stratos_controller/1.0.0/modules/s2-gitblit-plugin/src/main/java/org/wso2/carbon/s2/gitblit/service/GitAuthService.java
deleted file mode 100644
index 58dc876..0000000
--- a/products/stratos2/stratos_controller/1.0.0/modules/s2-gitblit-plugin/src/main/java/org/wso2/carbon/s2/gitblit/service/GitAuthService.java
+++ /dev/null
@@ -1,80 +0,0 @@
-package org.wso2.carbon.s2.gitblit.service;
-
-
-import java.io.File;
-import java.rmi.RemoteException;
-
-import org.apache.axis2.AxisFault;
-import org.wso2.carbon.adc.repository.mgt.service.AuthenticationAdminAuthenticationExceptionException;
-import org.wso2.carbon.adc.repository.mgt.service.AuthenticationAdminStub;
-
-import com.gitblit.GitBlit;
-import com.gitblit.GitblitUserService;
-import com.gitblit.IStoredSettings;
-import com.gitblit.models.UserModel;
-
-public class GitAuthService extends GitblitUserService {
-	 
-	public GitAuthService() {
-	    super();
-    }
-
-	
-	@Override
-    public void setup(IStoredSettings settings) {
-        String file = "/opt/GitBlit/data/users.conf";
-        File realmFile = GitBlit.getFileOrFolder(file);
-        serviceImpl = createUserService(realmFile);
-        
-    }
-	
-	@Override
-	public UserModel authenticate(char[] cookie) {
-	    return super.authenticate(cookie);
-	}
-	
-
-	
-	@Override
-	public UserModel authenticate(String username, char[] password) {
-		
-		System.out.println("Authenticating..");
-
-		UserModel user = new UserModel(username);
-
-		String passwordString = new String(password);
-		System.out.println("username: " + username);
-		System.out.println("pwd: " + passwordString);
-
-		boolean isLoggedin = false;
-
-		try {
-			String trustStorePath = "/opt/GitBlit/wso2carbon.jks";
-			System.setProperty("javax.net.ssl.trustStore", trustStorePath);
-			System.setProperty("javax.net.ssl.trustStorePassword", "wso2carbon");
-			AuthenticationAdminStub stub =
-			                               new AuthenticationAdminStub(
-			                                                           "https://localhost:9445/services/AuthenticationAdmin");
-			isLoggedin = stub.login(username, passwordString, "127.0.0.1");
-			System.out.println("Login state : " + isLoggedin);
-		} catch (Exception e) {
-			System.out.println("Exception occurred.. " + e.getMessage());
-			e.printStackTrace();
-		}
-
-		if (isLoggedin) {
-			System.out.println("Successfully authenticated via Authentication Admin..");
-			user.canAdmin = true;
-			return user;
-		} else {
-			System.out.println("Authentication admin authentication failed. Trying internal user service");
-			user = super.authenticate(username, password);
-			user.canAdmin = true;
-			return user;
-		}
-	}
-	
-	
-		
-}
-