Package org.apache.tools.ant

Examples of org.apache.tools.ant.Project.executeTarget()


            if ( getLog().isInfoEnabled() )
            {
                getLog().info( "Executing tasks" );
            }

            antProject.executeTarget( antTargetName );

            if ( getLog().isInfoEnabled() )
            {
                getLog().info( "Executed tasks" );
            }
View Full Code Here


        Project project = new Project();
        project.init();
        project.setUserProperty("ant.file", buildFile.getAbsolutePath());
        ProjectHelper.configureProject(project, buildFile);
        project.executeTarget(target);
    }

    /**
     * Serialize and deserialize the object.
     *
 
View Full Code Here

        //output the classes into the output dir as well
        javaCompiler.setDestdir(outputLocationFile);
        javaCompiler.setVerbose(true);
        try {
            codeGenProject.executeTarget(COMPILE_TARGET_NAME);
        } catch (BuildException e) {
            fail();
        }

    }
View Full Code Here

  public void testBuildHelloWorld() throws Exception {
    String projectDir = "tests/wo/applications/HelloWorld";
    Project aProject = getProject(new File(projectDir), new File(projectDir, "build.xml"));
    String defaultTarget = aProject.getDefaultTarget();
    aProject.executeTarget(defaultTarget);

    ApplicationStructure app = new ApplicationStructure("HelloWorld");
    app.setWocomps(new String[] { "Main" });
    app.setWsResources(new String[] { "hello.gif" });
    assertStructure(app);
View Full Code Here

  public void testBuildMailJava() throws Exception {
    String projectDir = "tests/wo/frameworks/MailJava";
    Project aProject = getProject(new File(projectDir), new File(projectDir, "build.xml"));
    String defaultTarget = aProject.getDefaultTarget();
    aProject.executeTarget(defaultTarget);

    FrameworkStructure fw = new FrameworkStructure("MailJava");
    fw.setJars(new String[] { "activation", "mail" });

    assertStructure(fw);
View Full Code Here

  public void testBuildMailUtilities() throws Exception {
    String projectDir = "tests/wo/frameworks/MailUtilities";
    Project aProject = getProject(new File(projectDir), new File(projectDir, "build.xml"));
    String defaultTarget = aProject.getDefaultTarget();
    aProject.executeTarget(defaultTarget);

    FrameworkStructure fw = new FrameworkStructure("MailUtilities");
    fw.setJars(new String[] { "mailutilities" });

    assertStructure(fw);
View Full Code Here

        }
        AbstractCloverMojo.registerCloverAntTasks(antProject, getLog());
        ProjectHelper.configureProject(antProject, reportDescriptor);
        antProject.setBaseDir(project.getBasedir());
        String target = isHistoricalDirectoryValid(output) && (historyOut != null) ? "historical" : "current";
        antProject.executeTarget(target);
    }

    private void addMavenProperties(Project antProject) {
        final Map properties = getProject().getProperties();
View Full Code Here

        }
        AbstractCloverMojo.registerCloverAntTasks(antProject, getLog());
        ProjectHelper.configureProject(antProject, reportDescriptor);
        antProject.setBaseDir(project.getBasedir());
        String target = isHistoricalDirectoryValid(output) && (historyOut != null) ? "historical" : "current";
        antProject.executeTarget(target);
    }

    private void addMavenProperties(final Project antProject) {
        final Map properties = getProject().getProperties();
View Full Code Here

      populateJUnitElement(createDocumentSkeleton(doc));
      File tempAntFile = createTemporaryAntFile(doc);

      ProjectHelper.configureProject(antProject, tempAntFile);
      try {
        antProject.executeTarget(DEFAULT_TARGET);
      } finally {
        if (!leaveTemporary) {
          tempAntFile.delete();
        }
      }
View Full Code Here

        }
       
        // Execute task
        Message.verbose("performing packager resolver build in " + this.dir);
        try {
            project.executeTarget("build");
            this.built = true;
        } catch (BuildException e) {
            e.printStackTrace(System.out);
            Message.verbose("packager resolver build failed: " + e);
            throw e;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.