public inbox for gentoo-java@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Pascal Flöschel" <pascal.floeschel@gmx.de>
To: jieryn@gmail.com
Cc: gentoo-java@lists.gentoo.org
Subject: Re: [gentoo-java] Java packages in eclipse build path
Date: Mon, 14 Jan 2008 02:28:07 +0100	[thread overview]
Message-ID: <478ABAA7.70701@gmx.de> (raw)
In-Reply-To: <eab08af20801131559m2cb6b010w1271c1055a574e56@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1607 bytes --]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

jieryn@gmail.com schrieb:
| On Jan 13, 2008 6:44 PM, Pascal Flöschel <pascal.floeschel@gmx.de> wrote:
|> Is there a fast and simple way of using the package.env (e.g.
|> /usr/share/axis-1/package.env ) to add libraries into the eclipse build
|> path? Manually reading the package.env and adding every jar by hand
|> takes quite some time.
|
| I do stuff like this quite a bit, java-config is simple but great tool
| to learn. You can add the output of the following scriptlet to your
| .classpath file inside your project.
|
| I use something like this for many purposes,
|
| #!/bin/bash
|
| for pkg in $(java-config --list-available-packages | sort | perl -pi
| -e 's/^\[(.*?)].*/$1/g')
|   do
|     echo -n "<classpathentry kind=\"lib\"
path=\"/usr/share/$pkg/lib/$pkg.jar\""
|     echo    " sourcepath=\"/usr/share/$pkg/sources/$pkg-src.zip\"/>"
|   done
|
| -jesse
|
Thank you and very much. My bash and sed skills are very low. However I
tried to combine your idea with Bernhard's and now got the following script:

#!/bin/bash
## Packages to add
## "java-confid -d for dependencies"

PACKAGES=axis-1,wsdl4j

for pkg in $(java-config -p ${PACKAGES} | perl -pi -e 's/[:*]/$1\n/g')
~  do
~    echo "<classpathentry kind=\"lib\" path=\"$pkg\" />"
~  done
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD4DBQFHirqnQMbFB3F8PqYRAuAwAJ4oRV5sPoyuCm3unWyIkdNK5AdoUACTBDdt
1VZdEDIGrQxICuzLngQxpg==
=u/k4
-----END PGP SIGNATURE-----


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 3784 bytes --]

  reply	other threads:[~2008-01-14  1:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-13 23:44 [gentoo-java] Java packages in eclipse build path Pascal Flöschel
2008-01-13 23:59 ` jieryn
2008-01-14  1:28   ` Pascal Flöschel [this message]
2008-01-14  2:56     ` Bernhard Frauendienst
2008-01-14  0:08 ` Bernhard Frauendienst
2008-01-14  6:45   ` Andrew Cowie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=478ABAA7.70701@gmx.de \
    --to=pascal.floeschel@gmx.de \
    --cc=gentoo-java@lists.gentoo.org \
    --cc=jieryn@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox