[Contrib: Evaluation System] EVALSYS APP VERSION in admin page footer
Jim Eng
jimeng at umich.edu
Thu Jun 2 12:44:20 PDT 2011
I take that back. Better to add it to a properties file in the output directory and read it from there. Sorry for the spam.
Jim
On Jun 2, 2011, at 3:36 PM, Jim Eng wrote:
> BTW, if this is actually using apache ant, maybe you could use the ant "replace" task (http://ant.apache.org/manual/Tasks/replace.html) to replace the value of EvalConstants.APP_VERSION right in EvalConstants.java ??
>
>
> On Jun 2, 2011, at 3:17 PM, Jim Eng wrote:
>
>> Cool. Thanks, David.
>>
>> Adam, Rick, Nicola: This seems like a good way to accomplish what you want to do. Basically we would need to add a similar task to one of the pom.xml files to write the version to a file, and then add code somewhere to retrieve that value and make it available. Then we'd just need to change line 98 of AdministrateProduce.java to use that value instead of EvalConstants.APP_VERSION. Anybody have time to do that?
>>
>> Jim
>>
>>
>> On Jun 2, 2011, at 2:55 PM, David Horwitz wrote:
>>
>>> Because the file is in the output directory (i.e. target) it is deleted by the clean. In kernel this file only ever has 2 lines
>>>
>>> D
>>>
>>> On 06/02/2011 08:01 PM, Jim Eng wrote:
>>>>
>>>> Thanks, David. That looks good.
>>>>
>>>> It looks like this task would add a new line to that file each time the source is compiled. Is that correct? If so, does it present any problem?
>>>>
>>>> In GB2, people accidentally check in the revised VERSIONS.txt file from time to time. I think that's more of an annoyance to the core developers, rather than a problem. I'm wondering if there's a problem checking with people checking in revisions to version.properties?
>>>>
>>>> Jim
>>>>
>>>>
>>>>
>>>>
>>>> On Jun 2, 2011, at 1:42 PM, David Horwitz wrote:
>>>>
>>>>> This is the entry in the kernel component-manager pom that writes the kernel version:
>>>>>
>>>>>
>>>>> <plugin>
>>>>> <groupId>org.apache.maven.plugins</groupId>
>>>>> <artifactId>maven-antrun-plugin</artifactId>
>>>>> <version>1.2</version>
>>>>> <executions>
>>>>> <execution>
>>>>> <phase>compile</phase>
>>>>> <configuration>
>>>>> <tasks>
>>>>> <echo message="version.kernel=${project.version}${line.separator}" file="${project.build.outputDirectory}/org/sakaiproject/config/version.properties" />
>>>>> <tstamp>
>>>>> <format property="timestamp" pattern="dd/MM/yyyy HH:mm:ss Z" />
>>>>> </tstamp>
>>>>> <echo message="buildTime.kernel=${timestamp}" file="${project.build.outputDirectory}/org/sakaiproject/config/version.properties" append="true" />
>>>>> </tasks>
>>>>>
>>>>> </configuration>
>>>>> <goals>
>>>>> <goal>run</goal>
>>>>> </goals>
>>>>> </execution>
>>>>> </executions>
>>>>> </plugin>
>>>>>
>>>>> On 06/02/2011 07:30 PM, Matthew Jones wrote:
>>>>>>
>>>>>> They *used* to use a shell script added in (https://jira.sakaiproject.org/browse/GRBK-394)
>>>>>>
>>>>>> Now they're just using a static file "VERSION.txt" (https://jira.sakaiproject.org/browse/GRBK-710)
>>>>>>
>>>>>> Though I'd supported the ant task that took care of the shell script and the versioning (https://jira.sakaiproject.org/browse/GRBK-521)
>>>>>>
>>>>>> This has to be set somehow while maven is running though, because this information is lost afterward. It would be nice to do it automatically though.
>>>>>>
>>>>>> On Thu, Jun 2, 2011 at 1:14 PM, Jim Eng <jimeng at umich.edu> wrote:
>>>>>> GB2 uses an ant-task in their build process to move a file containing the version info into a place where it can be accessed by the class loader.
>>>>>>
>>>>>> Jim
>>>>>>
>>>>>>
>>>>>> On Jun 2, 2011, at 12:57 PM, Jim Eng wrote:
>>>>>>
>>>>>>> Three items are shown in the footer: EvalConstants.APP_VERSION, EvalConstants.SVN_REVISION and EvalConstants.SVN_LAST_UPDATE.
>>>>>>>
>>>>>>> The values of EvalConstants.SVN_REVISION and EvalConstants.SVN_LAST_UPDATE come from the svn metadata. The value of EvalConstants.APP_VERSION is hard-coded. We could change EvalConstants.APP_VERSION to show the svn URL, which includes the "version number" if it's a tag or branch, and the word "trunk" if it's trunk. Or the value could be set dynamically by parsing it out of that URL. I will look to see if there's some other way of getting the app version from some reliable source.
>>>>>>>
>>>>>>> Jim
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> evaluation mailing list
>>>>>>> evaluation at collab.sakaiproject.org
>>>>>>> http://collab.sakaiproject.org/mailman/listinfo/evaluation
>>>>>>>
>>>>>>> TO UNSUBSCRIBE: send email to evaluation-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> evaluation mailing list
>>>>>> evaluation at collab.sakaiproject.org
>>>>>> http://collab.sakaiproject.org/mailman/listinfo/evaluation
>>>>>>
>>>>>> TO UNSUBSCRIBE: send email to evaluation-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> evaluation mailing list
>>>>>> evaluation at collab.sakaiproject.org
>>>>>> http://collab.sakaiproject.org/mailman/listinfo/evaluation
>>>>>>
>>>>>> TO UNSUBSCRIBE: send email to evaluation-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
>>>>> _______________________________________________
>>>>> evaluation mailing list
>>>>> evaluation at collab.sakaiproject.org
>>>>> http://collab.sakaiproject.org/mailman/listinfo/evaluation
>>>>>
>>>>> TO UNSUBSCRIBE: send email to evaluation-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
>>>>
>>
>> _______________________________________________
>> evaluation mailing list
>> evaluation at collab.sakaiproject.org
>> http://collab.sakaiproject.org/mailman/listinfo/evaluation
>>
>> TO UNSUBSCRIBE: send email to evaluation-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/evaluation/attachments/20110602/5bb7916f/attachment.html
More information about the evaluation
mailing list