Skip to content

Commit

Permalink
Show Maven coordinates of Smack instead of download zip
Browse files Browse the repository at this point in the history
  • Loading branch information
Flowdalic authored and guusdk committed Dec 1, 2023
1 parent 4749a4a commit c37b794
Showing 1 changed file with 4 additions and 29 deletions.
33 changes: 4 additions & 29 deletions src/main/webapp/includes/download-box-smack.jspf
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,10 @@
<% String path = request.getContextPath();
String buildsPath = application.getInitParameter("builds-path");

String mavenCoordinates = "unknown";
String version = Versions.getVersion("smack");
if (version == null) {
version = "0.0";
}

DecimalFormat formatter = new DecimalFormat("0.00");
String basedir = buildsPath + "/smack";
File binZip = new File(basedir, "smack-" + version + ".zip");

String buildDate = "UNKNOWN";
if (binZip.exists()) {
SimpleDateFormat dateFormat = new SimpleDateFormat("MMMM d, yyyy");
buildDate = dateFormat.format(new Date(binZip.lastModified()));
if (version != null) {
mavenCoordinates = "org.igniterealtime.smack:smack-java8-full:" + version;
}
%>

Expand All @@ -39,23 +30,7 @@
<h2>Smack <%= version %></h2>
<p>Easy to use Java XMPP client library.</p>

<span class="ignite_download_choose">Choose your platform:</span>
<span id="smackCpBtn" class="ignite_download_btn"><a href="#" onClick="toggleDownloadPanel('smackCp'); return false;"></a></span>

<!-- BEGIN cross platform -->
<div class="ignite_download_panel" id="smackCp" style="display: none;">
<div>
<div class="ignite_download_item_odd">
<span class="ignite_download_item_details">
<img src="<%=request.getContextPath()%>/images/icon_zip.gif" alt="" width="17" height="18" border="0">
<a href="/downloadServlet?filename=smack/<%= binZip.getName() %>"><%= binZip.getName() %></a>
</span>
<span class="ignite_download_item_date"><%= buildDate %></span>
<span class="ignite_download_item_size"><%= formatter.format((double)binZip.length()/1024.0/1024.0) %> MB</span>
</div>
</div>
</div>
<!-- END cross platform -->
<span class="ignite_download_choose">Maven Coordinates: <%= mavenCoordinates %></span>

</div>
</div>
Expand Down

0 comments on commit c37b794

Please sign in to comment.