You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apex.apache.org by tweise <gi...@git.apache.org> on 2016/03/10 00:47:52 UTC

[GitHub] incubator-apex-core pull request: Make the version retrieval reusa...

GitHub user tweise opened a pull request:

    https://github.com/apache/incubator-apex-core/pull/266

    Make the version retrieval reusable.

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tweise/incubator-apex-core master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-apex-core/pull/266.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #266
    
----
commit e2fcf46520a49d18c5b696a83b119c6c194c975b
Author: Thomas Weise <th...@datatorrent.com>
Date:   2016-03-09T23:43:09Z

    Make the version retrieval reusable.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-apex-core pull request: Make the version retrieval reusa...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-apex-core/pull/266


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-apex-core pull request: Make the version retrieval reusa...

Posted by tweise <gi...@git.apache.org>.
Github user tweise commented on the pull request:

    https://github.com/apache/incubator-apex-core/pull/266#issuecomment-194581862
  
    @davidyan74 Fixed it, please check again when build is complete.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-apex-core pull request: Make the version retrieval reusa...

Posted by davidyan74 <gi...@git.apache.org>.
Github user davidyan74 commented on a diff in the pull request:

    https://github.com/apache/incubator-apex-core/pull/266#discussion_r55612060
  
    --- Diff: engine/src/main/java/com/datatorrent/stram/util/VersionInfo.java ---
    @@ -53,16 +54,16 @@
             Attributes mainAttribs = mf.getMainAttributes();
             String builtBy = mainAttribs.getValue("Built-By");
             if(builtBy != null) {
    -          VersionInfo.user = builtBy;
    +          this.user = builtBy;
             }
           }
     
    -      Enumeration<URL> resources = VersionInfo.class.getClassLoader().getResources("META-INF/maven/org.apache.apex/apex-engine/pom.properties");
    +      Enumeration<URL> resources = VersionInfo.class.getClassLoader().getResources("META-INF/maven/" + groupId + "/" + artifactId + "/pom.properties");
           while (resources.hasMoreElements()) {
             Properties pomInfo = new Properties();
             pomInfo.load(resources.nextElement().openStream());
             String v = pomInfo.getProperty("version", "unknown");
    -        VersionInfo.version = v;
    +        this.version = v;
           }
     
           resources = VersionInfo.class.getClassLoader().getResources("dt-git.properties");
    --- End diff --
    
    We should probably parametrize this dt-git.properties also.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---