Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show Maven coordinates of Smack instead of download zip #237

Merged
merged 1 commit into from
Dec 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading