Skip to content

Commit

Permalink
Properly handle etc/local.properties memory settings
Browse files Browse the repository at this point in the history
Build memory values (javac.maxmem and javadoc.maxmem) were
being overwritten by the defaults (600M) set in build.py.
Now, the values passed are just defaults which are only used
if nothing is set in local.properties or on the command-line.

Default also upped to 750MB since JDK5 and ice34 builds
are failing.
  • Loading branch information
joshmoore committed Jul 2, 2012
1 parent 4fbfdd5 commit 80ca958
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def find_java():
return "java"

def calculate_memory_args():
return "-Xmx600M -Djavac.maxmem=600M -Djavadoc.maxmem=600M -XX:MaxPermSize=256m".split(" ")
return "-Xmx600M -Djavac.maxmem.default=750M -Djavadoc.maxmem.default=750M -XX:MaxPermSize=256m".split(" ")

def choose_omero_version():
"""
Expand Down
7 changes: 7 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -912,4 +912,11 @@ omero.version=${omero.version}

</target>

<target name="print-mem">
<echo>
javac.maxmem=${javac.maxmem}
javadoc.maxmem=${javadoc.maxmem}
</echo>
</target>

</project>
12 changes: 12 additions & 0 deletions components/antlib/resources/global.xml
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,18 @@ with OMERO.
</then>
</if>

<!-- Now, if the memory settings have not been changed
check the defaults passed in on the command line -->
<if><and><not><isset property="javac.maxmem"/></not>
<isset property="javac.maxmem.default"/></and>
<then><property name="javac.maxmem" value="${javac.maxmem.default}"/></then>
</if>
<if><and><not><isset property="javadoc.maxmem"/></not>
<isset property="javadoc.maxmem.default"/></and>
<then><property name="javadoc.maxmem" value="${javadoc.maxmem.default}"/></then>
</if>


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

0 comments on commit 80ca958

Please sign in to comment.