Skip to content

Commit

Permalink
Prevent use of ant directly
Browse files Browse the repository at this point in the history
With the logic for versioning added to build.py directly,
it is now somewhat confusing to mix uses of build.py and
ant. This commit permits only the use of build.py (or
specifically only runs of ant where -Dbuild.py=true).
  • Loading branch information
joshmoore committed Feb 22, 2012
1 parent ff044dc commit 0f7cc99
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def java_omero(args):
command = [ find_java() ]
p = os.path.join( os.path.curdir, "lib", "log4j-build.xml")
command.append("-Dlog4j.configuration=%s" % p)
command.append("-Dbuild.py=true")
command.extend( calculate_memory_args() )
command.extend(["omero"])
command.extend(choose_omero_version())
Expand Down
13 changes: 13 additions & 0 deletions components/antlib/resources/global.xml
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,19 @@
<taskdef resource="net/sf/antcontrib/antlib.xml"
classpath="${lib.dir}/repository/ant-contrib-1.0b3.jar"/>

<!-- prevent direct use of ant -->
<if><not><isset property="build.py"/></not>
<then>
<fail> ERROR!

========================================================
Please use ./build.py which uses the ant version bundled
with OMERO.
========================================================
</fail>
</then>
</if>

<!-- Define properties :
The user's environment (env) overrides all other
variables, then comes the user defined
Expand Down

0 comments on commit 0f7cc99

Please sign in to comment.