You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by "Donal Lafferty (JIRA)" <ji...@apache.org> on 2012/11/08 23:28:13 UTC

[jira] [Created] (CLOUDSTACK-463) mvn does not inject agent version into .JAR files.

Donal Lafferty created CLOUDSTACK-463:
-----------------------------------------

             Summary: mvn does not inject agent version into .JAR files.
                 Key: CLOUDSTACK-463
                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-463
             Project: CloudStack
          Issue Type: Bug
          Components: Projects
    Affects Versions: 4.0.0
            Reporter: Donal Lafferty


mvn-based execution of the AgentShell requires breaking the code's version checking.  It should be possible to avoid this.

E.g.

diff --git a/agent/src/com/cloud/agent/AgentShell.java b/agent/src/com/cloud/agent/AgentShell.java
index 05caf8e..73d3e2b 100644
--- a/agent/src/com/cloud/agent/AgentShell.java
+++ b/agent/src/com/cloud/agent/AgentShell.java
@@ -377,11 +377,12 @@ public class AgentShell implements IAgentShell {
         final ComponentLocator locator = ComponentLocator.getLocator("agent");

         final Class<?> c = this.getClass();
-        _version = c.getPackage().getImplementationVersion();
+        _version = "4.1.0";
+        /*_version = c.getPackage().getImplementationVersion();
         if (_version == null) {
             throw new CloudRuntimeException(
                     "Unable to find the implementation version of this agent");
-        }
+        }*/
         s_logger.info("Implementation Version is " + _version);

         loadProperties();


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira