1/*******************************************************************************
2 * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 *    Marc R. Hoffmann - initial API and implementation
10 *
11 *******************************************************************************/
12package org.jacoco.cli.internal.commands;
13
14import java.io.IOException;
15import java.io.PrintWriter;
16
17import org.jacoco.cli.internal.Command;
18import org.jacoco.core.JaCoCo;
19
20/**
21 * The <code>version</code> command.
22 */
23public class Version extends Command {
24
25	@Override
26	public String description() {
27		return "Print JaCoCo version information.";
28	}
29
30	@Override
31	public int execute(final PrintWriter out, final PrintWriter err)
32			throws IOException {
33		out.println(JaCoCo.VERSION);
34		return 0;
35	}
36
37}
38