You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Todd Lipcon (JIRA)" <ji...@apache.org> on 2008/07/05 00:45:32 UTC

[jira] Created: (THRIFT-70) Java install prefix should be configurable

Java install prefix should be configurable
------------------------------------------

                 Key: THRIFT-70
                 URL: https://issues.apache.org/jira/browse/THRIFT-70
             Project: Thrift
          Issue Type: Improvement
          Components: Library (Java)
            Reporter: Todd Lipcon
            Priority: Minor


There is currently no way of defining the prefix for the installed Java libs. In Debian it's common to install into /usr/share/java whereas the default installs into /usr/local/lib.

Patch forthcoming.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (THRIFT-70) Java install prefix should be configurable

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-70?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12610666#action_12610666 ] 

Todd Lipcon commented on THRIFT-70:
-----------------------------------

Patch in git at pri/tlipcon/thrift-70. Log and patch pasted below:

{noformat}
commit 99a8f9bdc0360460f744f0a2d71de19e339829d8
Author: Todd Lipcon <to...@amiestreet.com>
Date:   Fri Jul 4 18:47:28 2008 -0400

    [THRIFT-70] allow the Java install prefix to be configured.
    
    Systems like Debian expect the thrift jar to be in /usr/share/java, not the default /usr/local/lib
    This patch allows configure to be passed a --java-prefix flag

diff --git a/configure.ac b/configure.ac
index df5c229..e28ccd7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12,6 +12,11 @@ AC_ARG_VAR([PY_PREFIX], [Prefix for installing Python modules.
                          Default = "/usr"])
 AS_IF([test "x$PY_PREFIX" = x], [PY_PREFIX="/usr"])
 
+AC_ARG_VAR([JAVA_PREFIX], [Prefix for installing java lib jar.
+                           (Normal --prefix is ignored for Java because
+                           Java has different conevntions.)
+                           Default = "/usr/local/lib"])
+AS_IF([test "x$JAVA_PREFIX" = x], [JAVA_PREFIX="/usr/local/lib"])
 
 AC_PROG_CC
 AC_PROG_CPP
diff --git a/lib/java/Makefile.am b/lib/java/Makefile.am
index e878ae9..45a88e2 100644
--- a/lib/java/Makefile.am
+++ b/lib/java/Makefile.am
@@ -4,7 +4,7 @@ all-local:
 	$(ANT)
 
 install-exec-hook:
-	$(ANT) install
+	$(ANT) install -Dinstall.path=$(DESTDIR)$(JAVA_PREFIX)
 
 # Make sure this doesn't fail if ant is not configured.
 clean-local:
diff --git a/lib/java/build.xml b/lib/java/build.xml
index cd01017..75e7451 100644
--- a/lib/java/build.xml
+++ b/lib/java/build.xml
@@ -4,6 +4,7 @@
 
   <property name="src" location="src" />
   <property name="build" location="build" />
+  <property name="install.path" value="/usr/local/lib" />
 
   <target name="init">
     <tstamp />
@@ -20,7 +21,7 @@
 
   <target name="install" depends="dist">
     <exec executable="install">
-      <arg line="libthrift.jar /usr/local/lib/" />
+      <arg line="libthrift.jar ${install.path}" />
     </exec>
   </target>

{noformat}

> Java install prefix should be configurable
> ------------------------------------------
>
>                 Key: THRIFT-70
>                 URL: https://issues.apache.org/jira/browse/THRIFT-70
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Library (Java)
>            Reporter: Todd Lipcon
>            Priority: Minor
>
> There is currently no way of defining the prefix for the installed Java libs. In Debian it's common to install into /usr/share/java whereas the default installs into /usr/local/lib.
> Patch forthcoming.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (THRIFT-70) Java install prefix should be configurable

Posted by "David Reiss (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-70?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Reiss resolved THRIFT-70.
-------------------------------

    Resolution: Fixed
      Assignee: Todd Lipcon

I committed (a slightly modified version of) this yesterday as r675821.  I'm not sure why it hasn't shown up in JIRA.

> Java install prefix should be configurable
> ------------------------------------------
>
>                 Key: THRIFT-70
>                 URL: https://issues.apache.org/jira/browse/THRIFT-70
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Library (Java)
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Minor
>
> There is currently no way of defining the prefix for the installed Java libs. In Debian it's common to install into /usr/share/java whereas the default installs into /usr/local/lib.
> Patch forthcoming.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.