UNPKG

@plexus-interop/cli

Version:

Plexus Interop CLI tools

45 lines 2.78 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); /** * Copyright 2017-2018 Plexus Interop Deutsche Bank AG * SPDX-License-Identifier: Apache-2.0 * * Licensed 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. */ var BaseCommand_1 = require("./BaseCommand"); var java_1 = require("../common/java"); var process_1 = require("../common/process"); var BaseJavaGenCommand = /** @class */ (function (_super) { tslib_1.__extends(BaseJavaGenCommand, _super); function BaseJavaGenCommand() { return _super !== null && _super.apply(this, arguments) || this; } BaseJavaGenCommand.prototype.action = function (opts) { return tslib_1.__awaiter(this, void 0, void 0, function () { var javaExecPath, javaLibPath; return tslib_1.__generator(this, function (_a) { switch (_a.label) { case 0: return [4 /*yield*/, java_1.getJavaExecPath()]; case 1: javaExecPath = _a.sent(); javaLibPath = java_1.getJavaGenLibPath(); return [2 /*return*/, process_1.simpleSpawn(javaExecPath, ['-jar', javaLibPath].concat(this.plexusGenArgs(opts)), this.isVerbose(opts))]; } }); }); }; return BaseJavaGenCommand; }(BaseCommand_1.BaseCommand)); exports.BaseJavaGenCommand = BaseJavaGenCommand; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQmFzZUphdmFHZW5Db21tYW5kLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2NvbW1hbmRzL0Jhc2VKYXZhR2VuQ29tbWFuZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQTs7Ozs7Ozs7Ozs7Ozs7O0dBZUc7QUFDSCw2Q0FBNEM7QUFDNUMsdUNBQW9FO0FBQ3BFLDZDQUFnRDtBQUVoRDtJQUFpRCw4Q0FBVztJQUE1RDs7SUFVQSxDQUFDO0lBTmdCLG1DQUFNLEdBQW5CLFVBQW9CLElBQVM7Ozs7OzRCQUNKLHFCQUFNLHNCQUFlLEVBQUUsRUFBQTs7d0JBQXRDLFlBQVksR0FBRyxTQUF1Qjt3QkFDdEMsV0FBVyxHQUFHLHdCQUFpQixFQUFFLENBQUM7d0JBQ3hDLHNCQUFPLHFCQUFXLENBQUMsWUFBWSxHQUFHLE1BQU0sRUFBRSxXQUFXLFNBQUssSUFBSSxDQUFDLGFBQWEsQ0FBQyxJQUFJLENBQUMsR0FBRyxJQUFJLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyxDQUFDLEVBQUM7Ozs7S0FDOUc7SUFFTCx5QkFBQztBQUFELENBQUMsQUFWRCxDQUFpRCx5QkFBVyxHQVUzRDtBQVZxQixnREFBa0IifQ==