/*
 *  Copyright 2013
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may use this file in compliance with the Apache License, Version 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 net.sf.plugfy.verifier;

import java.io.File;
import java.io.IOException;
import java.net.URL;

import net.sf.plugfy.verifier.container.JarVerifier;
import net.sf.plugfy.verifier.violations.JavaViolation;

/**
 * verifies the dependencies
 *
 * @author hendrik
 */
public class Main {

    /**
     * entry point
     *
     * @param args jar file
     * @throws IOException in case of an input/output error
     */
    public static void main(final String[] args) throws IOException {

        final long start = System.currentTimeMillis();

        if (args.length != 1) {
            System.err.println("Please provide the name of the .jar file to analyse as parameter.");
            System.exit(1);
        }

        final File file = new File(args[0]);
        if (file.isDirectory()) {
            // TODO
        } else {
            final URL url = file.toURI().toURL();
            final VerificationContext context = new VerificationContext(null, Main.class.getClassLoader(), url);
            new JarVerifier().verify(url, context);
            System.out.println("---------------------------------");
            for (final JavaViolation entry : context.getResult()) {
                System.out.println(entry);
            }
        }

        System.out.println("Duration: " + (System.currentTimeMillis() - start));
    }

}
@@ -657,64 +657,8 @@
 ier;
-%0Aimport net.sf.plugfy.verifier.violations.JavaViolation;
 %0A%0A/*
@@ -1580,66 +1580,48 @@
     
-for (final JavaViolation entry : context.getResult()) %7B%0A  
+System.out.println(context.toString());%0A
     
@@ -1620,34 +1620,32 @@
 ));%0A            
-  
 System.out.print
@@ -1647,21 +1647,51 @@
 println(
-entry
+%22---------------------------------%22
 );%0A     
@@ -1697,24 +1697,9 @@
     
- 
-   %7D%0A        %7D%0A
+%7D
 %0A   

use context toString