I've asked a couple of questions already trying to get around this. I've tried not using maven at all, but would like to figure out why it hasn't worked for me in the first place. All the guides I see online that detail how to install maven projects just say to check out the code, go to the directory you want and
mvn install
and it should just work. However, I always have to use
sudo mvn install
As a result, my builds are successful (installing mahout and hadoop) but because the installation was done by root, a normal instance of eclipse can't access the files because it does not have root permissions. I must be doing something wrong since these kinds of problems don't seem to be mentioned by others explaining how to do maven installs. Launching eclipse as root with
sudo eclipse
does solve this problem, but people are forever telling me it's a bad idea to anything as root.
Here's an example of a guide I looked at
http://harish11g.blogspot.co.uk/2012/02/configuring-mahout-clustering-hadoop.html
What have I missed?
I'm not familiar with the specifics of these projects builds. Typically, however, mvn install is not run with elevated privileges because all it does is build the projects and put the output artifacts in ~/.m2/repository/. This allows the artifacts to be referenced as dependencies by other maven projects you want to build locally. This is useful if you need to do development against unreleased code.
mvn install is not analogous to make install in that the latter will usually install binaries on system paths, where as the former installs binaries in your home directory (specifically ~/.m2/repository/ as mentioned above.
Related
I am currently working on installing sonar into eclipse. The machienes I am installing them on, however, run on a private server. I cannot install from the eclipse marketplace. I was wondering how I can get the proper files needed to install the plug-in?
Same answer I gave on the Eclipse forums:
One option for installing on machines without Internet access would be if the Sonar plugin developers provide an Update Site Archive (which can be used from Eclipse's Install New Software wizard). Looking at their instructions it doesn't look like they do, but maybe you could reach out to them and ask for it. Producing an archive isn't much trouble if they're already publishing an update site (which it appears they are).
Another option exists, if you have at least one machine on that network that can install the plugin: share that machine's Eclipse installation folder on the network so other machines can see it, then use File > Import > Install > From Existing Installation to select the shared Eclipse folder where Sonar is installed.
Ticket created to provide a zipped update site for next version:
http://jira.sonarsource.com/browse/SONARCLIPS-448
What should I do to install a plugin into gradle so I can use it in the future builds.
I want to use rpm plugin here: https://github.com/TrigonicSolutions/gradle-rpm-plugin
I tried downloading the project and copying the jar that's there in the %GRADLE_HOME%/lib/plugins, but it doesn't look like it works since
apply plugin: 'rpm'
fails.
This should probably be easy, but I don't see it in docs or can't really find how to do it. Do I need to run some task to put the jar in the repository of plugins? Any info would be appreciated.
This question is a few months old, but figured I would provide an answer for those who browse to this page!
For the specific plugin above (and others, I would imagine), simply download the source, then using that source's root folder, run the following task:
gradle install
This should install the plugin for the current user.
Note, if you run some of your gradle scripts using 'sudo' or admin rights, you will have to install the plugin for them as well.
I'm sorry for a pretty vague title, didn't want to turn it into a paragraph.
So, I am using Eclipse Platform 3.7.1 (the one with absolutely no plugin preinstalled), the latest version so far, and I have discovered that by taking advantage of its -configuration option, I can choose which plugins are running and which are not. It was going well enough until I started installing the plugins.
But allow me to explain my setup first, I am using Ubuntu linux by the way. Using only one eclipse installation, my installation is arranged in the following order:
Installation:
~/bin/opt/eclipse
eclipse (executable binary)
~/bin/eclipse -> opt/eclipse/eclipse
Configurations:
~/.eclipse/configuration
web-php
android
java
Installing JDT and ADT while running eclipse and using the android configuration directory posed no problems. So I moved on to the php configuration and tried to install PDT (the JDT and ADT plugins were not activated here, so far so good). The problems came along after the installation, not only was I not able to use PDT, I noticed in the Installation Details that JDT, ADT, PDT were installed but not activated. Instead, they were all activated in the android configuration. To make it worse, when I chose the Java configuration, I could not even use JDT.
My expectations however were when using:
eclipse -configuration ~/.eclipse/configuration/android
was that only the JDT and ADT were activated and when using:
eclipse -configuration ~/.eclipse/configuration/web-php
only the PDT is activated
Regarding the java configuration however, it's probably another problem altogether but if there was help on how to activate a plugin installed from another configuration, I'd deeply appreciate it.
Also, see Single Eclipse install with multiple Configurations and Workspaces
In a p2 world there are extra steps to isolate bundles from each other. You need not just a different configuration directory, but a different p2 profile.
Have a look at the config.ihi in each of your configurations. There are two ways that Eclipse identifies the plugins to use, the ..updateconfigurator, which simply uses all of the plugins in the plugins folder, and the ..simpleconfigurator which uses the bundles.info file in that's in the org.eclipse.equinox.simpleconfigurator folder (which is maintained by the p2 installer). Make sure this file is what you expect.
And also, you might want to start with the -clean option if you are using the updateconfigurator to have it rescan all of the plugins (otherwise it remembers in some hidden cache).
Make sure when you installed everything that you had your -configuration set to the right place for the different things you installed.
I hope some of this points you in the right direction.
I've set up Eclipse in Ubuntu 10.04. I currently have the OpenJDK JRE installed but don't have the JDK needed to compile.
However, the code written Eclipse still compiles. Is this a standard compiler included in Eclipse? I've searched through the package manager and don't seem to have any of the JDKs installed...
Note: running 'javac' in the terminal doesn't work.
If you download Eclipse from eclipse.org, it will bring everything it needs to work with it.
Eclipse is designed to be a standalone package which only minimally uses the components of the system on which it runs. This helps to provide the same experience everywhere.
On the down side, it makes Eclipse larger and more RAM-hungry, and also makes keeping Eclipse up-to-date a separate chore from keeping the rest of your system current.
You can see what Eclipse is using by going into your project build settings. It may be using its built-in compiler, which lets it easily highlight errors, rapidly do incremental builds, and such.
For what it's worth, the Java compiler included in Eclipse is a derivative of IBM's jikes compiler. It's not really so important what brand it is; what's important is that it is an incremental compiler; it sort of keeps your whole program inside itself and if you change a class (maybe even just a method) it will re-compile just the bit of code you've changed.
If you look at NetBeans, when you save a changed file it will call up an ant task to re-compile (via the JDK) at least the class you changed, maybe more. When your classes start to get bigger, you'll find (or at least I did) that this takes up a lot of time; I'm very happy with Eclipse (and IBM) for doing things the way they do. Without the external compilation step, code changes take place a lot more quickly.
Yes, the compiler has some differences compared to the "standard" compilers by Sun Oracle and OpenJDK. But I've never experienced a problem as a result. Still, for production use I'd recommend formally compiling using ant or maven and the JDK. Just to be on the safe side.
Eclipse, like unfortunately most substantial applications that require a JRE/JDK to run include it in the distribution.
For a good time on Lucid Lynx:
$ locate javac
You'll need to another source to the repository. Run the following commands.
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jdk
There's a package for eclipse called eclipse and the java compiler (javac) is in sun-java6-jdk
Install it with sudo apt-get install sun-java6-jdk or sudo apt-get install eclipse
Eclipse does come with its own compiler, but I wouldn't recommend using it for distribution of source code. I'm not intimately familiar with it, but I've been told that it doesn't perform optimizations as well as other compilers and there are some known bugs in it. I can't dig up anything that supports this, but I do like the idea of building using the same JDK/compiler and running on the same JVM that your users are.
I would suggest obtaining the Sun JDK for Linux. You should be able to get it from the Synaptic Package Manager if you open the universe repositories.
I'm trying to learn to use glassfish for the first time. My IDE is netbeans and I've installed the glassfish plugin for netbeans. I opened up synaptics package manager and typed in glassfish. My choices were
imqv2
glassfish-activaton
glassfish-mail
glassfish-appserv
glassfish-toplink-essentials
glassfish-jmac-api
glassfish-javaee
I'm not sure what is in each package, or which package are needed. I can't seem to find anything that tells me anything descriptive about these packages.
I've seen a lot of tutorials on how to install glassfish, but I'd prefer to use apt-get / synaptics to install glassfish so that syntactics can take care of updating.
To strictly answer your question, I think that a typical install would at least include glassfish-appserv, glassfish-javaee, glassfish-toplink-essentials (for JPA).
But for development, I'd warmly recommend to use GlassFish v3 (because of the session preservation across deployments feature, to maximize productivity) and to install it manually in your home directory. Download the self-extracting installer file from here.
Do you want to run the latest and greatest software? It looks like Synaptic has Glassfish version 2 which is an entire major version out of date.
Just for the record: I love Ubuntu and their (well, Debian's) package management system. However, for any Java applications, I prefer to do manual installations. So, my Maven, Eclipse, Tomcat, Glassfish, etc. were all done through manual installs for the newest version... and because sudo apt-get install winds up throwing the app in some weird place and can have unexpected behavior.
Here is how you can do a manual install...
Download Glassfish: wget http://download.java.net/glassfish/v3/nightly/latest-glassfish.zip
Extract the archive anywhere on your filesystem
Inside your IDE such as Netbeans or Eclipse, setup a new server and point it at where you extracted the file
It's also useful to add a new environment variable to ~/.bashrc file, which will make it easier to start the server from the command-line, e.g. $GLASSFISH_HOME/bin/asadmin start-domain domain1
Another cool thing to try, if you're into maven, is to use the maven-embedded-glassfish-plugin. It's a clean way to get a web app up and running and not need to manually install glassfish and not even have to use an IDE.
You might also try asking this question at superuser.com if you really want to get it working with Synaptic.
i dont know if this here is still open...
but if you know how to handle shell commands on ubuntu then you might find this here helpful:
http://www.nabisoft.com/tutorials/glassfish/installing-glassfish-311-on-ubuntu