Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.overture.tools.maven.examplepackager;
  
  import java.io.File;
  import java.util.List;
  import java.util.Vector;
  
Example Packager
 
 @Mojo(name="package-examples",
       defaultPhase=.)
 public class ExamplePackagerMojo extends AbstractMojo {

  
A boolean indicating whether example zips should be generated
 
     @Parameter(alias="output-zip")
     protected boolean outputZipFiles = true;
    

  
A boolean indicating whether web pages should be generated
 
   @Parameter(alias="output-web")
   protected boolean outputWebFiles = false;
    

    
A list of directories containing subdirectories with example VDM-SL projects. Note that the name of the output bundle will be derived from the name of the base directory.
 
     @Parameter(alias="slExamples")
     protected List<FileexampleSLBaseDirectories;
 
    
A list of directories containing subdirectories with example VDM-PP projects. Note that the name of the output bundle will be derived from the name of the base directory.
 
     @Parameter(alias="ppExamples")
     protected List<FileexamplePPBaseDirectories;
 
    
A list of directories containing subdirectories with example VDM-RT projects. Note that the name of the output bundle will be derived from the name of the base directory.
 
     @Parameter(alias="rtExamples")
     protected List<FileexampleRTBaseDirectories;
 
    
A prefix to the output zip filename.
 
     @Parameter(defaultValue="Examples-")
     protected String outputPrefix;
    
    
Name of the directory into which the packaged examples will be placed. Readonly at the moment as the only place they should be dropped is in the project's usual target directory.
 
     @Parameter(defaultValue="${project.build.directory}")
     protected File outputDirectory;

    
Location of the staging directory for the example packager.
 
     @Parameter(defaultValue="${project.build.directory}/generated-resources/example-packager", readonly=true)
     protected File tmpdir;
 
 
 	private boolean overtureCSSWebtrue;
 
 
     @Override
     public void execute() throws MojoExecutionExceptionMojoFailureException {
         File zipFile;
         Controller controller;
         
         List<Controllercontrollers = new Vector<Controller>();
         List<FilezipFiles = new Vector<File>();
 		
    	for (File exampleDir : ) {
            zipFile = new File( + exampleDir.getName() + ".zip");
            zipFiles.add(zipFile);
            controller = new Controller(.exampleDirfalse);
            controllers.add(controller);
            controller.packExamples(new File(exampleDir.getName()), zipFile, !);
            
            if()
            {
            	controller.createWebSite();
            }
    	}
    	for (File exampleDir : ) {
            zipFile = new File( + exampleDir.getName() + ".zip");
            zipFiles.add(zipFile);
            controller = new Controller(.exampleDirfalse);
            controllers.add(controller);
            controller.packExamples(new File(exampleDir.getName()), zipFile, !);
            
            if()
            {
            	controller.createWebSite();
            }
    	}
    	for (File exampleDir : ) {
            zipFile = new File( + exampleDir.getName() + ".zip");
            zipFiles.add(zipFile);
            controller = new Controller(.exampleDirfalse);
            controllers.add(controller);
            controller.packExamples(new File(exampleDir.getName()), zipFile, !);
            
            if()
            {
            	controller.createWebSite();
            }
    	}
    	
    	
    	if( && !controllers.isEmpty())
    	{
    		controllers.iterator().next().createWebOverviewPage(controllerszipFiles,);
    	}
    }
New to GrepCode? Check out our FAQ X