Skip to content

Commit

Permalink
panc ant API: define task panc-version (displays compiler version)
Browse files Browse the repository at this point in the history
Fixes #73
  • Loading branch information
jouvin committed Sep 13, 2014
1 parent e11c5a3 commit dfc943d
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
43 changes: 43 additions & 0 deletions panc/src/main/java/org/quattor/ant/PanCompilerVersion.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
Copyright (c) 2006-2012 Centre National de la Recherche Scientifique (CNRS).
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 org.quattor.ant;

import java.io.File;
import java.util.LinkedList;

import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.DirectoryScanner;
import org.apache.tools.ant.Task;
import org.apache.tools.ant.types.FileSet;
import org.quattor.pan.Compiler;

/**
* An ant task which displays the pan compiler version.
*
* @author Michel Jouvin
*
*/
public class PanCompilerVersion extends Task {

@Override
public void execute() throws BuildException {

Compiler.main(null);

}

}
1 change: 1 addition & 0 deletions panc/src/main/resources/org/quattor/ant/panc-ant.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@
<taskdef name="panc" classname="org.quattor.ant.PanCompilerTask"/>
<taskdef name="panc-check-syntax" classname="org.quattor.ant.PanCheckSyntaxTask"/>
<taskdef name="panc-annotations" classname="org.quattor.ant.PanAnnotationsTask"/>
<taskdef name="panc-version" classname="org.quattor.ant.PanCompilerVersion"/>
</antlib>

0 comments on commit dfc943d

Please sign in to comment.