summaryrefslogtreecommitdiffstats
path: root/sandbox/lresende/sca/modules/contribution-installer/src
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2010-01-13 01:38:27 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2010-01-13 01:38:27 +0000
commit0d7f33c760f570722bf6b13f0765f5d2772a7897 (patch)
treedde14404429a3084bf9c9eb4ed900c6871803eb9 /sandbox/lresende/sca/modules/contribution-installer/src
parentec9bef59e094d0401dd54738f9b1bcf0463a45f8 (diff)
Cleaning up sandbox
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@898600 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sandbox/lresende/sca/modules/contribution-installer/src')
-rw-r--r--sandbox/lresende/sca/modules/contribution-installer/src/main/java/org/apache/tuscany/contribution/installer/Main.java95
-rw-r--r--sandbox/lresende/sca/modules/contribution-installer/src/main/resources/org/apache/tuscany/services/contribution/installer/Main.properties23
2 files changed, 0 insertions, 118 deletions
diff --git a/sandbox/lresende/sca/modules/contribution-installer/src/main/java/org/apache/tuscany/contribution/installer/Main.java b/sandbox/lresende/sca/modules/contribution-installer/src/main/java/org/apache/tuscany/contribution/installer/Main.java
deleted file mode 100644
index dc1b1d7587..0000000000
--- a/sandbox/lresende/sca/modules/contribution-installer/src/main/java/org/apache/tuscany/contribution/installer/Main.java
+++ /dev/null
@@ -1,95 +0,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.
- */
-package org.apache.tuscany.contribution.installer;
-
-import java.io.File;
-import java.io.InputStream;
-import java.net.URL;
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-
-import org.apache.tuscany.assembly.DefaultAssemblyFactory;
-import org.apache.tuscany.contribution.impl.ContributionFactoryImpl;
-import org.apache.tuscany.contribution.service.ContributionRepository;
-import org.apache.tuscany.contribution.service.ContributionService;
-import org.apache.tuscany.contribution.service.impl.ContributionRepositoryImpl;
-import org.apache.tuscany.contribution.service.impl.ContributionServiceImpl;
-import org.apache.tuscany.contribution.service.util.IOHelper;
-
-/**
- * Main class for Contribution Services installer. <code>
- * usage: java [jvm-options] -jar installer.jar <contributionURI> <contribution source>
- * </code>
- * where the componentURI identifies the URI that identifies the new contribution and
- * contribution source is the actual archive with the contribution contents
- *
- * @version $Rev: 513906 $ $Date: 2007-03-02 11:38:00 -0800 (Fri, 02 Mar 2007) $
- */
-public class Main {
-
- /**
- * Main method.
- *
- * @param args the command line args
- * @throws Throwable if there are problems launching the runtime or
- * application
- */
- public static void main(String[] args) throws Throwable {
-
- if (args.length < 2) {
- usage();
- throw new AssertionError();
- }
-
- String contributionURI = args[0];
-
- File contributionSource = new File(args[1]);
- if (!contributionSource.exists()) {
- System.err.println(getMessage("org.apache.tuscany.services.contribution.installer.Invalid_Contribution", contributionSource));
- System.exit(2);
- }
-
- //start the process of installing the contribution
- ContributionRepository contributionRepository = new ContributionRepositoryImpl(null);
- ContributionService contributionService =
- new ContributionServiceImpl(contributionRepository, null, null, new DefaultAssemblyFactory(), new ContributionFactoryImpl(), null);
-
- URL contributionURL = contributionSource.toURL();
- InputStream contributionStream = null;
- try {
- contributionStream = contributionURL.openStream();
- contributionService.contribute(contributionURI, contributionURL, contributionStream);
- } finally {
- IOHelper.closeQuietly(contributionStream);
- }
-
- System.exit(0);
- }
-
- private static void usage() {
- System.err.println(getMessage("org.apache.tuscany.services.contribution.installer.Usage"));
- System.exit(1);
- }
-
- private static String getMessage(String id, Object... params) {
- ResourceBundle bundle = ResourceBundle.getBundle(Main.class.getName());
- String message = bundle.getString(id);
- return MessageFormat.format(message, params);
- }
-}
diff --git a/sandbox/lresende/sca/modules/contribution-installer/src/main/resources/org/apache/tuscany/services/contribution/installer/Main.properties b/sandbox/lresende/sca/modules/contribution-installer/src/main/resources/org/apache/tuscany/services/contribution/installer/Main.properties
deleted file mode 100644
index 6db064529c..0000000000
--- a/sandbox/lresende/sca/modules/contribution-installer/src/main/resources/org/apache/tuscany/services/contribution/installer/Main.properties
+++ /dev/null
@@ -1,23 +0,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.
-#
-# $Rev: 513906 $ $Date: 2007-03-02 11:38:00 -0800 (Fri, 02 Mar 2007) $
-#
-org.apache.tuscany.services.contribution.installer.Usage=usage: java [jvm-options] -jar installer.jar <contributionURI> <contribution source>
-org.apache.tuscany.services.contribution.installer.Invalid_Contribution=No contribution source found "{0}"
-org.apache.tuscany.services.contribution.installer.NoComposite=No composite archive found: {0}
-org.apache.tuscany.services.contribution.installer.NoApplicationSCDL=No application SCDL found: {0}