geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lin Sun <linsun....@gmail.com>
Subject Re: svn commit: r887267 - in /geronimo/server/trunk/plugins/aries: ./ aries-deployer/ aries-deployer/src/ aries-deployer/src/main/ aries-deployer/src/main/history/ aries-deployer/src/main/plan/ geronimo-aries-builder/ geronimo-aries-builder/src/ gero
Date Fri, 04 Dec 2009 18:53:55 GMT
Hi Jarek

Great progress!  I have 2 minor comments, let me know if I misread it -

1. You may want to unget the ApplicationMetadata manager service
2. the deploymentException message looks weird - Unable to copy app
client module jar into configuration

Thanks

Lin

On Fri, Dec 4, 2009 at 11:59 AM,  <gawor@apache.org> wrote:
> Author: gawor
> Date: Fri Dec  4 16:59:20 2009
> New Revision: 887267
>
> URL: http://svn.apache.org/viewvc?rev=887267&view=rev
> Log:
> GERONIMO-4971: basic structure for deployer for aries applications. The deployer communicates
with Aries' ApplicationMetadataManager service to parse the application manifest
>
> Added:
>    geronimo/server/trunk/plugins/aries/
>    geronimo/server/trunk/plugins/aries/aries-deployer/
>    geronimo/server/trunk/plugins/aries/aries-deployer/pom.xml   (with props)
>    geronimo/server/trunk/plugins/aries/aries-deployer/src/
>    geronimo/server/trunk/plugins/aries/aries-deployer/src/main/
>    geronimo/server/trunk/plugins/aries/aries-deployer/src/main/history/
>    geronimo/server/trunk/plugins/aries/aries-deployer/src/main/history/dependencies.xml
  (with props)
>    geronimo/server/trunk/plugins/aries/aries-deployer/src/main/plan/
>    geronimo/server/trunk/plugins/aries/aries-deployer/src/main/plan/plan.xml   (with
props)
>    geronimo/server/trunk/plugins/aries/geronimo-aries-builder/
>    geronimo/server/trunk/plugins/aries/geronimo-aries-builder/pom.xml   (with props)
>    geronimo/server/trunk/plugins/aries/geronimo-aries-builder/src/
>    geronimo/server/trunk/plugins/aries/geronimo-aries-builder/src/main/
>    geronimo/server/trunk/plugins/aries/geronimo-aries-builder/src/main/java/
>    geronimo/server/trunk/plugins/aries/geronimo-aries-builder/src/main/java/org/
>    geronimo/server/trunk/plugins/aries/geronimo-aries-builder/src/main/java/org/apache/
>    geronimo/server/trunk/plugins/aries/geronimo-aries-builder/src/main/java/org/apache/geronimo/
>    geronimo/server/trunk/plugins/aries/geronimo-aries-builder/src/main/java/org/apache/geronimo/aries/
>    geronimo/server/trunk/plugins/aries/geronimo-aries-builder/src/main/java/org/apache/geronimo/aries/builder/
>    geronimo/server/trunk/plugins/aries/geronimo-aries-builder/src/main/java/org/apache/geronimo/aries/builder/AriesAppModule.java
  (with props)
>    geronimo/server/trunk/plugins/aries/geronimo-aries-builder/src/main/java/org/apache/geronimo/aries/builder/AriesAppModuleBuilder.java
  (with props)
>    geronimo/server/trunk/plugins/aries/pom.xml   (with props)
>
> Added: geronimo/server/trunk/plugins/aries/aries-deployer/pom.xml
> URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/aries/aries-deployer/pom.xml?rev=887267&view=auto
> ==============================================================================
> --- geronimo/server/trunk/plugins/aries/aries-deployer/pom.xml (added)
> +++ geronimo/server/trunk/plugins/aries/aries-deployer/pom.xml Fri Dec  4 16:59:20 2009
> @@ -0,0 +1,63 @@
> +<?xml version="1.0" encoding="ISO-8859-1"?>
> +<!--
> +    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.
> +-->
> +
> +<!-- $Rev$ $Date$ -->
> +
> +<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>
> +
> +    <parent>
> +        <groupId>org.apache.geronimo.plugins</groupId>
> +        <artifactId>aries</artifactId>
> +        <version>3.0-SNAPSHOT</version>
> +    </parent>
> +
> +    <groupId>org.apache.geronimo.configs</groupId>
> +    <artifactId>aries-deployer</artifactId>
> +    <name>Geronimo Plugins, Aries :: Deployer</name>
> +    <packaging>car</packaging>
> +
> +    <dependencies>
> +        <!-- parent -->
> +        <dependency>
> +            <groupId>org.apache.geronimo.configs</groupId>
> +            <artifactId>j2ee-deployer</artifactId>
> +            <version>${version}</version>
> +            <type>car</type>
> +        </dependency>
> +
> +        <dependency>
> +            <groupId>org.apache.geronimo.modules</groupId>
> +            <artifactId>geronimo-aries-builder</artifactId>
> +            <version>${version}</version>
> +        </dependency>
> +    </dependencies>
> +
> +    <build>
> +        <plugins>
> +            <plugin>
> +                <groupId>org.apache.geronimo.buildsupport</groupId>
> +                <artifactId>car-maven-plugin</artifactId>
> +                <configuration>
> +                    <category>Geronimo Core</category>
> +                </configuration>
> +            </plugin>
> +        </plugins>
> +    </build>
> +</project>
>
> Propchange: geronimo/server/trunk/plugins/aries/aries-deployer/pom.xml
> ------------------------------------------------------------------------------
>    svn:eol-style = native
>
> Propchange: geronimo/server/trunk/plugins/aries/aries-deployer/pom.xml
> ------------------------------------------------------------------------------
>    svn:keywords = Date Revision
>
> Propchange: geronimo/server/trunk/plugins/aries/aries-deployer/pom.xml
> ------------------------------------------------------------------------------
>    svn:mime-type = text/xml
>
> Added: geronimo/server/trunk/plugins/aries/aries-deployer/src/main/history/dependencies.xml
> URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/aries/aries-deployer/src/main/history/dependencies.xml?rev=887267&view=auto
> ==============================================================================
> --- geronimo/server/trunk/plugins/aries/aries-deployer/src/main/history/dependencies.xml
(added)
> +++ geronimo/server/trunk/plugins/aries/aries-deployer/src/main/history/dependencies.xml
Fri Dec  4 16:59:20 2009
> @@ -0,0 +1,24 @@
> +<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> +<plugin-artifact xmlns:ns2="http://geronimo.apache.org/xml/ns/attributes-1.2" xmlns="http://geronimo.apache.org/xml/ns/plugins-1.3">
> +    <module-id>
> +        <groupId>org.apache.geronimo.configs</groupId>
> +        <artifactId>aries-deployer</artifactId>
> +        <version>3.0-SNAPSHOT</version>
> +        <type>car</type>
> +    </module-id>
> +    <dependency>
> +        <groupId>org.apache.aries.application</groupId>
> +        <artifactId>aries-application-utils</artifactId>
> +        <type>jar</type>
> +    </dependency>
> +    <dependency>
> +        <groupId>org.apache.geronimo.configs</groupId>
> +        <artifactId>j2ee-deployer</artifactId>
> +        <type>car</type>
> +    </dependency>
> +    <dependency>
> +        <groupId>org.apache.geronimo.modules</groupId>
> +        <artifactId>geronimo-aries-builder</artifactId>
> +        <type>jar</type>
> +    </dependency>
> +</plugin-artifact>
>
> Propchange: geronimo/server/trunk/plugins/aries/aries-deployer/src/main/history/dependencies.xml
> ------------------------------------------------------------------------------
>    svn:eol-style = native
>
> Propchange: geronimo/server/trunk/plugins/aries/aries-deployer/src/main/history/dependencies.xml
> ------------------------------------------------------------------------------
>    svn:keywords = Date Revision
>
> Propchange: geronimo/server/trunk/plugins/aries/aries-deployer/src/main/history/dependencies.xml
> ------------------------------------------------------------------------------
>    svn:mime-type = text/xml
>
> Added: geronimo/server/trunk/plugins/aries/aries-deployer/src/main/plan/plan.xml
> URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/aries/aries-deployer/src/main/plan/plan.xml?rev=887267&view=auto
> ==============================================================================
> --- geronimo/server/trunk/plugins/aries/aries-deployer/src/main/plan/plan.xml (added)
> +++ geronimo/server/trunk/plugins/aries/aries-deployer/src/main/plan/plan.xml Fri Dec
 4 16:59:20 2009
> @@ -0,0 +1,24 @@
> +<?xml version="1.0" encoding="UTF-8"?>
> +<!--
> +    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.
> +-->
> +
> +<module xmlns="http://geronimo.apache.org/xml/ns/deployment-${geronimoSchemaVersion}">
> +
> +    <gbean name="AriesAppBuilder" class="org.apache.geronimo.aries.builder.AriesAppModuleBuilder">
> +    </gbean>
> +
> +</module>
>
> Propchange: geronimo/server/trunk/plugins/aries/aries-deployer/src/main/plan/plan.xml
> ------------------------------------------------------------------------------
>    svn:eol-style = native
>
> Propchange: geronimo/server/trunk/plugins/aries/aries-deployer/src/main/plan/plan.xml
> ------------------------------------------------------------------------------
>    svn:keywords = Date Revision
>
> Propchange: geronimo/server/trunk/plugins/aries/aries-deployer/src/main/plan/plan.xml
> ------------------------------------------------------------------------------
>    svn:mime-type = text/xml
>
> Added: geronimo/server/trunk/plugins/aries/geronimo-aries-builder/pom.xml
> URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/aries/geronimo-aries-builder/pom.xml?rev=887267&view=auto
> ==============================================================================
> --- geronimo/server/trunk/plugins/aries/geronimo-aries-builder/pom.xml (added)
> +++ geronimo/server/trunk/plugins/aries/geronimo-aries-builder/pom.xml Fri Dec  4 16:59:20
2009
> @@ -0,0 +1,69 @@
> +<?xml version="1.0" encoding="ISO-8859-1"?>
> +<!--
> +    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.
> +-->
> +
> +<!-- $Rev$ $Date$ -->
> +
> +<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>
> +
> +    <parent>
> +        <groupId>org.apache.geronimo.plugins</groupId>
> +        <artifactId>aries</artifactId>
> +        <version>3.0-SNAPSHOT</version>
> +    </parent>
> +
> +    <groupId>org.apache.geronimo.modules</groupId>
> +    <artifactId>geronimo-aries-builder</artifactId>
> +    <packaging>bundle</packaging>
> +    <name>Geronimo Plugins, Aries :: Builder</name>
> +
> +    <dependencies>
> +        <dependency>
> +            <groupId>org.apache.geronimo.modules</groupId>
> +            <artifactId>geronimo-security-builder</artifactId>
> +            <version>${version}</version>
> +        </dependency>
> +        <dependency>
> +            <groupId>org.apache.aries.application</groupId>
> +            <artifactId>aries-application-utils</artifactId>
> +            <version>1.0.0-incubating-SNAPSHOT</version>
> +        </dependency>
> +    </dependencies>
> +
> +    <build>
> +        <plugins>
> +            <plugin>
> +                <groupId>org.apache.felix</groupId>
> +                <artifactId>maven-bundle-plugin</artifactId>
> +                <configuration>
> +                    <instructions>
> +                        <Export-Package>
> +                          org.apache.geronimo.aries.builder
> +                        </Export-Package>
> +                        <Import-Package>
> +                          *
> +                        </Import-Package>
> +                    </instructions>
> +                </configuration>
> +            </plugin>
> +        </plugins>
> +    </build>
> +
> +</project>
> +
>
> Propchange: geronimo/server/trunk/plugins/aries/geronimo-aries-builder/pom.xml
> ------------------------------------------------------------------------------
>    svn:eol-style = native
>
> Propchange: geronimo/server/trunk/plugins/aries/geronimo-aries-builder/pom.xml
> ------------------------------------------------------------------------------
>    svn:keywords = Date Revision
>
> Propchange: geronimo/server/trunk/plugins/aries/geronimo-aries-builder/pom.xml
> ------------------------------------------------------------------------------
>    svn:mime-type = text/xml
>
> Added: geronimo/server/trunk/plugins/aries/geronimo-aries-builder/src/main/java/org/apache/geronimo/aries/builder/AriesAppModule.java
> URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/aries/geronimo-aries-builder/src/main/java/org/apache/geronimo/aries/builder/AriesAppModule.java?rev=887267&view=auto
> ==============================================================================
> --- geronimo/server/trunk/plugins/aries/geronimo-aries-builder/src/main/java/org/apache/geronimo/aries/builder/AriesAppModule.java
(added)
> +++ geronimo/server/trunk/plugins/aries/geronimo-aries-builder/src/main/java/org/apache/geronimo/aries/builder/AriesAppModule.java
Fri Dec  4 16:59:20 2009
> @@ -0,0 +1,53 @@
> +/**
> + *  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.
> + */
> +package org.apache.geronimo.aries.builder;
> +
> +import java.util.jar.JarFile;
> +
> +import org.apache.aries.application.ApplicationMetadata;
> +import org.apache.geronimo.gbean.AbstractName;
> +import org.apache.geronimo.j2ee.deployment.Module;
> +import org.apache.geronimo.kernel.config.ConfigurationModuleType;
> +import org.apache.geronimo.kernel.repository.Environment;
> +
> +/**
> + * @version $Rev:385232 $ $Date$
> + */
> +public class AriesAppModule extends Module {
> +
> +    private ApplicationMetadata applicationMetadata;
> +
> +    public AriesAppModule(AbstractName moduleName,
> +                          Environment environment,
> +                          JarFile moduleFile,
> +                          String targetPath,
> +                          ApplicationMetadata applicationMetadata) {
> +        super(true, moduleName, environment, moduleFile, targetPath, null, null,
> +              null, null, null);
> +        this.applicationMetadata = applicationMetadata;
> +    }
> +
> +    @Override
> +    public ConfigurationModuleType getType() {
> +        return ConfigurationModuleType.CAR;
> +    }
> +
> +    public ApplicationMetadata getApplicationMetadata() {
> +        return applicationMetadata;
> +    }
> +
> +}
>
> Propchange: geronimo/server/trunk/plugins/aries/geronimo-aries-builder/src/main/java/org/apache/geronimo/aries/builder/AriesAppModule.java
> ------------------------------------------------------------------------------
>    svn:eol-style = native
>
> Propchange: geronimo/server/trunk/plugins/aries/geronimo-aries-builder/src/main/java/org/apache/geronimo/aries/builder/AriesAppModule.java
> ------------------------------------------------------------------------------
>    svn:keywords = Date Revision
>
> Propchange: geronimo/server/trunk/plugins/aries/geronimo-aries-builder/src/main/java/org/apache/geronimo/aries/builder/AriesAppModule.java
> ------------------------------------------------------------------------------
>    svn:mime-type = text/plain
>
> Added: geronimo/server/trunk/plugins/aries/geronimo-aries-builder/src/main/java/org/apache/geronimo/aries/builder/AriesAppModuleBuilder.java
> URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/aries/geronimo-aries-builder/src/main/java/org/apache/geronimo/aries/builder/AriesAppModuleBuilder.java?rev=887267&view=auto
> ==============================================================================
> --- geronimo/server/trunk/plugins/aries/geronimo-aries-builder/src/main/java/org/apache/geronimo/aries/builder/AriesAppModuleBuilder.java
(added)
> +++ geronimo/server/trunk/plugins/aries/geronimo-aries-builder/src/main/java/org/apache/geronimo/aries/builder/AriesAppModuleBuilder.java
Fri Dec  4 16:59:20 2009
> @@ -0,0 +1,163 @@
> +/**
> + *  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.
> + */
> +package org.apache.geronimo.aries.builder;
> +
> +import java.io.File;
> +import java.io.IOException;
> +import java.io.InputStream;
> +import java.net.URI;
> +import java.net.URL;
> +import java.util.Collection;
> +import java.util.jar.JarEntry;
> +import java.util.jar.JarFile;
> +import java.util.zip.ZipEntry;
> +
> +import org.apache.aries.application.ApplicationMetadata;
> +import org.apache.aries.application.ApplicationMetadataManager;
> +import org.apache.aries.application.Content;
> +import org.apache.geronimo.common.DeploymentException;
> +import org.apache.geronimo.deployment.ModuleIDBuilder;
> +import org.apache.geronimo.gbean.AbstractName;
> +import org.apache.geronimo.gbean.GBeanLifecycle;
> +import org.apache.geronimo.gbean.annotation.GBean;
> +import org.apache.geronimo.gbean.annotation.ParamSpecial;
> +import org.apache.geronimo.gbean.annotation.SpecialAttributeType;
> +import org.apache.geronimo.j2ee.deployment.EARContext;
> +import org.apache.geronimo.j2ee.deployment.Module;
> +import org.apache.geronimo.j2ee.deployment.ModuleBuilder;
> +import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
> +import org.apache.geronimo.kernel.Kernel;
> +import org.apache.geronimo.kernel.Naming;
> +import org.apache.geronimo.kernel.config.ConfigurationStore;
> +import org.apache.geronimo.kernel.repository.Artifact;
> +import org.apache.geronimo.kernel.repository.Environment;
> +import org.osgi.framework.Bundle;
> +import org.osgi.framework.ServiceReference;
> +import org.slf4j.Logger;
> +import org.slf4j.LoggerFactory;
> +
> +/**
> + * @version $Rev:385232 $ $Date$
> + */
> +@GBean(j2eeType = NameFactory.MODULE_BUILDER)
> +public class AriesAppModuleBuilder implements ModuleBuilder, GBeanLifecycle {
> +
> +    private static final Logger LOG = LoggerFactory.getLogger(AriesAppModuleBuilder.class);
> +
> +    private Kernel kernel;
> +    private Bundle bundle;
> +
> +    public AriesAppModuleBuilder(@ParamSpecial(type = SpecialAttributeType.kernel) Kernel
kernel,
> +                                 @ParamSpecial(type = SpecialAttributeType.bundle) Bundle
bundle) {
> +        this.kernel = kernel;
> +        this.bundle = bundle;
> +    }
> +
> +    public void doStart() throws Exception {
> +    }
> +
> +    public void doStop() {
> +    }
> +
> +    public void doFail() {
> +        doStop();
> +    }
> +
> +    public Module createModule(File plan, JarFile moduleFile, Naming naming, ModuleIDBuilder
idBuilder) throws DeploymentException {
> +        return createModule(plan, moduleFile, "aries-application", null, null, null,
naming, idBuilder);
> +    }
> +
> +    public Module createModule(Object plan, JarFile moduleFile, String targetPath, URL
specDDUrl, Environment environment, Object moduleContextInfo, AbstractName earName, Naming
naming, ModuleIDBuilder idBuilder) throws DeploymentException {
> +        return createModule(plan, moduleFile, targetPath, specDDUrl, environment, earName,
naming, idBuilder);
> +    }
> +
> +    private Module createModule(Object plan, JarFile moduleFile, String targetPath,
URL specDDUrl, Environment earEnvironment, AbstractName earName, Naming naming, ModuleIDBuilder
idBuilder) throws DeploymentException {
> +
> +        JarEntry appManifest = moduleFile.getJarEntry("META-INF/APPLICATION.MF");
> +
> +        if (appManifest == null) {
> +            return null;
> +        }
> +
> +        ApplicationMetadataManager service = getApplicationMetadataManager();
> +        if (service == null) {
> +            return null;
> +        }
> +
> +        ApplicationMetadata appMetadata = null;
> +        try {
> +            InputStream in = moduleFile.getInputStream(appManifest);
> +            appMetadata = service.parseApplication(in);
> +        } catch (IOException e) {
> +            throw new DeploymentException("Failed to parse application metadata", e);
> +        }
> +
> +        if (appMetadata == null) {
> +            return null;
> +        }
> +
> +        LOG.debug("Found Aries Application: {}", appMetadata.getApplicationName());
> +
> +        Environment env = new Environment();
> +        env.setConfigId(new Artifact("aries", appMetadata.getApplicationSymbolicName(),
appMetadata.getApplicationVersion().toString(), "jar"));
> +
> +        AbstractName moduleName = naming.createRootName(env.getConfigId(), NameFactory.NULL,
NameFactory.J2EE_APPLICATION);
> +
> +        AriesAppModule module = new AriesAppModule(moduleName, env, moduleFile, targetPath,
appMetadata);
> +
> +        return module;
> +    }
> +
> +    private ApplicationMetadataManager getApplicationMetadataManager() {
> +        ServiceReference ref =
> +            bundle.getBundleContext().getServiceReference(ApplicationMetadataManager.class.getName());
> +        if (ref != null) {
> +            return (ApplicationMetadataManager) bundle.getBundleContext().getService(ref);
> +        } else {
> +            return null;
> +        }
> +    }
> +
> +    public void installModule(JarFile earFile, EARContext earContext, Module module,
Collection configurationStores, ConfigurationStore targetConfigurationStore, Collection repositories)
throws DeploymentException {
> +        AriesAppModule ariesModule = (AriesAppModule) module;
> +        JarFile moduleFile = module.getModuleFile();
> +
> +        for (Content content : ariesModule.getApplicationMetadata().getApplicationContents())
{
> +            ZipEntry entry = moduleFile.getEntry(content.getContentName() + ".jar");
> +            System.out.println(entry + " " + content.getContentName());
> +            try {
> +                earContext.addInclude(URI.create(content.getContentName()), moduleFile,
entry);
> +            } catch (IOException e) {
> +                throw new DeploymentException("Unable to copy app client module jar
into configuration: " + moduleFile.getName(), e);
> +            }
> +        }
> +
> +        module.setEarContext(earContext);
> +        module.setRootEarContext(earContext);
> +    }
> +
> +    public void initContext(EARContext earContext, Module clientModule, Bundle bundle)
throws DeploymentException {
> +    }
> +
> +    public void addGBeans(EARContext earContext, Module module, Bundle earBundle, Collection
repositories) throws DeploymentException {
> +    }
> +
> +    public String getSchemaNamespace() {
> +        return null;
> +    }
> +
> +}
>
> Propchange: geronimo/server/trunk/plugins/aries/geronimo-aries-builder/src/main/java/org/apache/geronimo/aries/builder/AriesAppModuleBuilder.java
> ------------------------------------------------------------------------------
>    svn:eol-style = native
>
> Propchange: geronimo/server/trunk/plugins/aries/geronimo-aries-builder/src/main/java/org/apache/geronimo/aries/builder/AriesAppModuleBuilder.java
> ------------------------------------------------------------------------------
>    svn:keywords = Date Revision
>
> Propchange: geronimo/server/trunk/plugins/aries/geronimo-aries-builder/src/main/java/org/apache/geronimo/aries/builder/AriesAppModuleBuilder.java
> ------------------------------------------------------------------------------
>    svn:mime-type = text/plain
>
> Added: geronimo/server/trunk/plugins/aries/pom.xml
> URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/aries/pom.xml?rev=887267&view=auto
> ==============================================================================
> --- geronimo/server/trunk/plugins/aries/pom.xml (added)
> +++ geronimo/server/trunk/plugins/aries/pom.xml Fri Dec  4 16:59:20 2009
> @@ -0,0 +1,44 @@
> +<?xml version="1.0" encoding="UTF-8"?>
> +<!--
> +    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.
> +-->
> +
> +<!-- $Rev$ $Date$ -->
> +
> +<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>
> +
> +    <parent>
> +        <groupId>org.apache.geronimo.plugins</groupId>
> +        <artifactId>plugins</artifactId>
> +        <version>3.0-SNAPSHOT</version>
> +    </parent>
> +
> +    <artifactId>aries</artifactId>
> +    <name>Geronimo Plugins, Aries</name>
> +    <packaging>pom</packaging>
> +
> +    <description>
> +        Aries Application Plugin
> +    </description>
> +
> +    <modules>
> +        <module>geronimo-aries-builder</module>
> +        <module>aries-deployer</module>
> +    </modules>
> +
> +</project>
>
> Propchange: geronimo/server/trunk/plugins/aries/pom.xml
> ------------------------------------------------------------------------------
>    svn:eol-style = native
>
> Propchange: geronimo/server/trunk/plugins/aries/pom.xml
> ------------------------------------------------------------------------------
>    svn:keywords = Date Revision
>
> Propchange: geronimo/server/trunk/plugins/aries/pom.xml
> ------------------------------------------------------------------------------
>    svn:mime-type = text/xml
>
>
>

Mime
View raw message