Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.6.1, 0.7
    • Component/s: Java - Library
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      Please, deploy libthrift into a public maven repository. Preferably, to Maven central, but if not at least the Apache.

      Maven Central: http://maven.apache.org/guides/mini/guide-central-repository-upload.html
      Apache Incubator Repository: http://people.apache.org/repo/m2-incubating-repository/

      The following is a sample pom.xml:
      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
      <modelVersion>4.0.0</modelVersion>
      <groupId>org.facebook.thrift</groupId>
      <artifactId>libthrift</artifactId>
      <version>0.1-20090310</version>
      <packaging>jar</packaging>
      <name>Apache Thrift Library</name>
      <url>http://incubator.apache.org/thrift/</url>
      <description>Thrift is a software framework for scalable cross-language services development. It combines a software stack with a code generation engine to build services that work efficiently and seamlessly between C++, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, Smalltalk, and OCaml</description>
      <licenses>
      <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
      </license>
      </licenses>
      <scm>
      <url>http://svn.apache.org/repos/asf/incubator/thrift/trunk</url>
      </scm>
      </project>

      1. thrift-363-0.6.x.patch
        27 kB
        JCF
      2. thrift-363.patch
        26 kB
        JCF
      3. pom.1.patch
        9 kB
        Lars Francke
      4. THRIFT-363.patch
        5 kB
        Karthik K
      5. THRIFT-363.patch
        5 kB
        Karthik K
      6. THRIFT-363.patch
        5 kB
        Karthik K
      7. THRIFT-363.patch
        5 kB
        Karthik K
      8. THRIFT-363.patch
        7 kB
        Karthik K
      9. THRIFT-363.patch
        5 kB
        Karthik K
      10. THRIFT-363.patch
        5 kB
        Karthik K
      11. THRIFT-363.patch
        2 kB
        Karthik K

        Issue Links

          Activity

          Hide
          David Reiss added a comment -

          Does a committer need to do this, or can anybody?

          Show
          David Reiss added a comment - Does a committer need to do this, or can anybody?
          Hide
          Gary Rudolph added a comment -

          It has to be anybody with access to whatever source control, ssh, scp can access http://people.apache.org/repo/m2-incubating-repository/ .

          You could take the pom.xml above and the libthrift.jar and do a:

          mvn deploy:deploy-file -Durl=$

          {URL}

          -DpomFile=pom.xml -Dfile=libthrift.jar

          Where URL can be file:///path/to/repo/m2-incubating-repository or http://people.apache.org/repo/m2-incubating-repository/. If you use http you'll need a settings.xml in ~/.m2 that contains a username/password.

          My recommendation is to put it on the incubating repository, then issue a request have it rsync'ed to the maven central repository using http://maven.apache.org/guides/mini/guide-central-repository-upload.html#Syncing_your_own_repository_to_the_central_repository_automatically

          You might want to ask the tuscany, CXF, felix, myfaces, sling, etc. projects, as they are doing it today. I'd be surprised if there wasn't an Apache standard/mechanism to do this.

          Show
          Gary Rudolph added a comment - It has to be anybody with access to whatever source control, ssh, scp can access http://people.apache.org/repo/m2-incubating-repository/ . You could take the pom.xml above and the libthrift.jar and do a: mvn deploy:deploy-file -Durl=$ {URL} -DpomFile=pom.xml -Dfile=libthrift.jar Where URL can be file:///path/to/repo/m2-incubating-repository or http://people.apache.org/repo/m2-incubating-repository/ . If you use http you'll need a settings.xml in ~/.m2 that contains a username/password. My recommendation is to put it on the incubating repository, then issue a request have it rsync'ed to the maven central repository using http://maven.apache.org/guides/mini/guide-central-repository-upload.html#Syncing_your_own_repository_to_the_central_repository_automatically You might want to ask the tuscany, CXF, felix, myfaces, sling, etc. projects, as they are doing it today. I'd be surprised if there wasn't an Apache standard/mechanism to do this.
          Hide
          Ian Atha added a comment -

          It would really nice to have this.

          Show
          Ian Atha added a comment - It would really nice to have this.
          Hide
          David Reiss added a comment -

          I can't speak for the other committers, but I don't really have the time to study Maven enough to learn what this task even means, let alone all of the steps required to accomplish it. If someone wants to make a patch against our source tree and submit it, I'd be happy to quickly skim it to make sure it does no harm, then commit.

          Show
          David Reiss added a comment - I can't speak for the other committers, but I don't really have the time to study Maven enough to learn what this task even means, let alone all of the steps required to accomplish it. If someone wants to make a patch against our source tree and submit it, I'd be happy to quickly skim it to make sure it does no harm, then commit.
          Hide
          Rob Slifka added a comment -

          For those who are waiting for this, you might never have installed a custom library into your Maven repository.

          (1) Install your custom-compiled libthrift.jar into the repository.

          mvn -e install:install-file -DgroupId=com.yourcompany.group -DartifactId=yourcompany-libthrift -Dversion=1.0-SNAPSHOT -Dfile=libthrift.jar -Dpackaging=jar

          (2) Find the location where the package was installed.

          ~\.m2\repository\com\ yourcompany\group\yourcompany-libthrift\1.0-SNAPSHOT

          (3) Drop this POM into that directory.

          <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
          
              <modelVersion>4.0.0</modelVersion>
          
              <groupId>com.yourcompany.group</groupId>
              <version>1.0-SNAPSHOT</version>
              <artifactId>yourcompany-libthrift</artifactId>
              <packaging>jar</packaging>
              <name>FOO</name>
          
              <dependencies>
                  <dependency>
                      <groupId>log4j</groupId>
                      <artifactId>log4j</artifactId>
                      <version>1.2.14</version>
                  </dependency>
              </dependencies>
          
          </project>
          
          Show
          Rob Slifka added a comment - For those who are waiting for this, you might never have installed a custom library into your Maven repository. (1) Install your custom-compiled libthrift.jar into the repository. mvn -e install:install-file -DgroupId=com.yourcompany.group -DartifactId=yourcompany-libthrift -Dversion=1.0-SNAPSHOT -Dfile=libthrift.jar -Dpackaging=jar (2) Find the location where the package was installed. ~\.m2\repository\com\ yourcompany\group\yourcompany-libthrift\1.0-SNAPSHOT (3) Drop this POM into that directory. <project xmlns= "http://maven.apache.org/POM/4.0.0" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation= "http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" > <modelVersion> 4.0.0 </modelVersion> <groupId> com.yourcompany.group </groupId> <version> 1.0-SNAPSHOT </version> <artifactId> yourcompany-libthrift </artifactId> <packaging> jar </packaging> <name> FOO </name> <dependencies> <dependency> <groupId> log4j </groupId> <artifactId> log4j </artifactId> <version> 1.2.14 </version> </dependency> </dependencies> </project>
          Hide
          sam rash added a comment -

          is this not going to happen? I am looking to open source something that depends on thrift and it uses maven to build; it would be a lot nicer to depend on thrift via the pom file vs my providing an icky shell script to do a mvn install:install-file with the distro.

          Show
          sam rash added a comment - is this not going to happen? I am looking to open source something that depends on thrift and it uses maven to build; it would be a lot nicer to depend on thrift via the pom file vs my providing an icky shell script to do a mvn install:install-file with the distro.
          Hide
          David Reiss added a comment -

          I stand by my previous comment. Bryan, do you know anything about Maven?

          Show
          David Reiss added a comment - I stand by my previous comment. Bryan, do you know anything about Maven?
          Hide
          Karthik K added a comment -

          The steps have been mentioned above . When can we expect the artifacts in the maven repository. That would be very useful. Thanks.

          Show
          Karthik K added a comment - The steps have been mentioned above . When can we expect the artifacts in the maven repository. That would be very useful. Thanks.
          Hide
          Bryan Duxbury added a comment -

          I am aware of Maven conceptually, but I don't make use of it personally. I think it's cool, but I sort of agree with David - I don't really understand what's going on in any detail.

          Does one of us have to push the jar into the repo, or can anyone do it? Also, unless I'm missing something, we'll have to push a new version whenever we change things in Thrift, or at least whenever we cut a new version, right? Does anyone with Maven experience want to chime in about what kind of process we'd be introducing and committing ourselves to?

          I would gladly commit a patch that modifies our Java lib's build to have a maven-publishing task, but I don't know if I'm up to building that out myself.

          Show
          Bryan Duxbury added a comment - I am aware of Maven conceptually, but I don't make use of it personally. I think it's cool, but I sort of agree with David - I don't really understand what's going on in any detail. Does one of us have to push the jar into the repo, or can anyone do it? Also, unless I'm missing something, we'll have to push a new version whenever we change things in Thrift, or at least whenever we cut a new version, right? Does anyone with Maven experience want to chime in about what kind of process we'd be introducing and committing ourselves to? I would gladly commit a patch that modifies our Java lib's build to have a maven-publishing task, but I don't know if I'm up to building that out myself.
          Hide
          Karthik K added a comment -
          Does one of us have to push the jar into the repo, or can anyone do it?

          Usually - a committer after the approval from PMC should have the privileges to do it.

          Also, unless I'm missing something, we'll have to push a new version whenever we change things in Thrift, or at least whenever we cut a new version, right?

          Yes - that would be true.

          what kind of process we'd be introducing and committing ourselves to?

          Usually the versioning would be along major.minor.releaseVerisons and the developments / PMC team of the project agree on a release checkpoint and after a particular amount of dev cycle iterations / checkins , a new release is made. As a thumb rule - all releases with same major / minor versions ( but different releases ) are backward compatible w.r.t code .

          Given that it has to do with protocol versioning - may be associating a minor version with the protocol in place would be easy to begin with , so that users are aware of the backward compatibility issues.

          If you think there is heavy development going on - then the artifacts could be published to - http://repository.apache.org/snapshots/org/apache/ , with less stringent backward compatibility requirements and be integrated with some other continuous build process ( Hudson, say) to publish the latest artifact after to the snapshot repository after every successful build + test .

          Show
          Karthik K added a comment - Does one of us have to push the jar into the repo, or can anyone do it? Usually - a committer after the approval from PMC should have the privileges to do it. Also, unless I'm missing something, we'll have to push a new version whenever we change things in Thrift, or at least whenever we cut a new version, right? Yes - that would be true. what kind of process we'd be introducing and committing ourselves to? Usually the versioning would be along major.minor.releaseVerisons and the developments / PMC team of the project agree on a release checkpoint and after a particular amount of dev cycle iterations / checkins , a new release is made. As a thumb rule - all releases with same major / minor versions ( but different releases ) are backward compatible w.r.t code . Given that it has to do with protocol versioning - may be associating a minor version with the protocol in place would be easy to begin with , so that users are aware of the backward compatibility issues. If you think there is heavy development going on - then the artifacts could be published to - http://repository.apache.org/snapshots/org/apache/ , with less stringent backward compatibility requirements and be integrated with some other continuous build process ( Hudson, say) to publish the latest artifact after to the snapshot repository after every successful build + test .
          Hide
          David Reiss added a comment -

          This all seems pretty involved. I think it would be best if someone familiar with Maven could manage this, rather than requiring me or Bryan to fumble around with it. It is pretty common with other packaging systems to have the package maintainer be separate from the software maintainer. Anyone want to volunteer?

          Show
          David Reiss added a comment - This all seems pretty involved. I think it would be best if someone familiar with Maven could manage this, rather than requiring me or Bryan to fumble around with it. It is pretty common with other packaging systems to have the package maintainer be separate from the software maintainer. Anyone want to volunteer?
          Hide
          Karthik K added a comment -

          I can help with a patch to integrate with the build process to release the artifacts but, the versioning and the release process guidelines (changing properties etc.) have to come from the PMC of the project, of course.

          Show
          Karthik K added a comment - I can help with a patch to integrate with the build process to release the artifacts but, the versioning and the release process guidelines (changing properties etc.) have to come from the PMC of the project, of course.
          Hide
          David Reiss added a comment -

          That sounds great. You can post the patch on this issue. Can you clarify what it is that the PMC needs to do other than release tarballs with version numbers?

          Show
          David Reiss added a comment - That sounds great. You can post the patch on this issue. Can you clarify what it is that the PMC needs to do other than release tarballs with version numbers?
          Hide
          Karthik K added a comment -

          I believe that would pretty much be about it , with the important addition of deciding versioning and backward-compatibility / notes for upgradation.

          Show
          Karthik K added a comment - I believe that would pretty much be about it , with the important addition of deciding versioning and backward-compatibility / notes for upgradation.
          Hide
          Brian Fox added a comment -

          When you're ready, please file an issue as a subtask of INFRA-1896 so we can get you setup correctly in the repository.apache.org system. I'll also help validate what gets created as part of this process.

          Show
          Brian Fox added a comment - When you're ready, please file an issue as a subtask of INFRA-1896 so we can get you setup correctly in the repository.apache.org system. I'll also help validate what gets created as part of this process.
          Hide
          Karthik K added a comment -

          @David / @Bryan - can you make changes to the source tree as mentioned in the sub-task - THRIFT-679 , before we can move further on this.

          We need to reorganize the directory structure a little bit ( I have attached a build.xml patch) to work with revised structure.

          Show
          Karthik K added a comment - @David / @Bryan - can you make changes to the source tree as mentioned in the sub-task - THRIFT-679 , before we can move further on this. We need to reorganize the directory structure a little bit ( I have attached a build.xml patch) to work with revised structure.
          Hide
          Karthik K added a comment - - edited

          First cut version of pom.xml for the sake of reference. ( Important: not ready to be applied to tree )

          Show
          Karthik K added a comment - - edited First cut version of pom.xml for the sake of reference. ( Important: not ready to be applied to tree )
          Hide
          Karthik K added a comment -

          New target - publish added to build.xml that will publish to remote repository

          • Uses maven ant task ( mvn-init downloads automatically and installs it)
          • Attaches source as well.
          • file pom.xml added , that is used by mvn upload process
          Show
          Karthik K added a comment - New target - publish added to build.xml that will publish to remote repository Uses maven ant task ( mvn-init downloads automatically and installs it) Attaches source as well. file pom.xml added , that is used by mvn upload process
          Hide
          Karthik K added a comment -

          $ ant publish

          to publish mvn artifacts

          Also check permissions to publish to http://repository.apache.org and the URL ( m2.repository property in the patch ).

          Show
          Karthik K added a comment - $ ant publish to publish mvn artifacts Also check permissions to publish to http://repository.apache.org and the URL ( m2.repository property in the patch ).
          Hide
          Karthik K added a comment -

          @David / @Bryan - Can you apply this patch to see if this creates the artifacts successfully. I would imagine there would be some issues with authentication ( need to open a subtask of INFRA-1896 , as per Brian's comment ) - but apart from there the patch should work fine.

          Show
          Karthik K added a comment - @David / @Bryan - Can you apply this patch to see if this creates the artifacts successfully. I would imagine there would be some issues with authentication ( need to open a subtask of INFRA-1896 , as per Brian's comment ) - but apart from there the patch should work fine.
          Hide
          Karthik K added a comment -

          tabs to spaces

          Show
          Karthik K added a comment - tabs to spaces
          Hide
          Karthik K added a comment -

          Ready to be published to nexus repository

          Show
          Karthik K added a comment - Ready to be published to nexus repository
          Hide
          Karthik K added a comment -

          No need to have pom.xml and ivy.xml at the same time. Delete ivy.xml (still use ivy tool through the ivy:convertpom task )

          Show
          Karthik K added a comment - No need to have pom.xml and ivy.xml at the same time. Delete ivy.xml (still use ivy tool through the ivy:convertpom task )
          Hide
          Karthik K added a comment -

          Generate pom.xml for repository publishing from ivy.xml .

          Retain ivy.xml as before with some publication attributes changed.

          Show
          Karthik K added a comment - Generate pom.xml for repository publishing from ivy.xml . Retain ivy.xml as before with some publication attributes changed.
          Hide
          Bryan Duxbury added a comment -

          I just reviewed this patch. From what I understand, it looks pretty good. I saw that there was TODO about getting the proper tokens - is that something I need to do via INFRA-1896 before I can actually use the patch?

          Show
          Bryan Duxbury added a comment - I just reviewed this patch. From what I understand, it looks pretty good. I saw that there was TODO about getting the proper tokens - is that something I need to do via INFRA-1896 before I can actually use the patch?
          Hide
          Karthik K added a comment -

          Thanks Bryan.

          I had already opened a sub-task under as INFRA-2445 .

          We need to work with Brian Fox and depending on what the project guidelines are - we may need some minor modifications to this patch about the pom files to be published etc.

          Show
          Karthik K added a comment - Thanks Bryan. I had already opened a sub-task under as INFRA-2445 . We need to work with Brian Fox and depending on what the project guidelines are - we may need some minor modifications to this patch about the pom files to be published etc.
          Hide
          Karthik K added a comment -

          do not pack *.class and *.zip in the same file - once we start publishing to mvn .

          sources get published as source artifacts separately.

          apache snapshot repository in.

          Show
          Karthik K added a comment - do not pack *.class and *.zip in the same file - once we start publishing to mvn . sources get published as source artifacts separately. apache snapshot repository in.
          Hide
          David Reiss added a comment -

          Why did you remove the src fileset from the compile target?

          Show
          David Reiss added a comment - Why did you remove the src fileset from the compile target?
          Hide
          Karthik K added a comment -

          Why did you remove the src fileset from the compile target?

          src is removed from the 'dist' target ( and not 'compile' target) since we want to publish binary and source artifacts separately ( see - publish target , that creates a zip file ).

          Show
          Karthik K added a comment - Why did you remove the src fileset from the compile target? src is removed from the 'dist' target ( and not 'compile' target) since we want to publish binary and source artifacts separately ( see - publish target , that creates a zip file ).
          Hide
          David Reiss added a comment -

          Oh, sorry. I missed the context.

          Show
          David Reiss added a comment - Oh, sorry. I missed the context.
          Hide
          Karthik K added a comment -

          start with version 0.3.x to begin with

          Show
          Karthik K added a comment - start with version 0.3.x to begin with
          Hide
          Karthik K added a comment -

          Have you guys thought about what version - should this publishing begin with.

          Show
          Karthik K added a comment - Have you guys thought about what version - should this publishing begin with.
          Hide
          Karthik K added a comment -

          Linking this issue to maven repository publishing permissions

          Show
          Karthik K added a comment - Linking this issue to maven repository publishing permissions
          Hide
          Karthik K added a comment -

          groupId changed to org.apache.thrift , as per comments on INFRA-2445 .

          Also - patch to be applied from root of the tree ( and not lib/java as earier) , as per the convention.

          Show
          Karthik K added a comment - groupId changed to org.apache.thrift , as per comments on INFRA-2445 . Also - patch to be applied from root of the tree ( and not lib/java as earier) , as per the convention.
          Hide
          Karthik K added a comment -

          INFRA-2445 is closed now and as per the latest update - the committers of Thrift should have access to publish to the snapshot repository.

          Can somebody help try the latest patch.

          $ cd lib/java
          $ ant clean compile
          $ ant publish

          should publish the artifacts

          To change the version - change as appropriate in ivy.xml in lib/java .

          Show
          Karthik K added a comment - INFRA-2445 is closed now and as per the latest update - the committers of Thrift should have access to publish to the snapshot repository. Can somebody help try the latest patch. $ cd lib/java $ ant clean compile $ ant publish should publish the artifacts To change the version - change as appropriate in ivy.xml in lib/java .
          Hide
          Karthik K added a comment -

          Curios - if there is any interest in trying this one out ?

          Show
          Karthik K added a comment - Curios - if there is any interest in trying this one out ?
          Hide
          Ted Dunning added a comment -

          I am curious, but won't have time this week.

          Getting Thrift into a real maven repository would be a huge boon.

          Show
          Ted Dunning added a comment - I am curious, but won't have time this week. Getting Thrift into a real maven repository would be a huge boon.
          Hide
          Karthik K added a comment -

          A good chunk of work has been done here. So - anybody with committer access can check the patch and commit this.

          We can talk about maven publishing once the patch is in - at least. Let me know if anything is needed in this regard.

          Show
          Karthik K added a comment - A good chunk of work has been done here. So - anybody with committer access can check the patch and commit this. We can talk about maven publishing once the patch is in - at least. Let me know if anything is needed in this regard.
          Hide
          Bryan Duxbury added a comment -

          I just committed a slightly tweaked version of this patch (mostly whitespace). I haven't yet used the changes to publish to the repo - I think I'll do that after the next release.

          Thanks for everyone's patience.

          Show
          Bryan Duxbury added a comment - I just committed a slightly tweaked version of this patch (mostly whitespace). I haven't yet used the changes to publish to the repo - I think I'll do that after the next release. Thanks for everyone's patience.
          Hide
          Karthik K added a comment -

          Thanks Bryan for helping with this.

          Show
          Karthik K added a comment - Thanks Bryan for helping with this.
          Hide
          Bryan Duxbury added a comment -

          "ant publish" is failing:

          mvn.init:
                [get] Getting: http://www.reverse.net/pub/apache/maven/binaries/maven-ant-tasks-2.1.0.jar
                [get] To: /Users/bryanduxbury/projects/thrift/thrift-0.3/lib/java/build/ivy/maven-ant-tasks-2.1.0.jar
                [get] Error opening connection java.io.FileNotFoundException: http://www.reverse.net/pub/apache/maven/binaries/maven-ant-tasks-2.1.0.jar
                [get] Error opening connection java.io.FileNotFoundException: http://www.reverse.net/pub/apache/maven/binaries/maven-ant-tasks-2.1.0.jar
                [get] Error opening connection java.io.FileNotFoundException: http://www.reverse.net/pub/apache/maven/binaries/maven-ant-tasks-2.1.0.jar
                [get] Can't get http://www.reverse.net/pub/apache/maven/binaries/maven-ant-tasks-2.1.0.jar to /Users/bryanduxbury/projects/thrift/thrift-0.3/lib/java/build/ivy/maven-ant-tasks-2.1.0.jar
          
          BUILD FAILED
          /Users/bryanduxbury/projects/thrift/thrift-0.3/lib/java/build.xml:251: Can't get http://www.reverse.net/pub/apache/maven/binaries/maven-ant-tasks-2.1.0.jar to /Users/bryanduxbury/projects/thrift/thrift-0.3/lib/java/build/ivy/maven-ant-tasks-2.1.0.jar
          

          Any ideas?

          Show
          Bryan Duxbury added a comment - "ant publish" is failing: mvn.init: [get] Getting: http: //www.reverse.net/pub/apache/maven/binaries/maven-ant-tasks-2.1.0.jar [get] To: /Users/bryanduxbury/projects/thrift/thrift-0.3/lib/java/build/ivy/maven-ant-tasks-2.1.0.jar [get] Error opening connection java.io.FileNotFoundException: http: //www.reverse.net/pub/apache/maven/binaries/maven-ant-tasks-2.1.0.jar [get] Error opening connection java.io.FileNotFoundException: http: //www.reverse.net/pub/apache/maven/binaries/maven-ant-tasks-2.1.0.jar [get] Error opening connection java.io.FileNotFoundException: http: //www.reverse.net/pub/apache/maven/binaries/maven-ant-tasks-2.1.0.jar [get] Can't get http: //www.reverse.net/pub/apache/maven/binaries/maven-ant-tasks-2.1.0.jar to /Users/bryanduxbury/projects/thrift/thrift-0.3/lib/java/build/ivy/maven-ant-tasks-2.1.0.jar BUILD FAILED /Users/bryanduxbury/projects/thrift/thrift-0.3/lib/java/build.xml:251: Can't get http: //www.reverse.net/pub/apache/maven/binaries/maven-ant-tasks-2.1.0.jar to /Users/bryanduxbury/projects/thrift/thrift-0.3/lib/java/build/ivy/maven-ant-tasks-2.1.0.jar Any ideas?
          Hide
          Carl Steinbach added a comment -

          @Brian: Looks like you need to manually set the value of the mvn_ant_task_url property.

          This is currently set to {{http://www.reverse.net/pub/apache/maven/binaries/maven-ant-tasks-$

          {mvn.ant.task.version}

          .jar}}

          Instead of using a mirror it should probably be updated to point directly to archive.apache.org, e.g.
          http://archive.apache.org/dist/maven/binaries/maven-ant-tasks-2.1.0.jar

          You can set this on the command line as follows:

          ant publish -Dmvn_ant_task_url=http://archive.apache.org/dist/maven/binaries/maven-ant-tasks-2.1.0.jar
          
          Show
          Carl Steinbach added a comment - @Brian: Looks like you need to manually set the value of the mvn_ant_task_url property. This is currently set to {{ http://www.reverse.net/pub/apache/maven/binaries/maven-ant-tasks-$ {mvn.ant.task.version} .jar}} Instead of using a mirror it should probably be updated to point directly to archive.apache.org, e.g. http://archive.apache.org/dist/maven/binaries/maven-ant-tasks-2.1.0.jar You can set this on the command line as follows: ant publish -Dmvn_ant_task_url=http: //archive.apache.org/dist/maven/binaries/maven-ant-tasks-2.1.0.jar
          Hide
          Carl Steinbach added a comment -

          On a related note am I correct in observing that this patch does not cover the deployment of libfb303?

          Show
          Carl Steinbach added a comment - On a related note am I correct in observing that this patch does not cover the deployment of libfb303?
          Hide
          Bryan Duxbury added a comment -

          Sorry to have been silent so long, but now I get this:

          publish:
          [artifact:install] [INFO] Installing /Users/bryanduxbury/projects/thrift/thrift-0.4/lib/java/libthrift.jar to /Users/bryanduxbury/.m2/repository/org/apache/thrift/libthrift/0.4.0/libthrift-0.4.0.jar
          [artifact:install] [INFO] Installing /Users/bryanduxbury/projects/thrift/thrift-0.4/lib/java/build/libthrift-src.zip to /Users/bryanduxbury/.m2/repository/org/apache/thrift/libthrift/0.4.0/libthrift-0.4.0-source.jar
          [artifact:deploy] Deploying to https://repository.apache.org/content/repositories/snapshots
          [artifact:deploy] Uploading: org/apache/thrift/libthrift/0.4.0/libthrift-0.4.0.jar to repository remote.repository at https://repository.apache.org/content/repositories/snapshots
          [artifact:deploy] Transferring 227K from remote.repository
          [artifact:deploy] An error has occurred while processing the Maven artifact tasks.
          [artifact:deploy]  Diagnosis:
          [artifact:deploy] 
          [artifact:deploy] Error deploying artifact 'org.apache.thrift:libthrift:jar': Error deploying artifact: Failed to transfer file: https://repository.apache.org/content/repositories/snapshots/org/apache/thrift/libthrift/0.4.0/libthrift-0.4.0.jar. Return code is: 401
          
          BUILD FAILED
          /Users/bryanduxbury/projects/thrift/thrift-0.4/lib/java/build.xml:278: Error deploying artifact 'org.apache.thrift:libthrift:jar': Error deploying artifact: Failed to transfer file: https://repository.apache.org/content/repositories/snapshots/org/apache/thrift/libthrift/0.4.0/libthrift-0.4.0.jar. Return code is: 401
          

          Is there some pre-publish setup step I need to do?

          Show
          Bryan Duxbury added a comment - Sorry to have been silent so long, but now I get this: publish: [artifact:install] [INFO] Installing /Users/bryanduxbury/projects/thrift/thrift-0.4/lib/java/libthrift.jar to /Users/bryanduxbury/.m2/repository/org/apache/thrift/libthrift/0.4.0/libthrift-0.4.0.jar [artifact:install] [INFO] Installing /Users/bryanduxbury/projects/thrift/thrift-0.4/lib/java/build/libthrift-src.zip to /Users/bryanduxbury/.m2/repository/org/apache/thrift/libthrift/0.4.0/libthrift-0.4.0-source.jar [artifact:deploy] Deploying to https: //repository.apache.org/content/repositories/snapshots [artifact:deploy] Uploading: org/apache/thrift/libthrift/0.4.0/libthrift-0.4.0.jar to repository remote.repository at https: //repository.apache.org/content/repositories/snapshots [artifact:deploy] Transferring 227K from remote.repository [artifact:deploy] An error has occurred while processing the Maven artifact tasks. [artifact:deploy] Diagnosis: [artifact:deploy] [artifact:deploy] Error deploying artifact 'org.apache.thrift:libthrift:jar': Error deploying artifact: Failed to transfer file: https: //repository.apache.org/content/repositories/snapshots/org/apache/thrift/libthrift/0.4.0/libthrift-0.4.0.jar. Return code is: 401 BUILD FAILED /Users/bryanduxbury/projects/thrift/thrift-0.4/lib/java/build.xml:278: Error deploying artifact 'org.apache.thrift:libthrift:jar': Error deploying artifact: Failed to transfer file: https: //repository.apache.org/content/repositories/snapshots/org/apache/thrift/libthrift/0.4.0/libthrift-0.4.0.jar. Return code is: 401 Is there some pre-publish setup step I need to do?
          Hide
          sam rash added a comment -

          401 looks like you have either a wrong user/password for uploading to the target maven repo (https://repository.apache.org/content/repositories/snapshots)
          or your username is not authorized to do the deploy/upload

          you should have a ~/.m2/settings.xml file and can put something like:

          <servers>
          <server>
          <id>central-snapshot</id>
          <username>username-that-can-upload</username>
          <password>its-password</password>
          </server>
          </servers>

          and add this to your mvn deploy command:

          -DrepositoryId=central-snapshot

          Show
          sam rash added a comment - 401 looks like you have either a wrong user/password for uploading to the target maven repo ( https://repository.apache.org/content/repositories/snapshots ) or your username is not authorized to do the deploy/upload you should have a ~/.m2/settings.xml file and can put something like: <servers> <server> <id>central-snapshot</id> <username>username-that-can-upload</username> <password>its-password</password> </server> </servers> and add this to your mvn deploy command: -DrepositoryId=central-snapshot
          Hide
          Bryan Duxbury added a comment -

          I made a settings.xml file as you proposed. However, what credentials should I be using? I tried my Apache credentials and that didn't work. Do I need to ask someone for karma?

          Show
          Bryan Duxbury added a comment - I made a settings.xml file as you proposed. However, what credentials should I be using? I tried my Apache credentials and that didn't work. Do I need to ask someone for karma?
          Hide
          sam rash added a comment -

          yea-probably you have to ask someone to authorize that account. I have no experience deploying to the apache repo-I just have had that exact message with our local one.

          anyone else subscribed can help out?

          Show
          sam rash added a comment - yea- probably you have to ask someone to authorize that account. I have no experience deploying to the apache repo -I just have had that exact message with our local one. anyone else subscribed can help out?
          Hide
          Brian Fox added a comment -

          bryanduxbury is already part of the thrift group. I looked at the patch and this seems to use
          ivy, which means the settings.xml won't apply (that's for maven). Most likely your credentials
          aren't being set, but not being an ivy expert, I'm not sure exactly how to set them.

          Show
          Brian Fox added a comment - bryanduxbury is already part of the thrift group. I looked at the patch and this seems to use ivy, which means the settings.xml won't apply (that's for maven). Most likely your credentials aren't being set, but not being an ivy expert, I'm not sure exactly how to set them.
          Hide
          sam rash added a comment -

          that's a mvn task inside ant though. I'm not sure how you set the properties appropriately

          note the "mvn.init" output

          Show
          sam rash added a comment - that's a mvn task inside ant though. I'm not sure how you set the properties appropriately note the "mvn.init" output
          Hide
          Lars Francke added a comment -

          The repository you want to deploy to is: https://repository.apache.org/service/local/staging/deploy/maven2 for releases. I don't think that'll fix the authentication problem but to release 0.4 you should use that URL. The publish task seems to do SNAPSHOTs only. So a second target "release" or something like that would be good.

          Releases also need to be signed which the current implementation doesn't seem to do. Unfortunately I have no idea how all this can be done with Ant/Ivy.

          Show
          Lars Francke added a comment - The repository you want to deploy to is: https://repository.apache.org/service/local/staging/deploy/maven2 for releases. I don't think that'll fix the authentication problem but to release 0.4 you should use that URL. The publish task seems to do SNAPSHOTs only. So a second target "release" or something like that would be good. Releases also need to be signed which the current implementation doesn't seem to do. Unfortunately I have no idea how all this can be done with Ant/Ivy.
          Hide
          Lars Francke added a comment -

          Perhaps it helps. This is a rudimentary Maven POM file.

          I'm sure some things don't work as they did but perhaps it is useful anyway if you can't get the Ant way to work

          A few notes:

          Show
          Lars Francke added a comment - Perhaps it helps. This is a rudimentary Maven POM file. I'm sure some things don't work as they did but perhaps it is useful anyway if you can't get the Ant way to work A few notes: I'm ignoring the deprecated tests Tests work but I had to exclude a few things - I hope I didn't catch any actual test Publishing should be as simple as described on these two pages http://www.apache.org/dev/publishing-maven-artifacts.html https://docs.sonatype.org/display/Repository/How+To+Generate+PGP+Signatures+With+Maven
          Hide
          Luke Lu added a comment -

          There are still no thrift maven artifacts yet. Why is this marked as closed?

          HADOOP-6685 really needs this, as many other projects that use ivy/maven to pull dependencies.

          Show
          Luke Lu added a comment - There are still no thrift maven artifacts yet. Why is this marked as closed? HADOOP-6685 really needs this, as many other projects that use ivy/maven to pull dependencies.
          Hide
          Roger Meier added a comment -

          still broken!

          META-INF/MANIFEST.MF does not contain version info
          INFRA-3056 provides info on ivy/maven deploy

          Show
          Roger Meier added a comment - still broken! META-INF/MANIFEST.MF does not contain version info INFRA-3056 provides info on ivy/maven deploy
          Hide
          Diwaker Gupta added a comment -

          Bump. Can someone familiar with the issue provide an update – is it a problem of the right credentials or do some bits in the Thrift build code need to still change? Would really like to see this happen in time for the next release.

          Show
          Diwaker Gupta added a comment - Bump. Can someone familiar with the issue provide an update – is it a problem of the right credentials or do some bits in the Thrift build code need to still change? Would really like to see this happen in time for the next release.
          Hide
          JCF added a comment -

          I've got a patch and am working on cleaning some of the error checking up with the goal of having the artifacts in m2 this week. Will attach patch shortly

          Show
          JCF added a comment - I've got a patch and am working on cleaning some of the error checking up with the goal of having the artifacts in m2 this week. Will attach patch shortly
          Hide
          JCF added a comment -

          Have a working patch for libthrift which uploads the signed artifacts to apache m2 repo. There is a problem with pgp keys within apache nexus which is being looked at by the infrastructure team. Will add patch and work with Brian to get the artifacts into the repo as soon as the pgp key issue has been resolved and we are able to test publishing artifacts from start to finish.

          Show
          JCF added a comment - Have a working patch for libthrift which uploads the signed artifacts to apache m2 repo. There is a problem with pgp keys within apache nexus which is being looked at by the infrastructure team. Will add patch and work with Brian to get the artifacts into the repo as soon as the pgp key issue has been resolved and we are able to test publishing artifacts from start to finish.
          Hide
          JCF added a comment -

          Updates the build.xml to generate and sign artifacts which are deployed to the apache m2 repo. Removes dependency on ivy.xml and places dependencies in the build.xml file for easier maven artifact generation.

          For deploying to apache the users apache credentials and gpg passphrase must be in the ~/.m2/settings.xml file .

          To deploy a release modify the thrift.version property in build.xml and then run "ant -Drelease=true publish"

          Once artifacts have been uploaded to apache login to nexus and go to the staging area, there you can close the staged artifacts and then publish them.

          Show
          JCF added a comment - Updates the build.xml to generate and sign artifacts which are deployed to the apache m2 repo. Removes dependency on ivy.xml and places dependencies in the build.xml file for easier maven artifact generation. For deploying to apache the users apache credentials and gpg passphrase must be in the ~/.m2/settings.xml file . To deploy a release modify the thrift.version property in build.xml and then run "ant -Drelease=true publish" Once artifacts have been uploaded to apache login to nexus and go to the staging area, there you can close the staged artifacts and then publish them.
          Hide
          Bryan Duxbury added a comment -

          I just committed this patch to trunk. Thanks for your incredible efforts, Jake!

          Show
          Bryan Duxbury added a comment - I just committed this patch to trunk. Thanks for your incredible efforts, Jake!
          Hide
          JCF added a comment -

          Adding 0.6.x branch version of this patch to deploy new version.

          Show
          JCF added a comment - Adding 0.6.x branch version of this patch to deploy new version.
          Hide
          JCF added a comment -

          Adding 0.6.x version of this patch

          Show
          JCF added a comment - Adding 0.6.x version of this patch
          Hide
          Hudson added a comment -

          Integrated in Thrift #102 (See https://hudson.apache.org/hudson/job/Thrift/102/)
          THRIFT-1117 JavaScript Unit Test does not work anymore because libthrift*.jar where moved by Maven Deployment(THRIFT-363)

          Show
          Hudson added a comment - Integrated in Thrift #102 (See https://hudson.apache.org/hudson/job/Thrift/102/ ) THRIFT-1117 JavaScript Unit Test does not work anymore because libthrift*.jar where moved by Maven Deployment( THRIFT-363 )
          Hide
          Jake Farrell added a comment -

          r1095216 Added the ability to publish libthrift to apache maven repo.

          Show
          Jake Farrell added a comment - r1095216 Added the ability to publish libthrift to apache maven repo.
          Hide
          Hudson added a comment -

          Integrated in Thrift #134 (See https://builds.apache.org/hudson/job/Thrift/134/)

          Show
          Hudson added a comment - Integrated in Thrift #134 (See https://builds.apache.org/hudson/job/Thrift/134/ )
          Hide
          Jake Farrell added a comment -

          0.6.1 artifacts now available from main apache repo (http://repo1.maven.org/maven2)

          <dependency>
          <groupId>org.apache.thrift</groupId>
          <artifactId>libthrift</artifactId>
          <version>0.6.1</version>
          </dependency>

          Show
          Jake Farrell added a comment - 0.6.1 artifacts now available from main apache repo ( http://repo1.maven.org/maven2 ) <dependency> <groupId>org.apache.thrift</groupId> <artifactId>libthrift</artifactId> <version>0.6.1</version> </dependency>

            People

            • Assignee:
              Jake Farrell
              Reporter:
              Gary Rudolph
            • Votes:
              10 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development