<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: How to get a project's ivy version?</title><link>https://answers.axonivy.com/questions/1186/how-to-get-a-project-s-ivy-version</link><description>&lt;p&gt;I would like to compare a project's ivy version to ivy engine's version. Are there any API-s which support it?&lt;br&gt;&lt;br&gt;
Thank you&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/1186/how-to-get-a-project-s-ivy-version" rel="self"></atom:link><language>en</language><lastBuildDate>Thu, 05 Mar 2015 11:39:24 -0500</lastBuildDate><item><title>Comment by Tamas KIS on Tamas KIS's answer</title><link>https://answers.axonivy.com/questions/1186/how-to-get-a-project-s-ivy-version#1204</link><description>&lt;p&gt;this discussion goes quite technical. &lt;/p&gt;
&lt;p&gt;The Engine has to accept older projects and projects from the same version, but not newer than itself. The rest of validators will say if the project is too old (incompatible).&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tamas KIS</dc:creator><pubDate>Thu, 05 Mar 2015 11:39:24 -0500</pubDate><guid>https://answers.axonivy.com/questions/1186/how-to-get-a-project-s-ivy-version#1204</guid></item><item><title>Comment by dolong on Tamas KIS's answer</title><link>https://answers.axonivy.com/questions/1186/how-to-get-a-project-s-ivy-version#1201</link><description>&lt;p&gt;The project must have the same version as my Engine. My Engine is latest trunk (5.2 or 6.0) but the project version is "51" (up to date, should be "52" or "60"). In this case, if I compare the version between Engine 5.1 and the project for Engine trunk, they are same versions (51), actually the project should be newer than Engine 5.1.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">dolong</dc:creator><pubDate>Thu, 05 Mar 2015 05:15:52 -0500</pubDate><guid>https://answers.axonivy.com/questions/1186/how-to-get-a-project-s-ivy-version#1201</guid></item><item><title>Answer by Tamas KIS</title><link>https://answers.axonivy.com/questions/1186/how-to-get-a-project-s-ivy-version/1199</link><description>&lt;p&gt;The answer of HaraldWeber is basically good. The version of the current trunk is wrong yet, it will set just before the release. It's to be decided which will be the final version number (5.2 or 6.0)&lt;/p&gt;
&lt;p&gt;&lt;code&gt;tip: you may navigate from iProject to ivyProject also: 
ivyProject= (IIvyProject) pmv.getProject().getAdapter(IIvyProject.class);
&lt;/code&gt;
&lt;code&gt;versionNumber = ivyProject.getVersion()&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;So the 2 first digits of the Engine (e.g. "6.0" -&amp;gt; "60" ) should be greater or equal to the first 2 digits of the project version number. (e.g. 51902 -&amp;gt; "51") then your Engine is not older than the project.&lt;/p&gt;
&lt;p&gt;In fact the engine contains some other validators which help to prove if a project is acceptable to be deployed or not. (e.g. Java classes are built)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tamas KIS</dc:creator><pubDate>Wed, 04 Mar 2015 16:53:49 -0500</pubDate><guid>https://answers.axonivy.com/questions/1186/how-to-get-a-project-s-ivy-version/1199</guid></item><item><title>Comment by dolong on HaraldWeber's answer</title><link>https://answers.axonivy.com/questions/1186/how-to-get-a-project-s-ivy-version#1190</link><description>&lt;p&gt;Yes, it works and it returns "51902", but I'm using ivy engine 6.0.0 (I used Advisor.getAdvisor().getVersion() to get ivy engine's version). Project's version and engine's version are different, I need to compare their major version and they should be same. Do you have any other suggestions?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">dolong</dc:creator><pubDate>Tue, 03 Mar 2015 05:08:25 -0500</pubDate><guid>https://answers.axonivy.com/questions/1186/how-to-get-a-project-s-ivy-version#1190</guid></item><item><title>Answer by HaraldWeber</title><link>https://answers.axonivy.com/questions/1186/how-to-get-a-project-s-ivy-version/1188</link><description>&lt;p&gt;This should do it.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;IProject project = WorkflowNavigationUtil
  .getWorkflowProcessModelVersion(
    Ivy.request().getProcessModelVersion())
      .getProject();
IIvyProject ivyProject = IvyProjectUtil
  .getIvyProjectByName(project.getName());
Ivy.log().info(ivyProject.getVersion());
&lt;/code&gt;&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">HaraldWeber</dc:creator><pubDate>Mon, 02 Mar 2015 17:46:02 -0500</pubDate><guid>https://answers.axonivy.com/questions/1186/how-to-get-a-project-s-ivy-version/1188</guid></item></channel></rss>