gitweb on Svarog
projekti pod git sistemom za održavanje verzija -- projects under
the git version control system
1 package com
.quemaster
.ant
.m2
;
3 import org
.apache
.tools
.ant
.BuildException
;
4 import org
.apache
.tools
.ant
.Task
;
5 import org
.apache
.tools
.ant
.taskdefs
.condition
.Os
;
6 import java
.util
.ArrayList
;
10 public class m2compile
extends Task
{
11 private String module
="program";
12 private File dir
=null;
16 // needs to check wheter the compilation is needed
17 // based on the timestamps of the exe and mod
19 // The method executing the task
20 public void execute() throws BuildException
{
22 ArrayList
<String
> list
= new ArrayList
<String
>();
23 if (!Os
.isFamily(Os
.FAMILY_WINDOWS
))
30 ProcessBuilder pb
= new ProcessBuilder(list
);
34 Process p
= pb
.start();
38 }catch (Exception ex
) {
39 throw new BuildException(ex
);
42 throw new BuildException("compilation ended with code "+exit
);
45 public void setModule(String msg
) {
49 public void setDir(File msg
) {
53 public static void main(String
[] args
){
54 m2compile m
= new m2compile();
Svarog.pmf.uns.ac.rs/gitweb
maintanance
Doni Pracner