[
http://jira.dspace.org/jira/browse/DS-377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=10805#action_10805
]
Mark Wood commented on DS-377:
------------------------------
I agree that this should NOT be stored in dspace.cfg -- it is not configuration
data and shouldn't be offered for modification by the sysadmin.
I note that Maven is already producing a Properties file with the version in
it, which you can see thus:
import java.io.InputStream;
import java.io.IOException;
import java.util.Properties;
class VersionTest
{
public static void main(String[] argv)
throws java.io.IOException
{
InputStream cis = VersionTest.class.getResourceAsStream
("/META-INF/maven/org.dspace/dspace-api/pom.properties");
Properties constants = new Properties();
constants.load(cis);
System.out.println("version " + constants.get("version"));
}
}
However that only helps us with a handful of Maven properties, and we might
want other things later on. We might be better off adding a
dspace-api/src/main/resources/constants.properties to be filtered and wrapped
into dspace-api-VERSION.jar.
Also I recommend that the value be a pure version number. It's easier to
supply the literal "DSpace" where we want it than to parse the version out of a
more complex string where we want only the version. That is, it should be the
value of ${project.version}.
> Add META tags identifying DSpace source version to Web UIs
> ----------------------------------------------------------
>
> Key: DS-377
> URL: http://jira.dspace.org/jira/browse/DS-377
> Project: DSpace 1.x
> Issue Type: New Feature
> Components: DSpace API, JSPUI, XMLUI
> Affects Versions: 1.6.0
> Reporter: Larry Stone
> Assignee: Larry Stone
> Priority: Minor
> Fix For: 1.6.0
>
> Attachments: version-meta.patch.txt
>
>
> Add a META tag to the HTML generated for each web-UI page that identfies the
> version of the DSpace source running on the site. This lets administrators
> and developers tell at a glance what their test servers are running, and
> curious visitors see what version of DSpace is behind a production site.
> The change is very simple and automated in action. Maven is already doing
> property-substitution on the dspace.cfg file, so let it plug in the verison
> of the "dspace" project (under group "org.dspace"), which should always be
> the same as the released or snapshot project for the source tree. From there
> it's a simple matter of putting it in a pageMeta element for the XMLUI.
> NOTE: This still needs a volunteer to either implement it for JSPUI or point
> out the most efficient way to do -- I'll be happy to code and test but I
> don't know the JSPUI well enough to spot the most effective place to put a
> META tag that goes on every page.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.dspace.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel