/*
 * Copyright (c) 2008-2017 The Aspectran Project
 *
 * 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.
 */
package com.aspectran.core.util;

public class Aspectran {

    public static final String VERSION;

    public static final String POWERED_BY;

    public static final String POWERED_BY_LINK;

    public static final boolean STABLE;

    static {
        Package pkg = Aspectran.class.getPackage();
        if (pkg != null && "The Aspectran Project".equals(pkg.getImplementationVendor()) &&
                pkg.getImplementationVersion() != null) {
            VERSION = pkg.getImplementationVersion();
        } else {
            VERSION = System.getProperty("aspectran.version", "5.1.0-SNAPSHOT");
        }

        POWERED_BY = "Powered by Aspectran " + VERSION;
        POWERED_BY_LINK = "<a href=\"http://www.aspectran.com\">Powered by Aspectran " + VERSION + "</a>";

        // Show warning when RC# or M# is in version string
        STABLE = !VERSION.matches("^.*\\.(RC|M)[0-9]+$");
    }

    /**
     * No public constructor to prevent instances from being created.
     */
    private Aspectran() {
    }

    public static String getVersion() {
        return VERSION;
    }

    /**
     * Prints Aspectran information to {@link System#err}.
     *
     * @param args a string array containing the command line arguments
     */
    public static void main(String[] args) {
        System.err.println(VERSION);
        System.err.println(POWERED_BY);
        System.err.println(POWERED_BY_LINK);
        System.err.println(STABLE);
    }

}

@@ -1760,19 +1760,19 @@
  System#
-err
+out
 %7D.%0A     
@@ -1905,35 +1905,35 @@
 %0A        System.
-err
+out
 .println(VERSION
@@ -1925,16 +1925,40 @@
 println(
+%22Aspectran version: %22 + 
 VERSION)
@@ -1978,75 +1978,338 @@
 tem.
-err.println(POWERED_BY);%0A        System.err.println(POWERED_BY_LINK
+out.println(%22OS Name:           %22 + System.getProperty(%22os.name%22));%0A        System.out.println(%22OS Version:        %22 + System.getProperty(%22os.version%22));%0A        System.out.println(%22Architecture:      %22 + System.getProperty(%22os.arch%22));%0A        System.out.println(%22JVM Version:       %22 + System.getProperty(%22java.runtime.version%22)
 );%0A 
@@ -2326,11 +2326,11 @@
 tem.
-err
+out
 .pri
@@ -2334,22 +2334,76 @@
 println(
-STABLE
+%22JVM Vendor:        %22 + System.getProperty(%22java.vm.vendor%22)
 );%0A    %7D

Update main method that print Aspectran information