Gradle new plugin installation - plugins

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.

Related

Error when importing Grinder to Eclipse: No marketplace entries found to handle clojure-maven-plugin

I want to import the Grinder(java load testing tool)into eclipse as a new project.
These are my environment:
Win7 64bit
JDK 1.6 32bit
eclipse-java-luna-SR2-win32
These are my steps:
Eclipse--import from git uri ,I used the git link that provided by official
Eclipse--File--Import--Maven--Existing Maven Projects,I use the directory which contain the source files that just downloaded by git
Then Eclipse started to build and handle the dependency,when the process is over,Eclipse gave the error info:
” No marketplace entries found to handle clojure-maven-plugin:1.3.15”
I don’t modify the pom file ,and use the default maven plugin of Eclipse:m2e.I don’t install the maven and other library.
I try to delete “C:\Users\g.m2\repository”,and redo these steps ,however,it doesn't work.
Plz help me,thanks!
Not sure what is the purpose. Are you planning to develop/enhance the grinder tool. If yes, then probably you should connect to its developers in the grinder site.
And if you are planning to use the tool and trying to configure eclipse for the scripting purpose, your should try Grinderstone. Note that it is outdated and works only with the specific version of software. Otherway, you can use pydev in the eclispe for scripting but you can't run there.
Hope it helps..

how to create build steps in Eclipse?

I am trying to add build steps in an Eclipse project (Eclipse CDT Version: 3.8.0 on Debian).
For instance, when instructing Eclipse to build it would:
1- Run premake
2- Run make
You get the gist.
There's 0 tutorials on the subject and I looked everywhere... Is it because this feature doesn't exist? That's hard to believe...
There is no tutorial for Eclipse build :D
May be you want to build your project? Correct me if I am wrong.
As I know, Eclipse supports us to use Ant build to build/ execute the build step for projects (not for Eclipse itself) => build.xml
And If you really want to do some things else, i think create a bat file. and then execute it when start Eclipse is a suggestion.

Using sudo to install maven projects

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.

Gaelyk eclipse configuration error

I've tried to configure a gaelyk project in eclipse using the gradle script of the template project and always failed.
to do this I use the following command:
gradlew cleanEclipse eclipse
All the packeges seems correctly downloaded, the .project and .classpath files are created but I always fint this error on the project:
The App Engine SDK 'C:\Users\username\.gradle\caches\artifacts\com.google.appengine\appengine-api-1.0-sdk\c12498cf18507aa6433a94eb7d3e77d5\jars\appengine-api-1.0-sdk-1.6.1.jar' on the project's build path is not valid
(SDK location 'C:\Users\username\.gradle\caches\artifacts\com.google.appengine\appengine-api-1.0-sdk\c12498cf18507aa6433a94eb7d3e77d5\jars\appengine-api-1.0-sdk-1.6.1.jar' is not a directory)
It seems that the appengine SDK is specified uncorrectly in the .classpath/.project files.
I've installed eclipse Indigo and the last version of the google plugin for eclipse
How can I fix it?
I am personally not using Eclipse for Gaelyk development. Therefore, I am not sure if the existing Eclipse configuration in the Gradle build script of the template project will work with the Google plugin.
However, a while ago I got a pull request for the Gradle GAE plugin to integrate with the Eclipse plugin. I had turned it down because it's too specific and it would lead to potentially a lot of bugs to the Gradle plugin as the Google configuration might change. The author was planning to creating a separate plugin for it so you can try to ping him.
I also know of another Gradle plugin that might help you here. Also try to post your question the Gaelyk mailing list.

Custom Eclipse packages

I would like to make an offline Eclipse installation with JDT, CDT and a few other plugins. This is what I would like to do, in decreasing preference:
Create an installation package similar to the ones available for download on the Eclipse website. Question: How can this be done? How are they created? Is there some kind of automated tool that gets the packages from p2 repositories and builds them? Is there a detailed explanation somewhere of how they are created? (I am aware of Yoxos, but that is a few versions old)
Do the installation on an internet-connected computer, and then copy the folder to another computer. Question: Can this be done? Will a simple Copy/Paste work correctly? Is there anything I can delete from the installation that will be automatically recreated?
Use an Eclipse package, say JDT, and a downloaded copy (zip file?) of the CDT and other plugins, and install them on the target machine using the standard Eclipse plugin installation from a local archive method. Question Where can I get these downloads?
The simplest approach you could use is to start from the eclipse "classic" package downloaded directly from the site, and then manually install the other components you need via update manager. You can then zip the eclipse directory and distribute it without any problem.
Otherwise you could try to use Yoxos to create your package, download and distribute it