How do I set where my grails plugins should be installed? - windows

I saw the light and install the joda-time plugin for grails.
However, when I tried to commit my changes to source control I realised that grails had located the files in:
C:\Users\Steve\.grails\1.1.1\plugins
instead of somewhere under the project directory of:
f:\grails\projects\myproject
Yeah I'm using windows :-\
So now when someone pulls down my changes from source control they are missing all the joda-time plugin lovelyness and they are wanting to spank me :)
What should I be setting so that grails doesn't put anything under my user directory?
(It isn't installed as a global plugin - just as a project one - at least I think so, I ran "grails install-plugin joda-time" )
Many thanks in advance.
P.S. Currently listening to Plug In Baby by Muse....how coincidental :D

The plugin is listed in application.properties, so when someone gets your code Grails will install missing plugins the first time they run 'grails run-app' or other commands.
If you want to revert to 1.0.x behavior just create grails-app/conf/BuildConfig.groovy with the line
grails.project.plugins.dir='plugins'
and your plugins will be in with the rest of the project files.

Related

gradle-wrapper.properties not found after clean install intellij idea 2020.1.2 community edition on windows 10

Installed clean windows10(1607) and intellij idea(2020.1.2 community edition). When i create new gradle project
Invalid Gradle JDK configuration found. Open Gradle Settings
"gradle-wrapper.properties not found".
How can I fix it?
Install gradle 6.7
sdk install gradle 6.7
brew install gradle
Go to IntelliJ and set gradle version:
On File >> Settings >> Build, Execution , Deployment >> Gradle
or
Preferences >> Gradle
In Use Gradke from specific the correct location
If IDEA is set to use the Gradle wrapper (as it is in your screenshot: "Use Gradle from:" is set to "gradle-wrapper.properties"), IDEA expects the following file structure:
Gradle wrapper JAR: [project root]/gradle/wrapper/gradle-wrapper.jar
Gradle wrapper properties: [project root]/gradle/wrapper/gradle-wrapper.properties
Gradle wrapper script: [project root]/gradlew.bat
If you are missing one of these three elements, IDEA will attempt to generate the wrapper by calling the gradle wrapper task. It will do this using the Gradle JDK, which may or may not be the project SDK (File > Settings > Build, Execution, Deployment > Build Tools > Gradle > Gradle JVM).
I'm not sure how it selects the version of Gradle it uses - I only have 6.8.3 installed on my machine, and I had my wrapper properties set to 7.0-rc-1, yet somehow it used 6.7.0 when generating the wrapper.
I tried various options for clearing the cache, but did not get the result.
Openjdk-14 installed by default and does not work. From site adoptopenjdk.net install OpenJDK 11 (LTS). When creating the project, I chose 11 version. Then the program suggested updating gradle to version 6 and it worked.
I ran into this problem a while ago when I upgraded to intellij 2020.* The first time I created a new project there was no problem: gradle daemon did its work and the project was created with no problems.
In my case, the project would start a new gradle daemon, and attempt to build the project, would get rejected by windows Security, and nothing would happen, so intellij goes ahead and starts another (unsuccessful) daemon. Soon, I had 20+ gradle daemon processes running on my system, all of them doing nothing.
So, it looks like intellij has messed in enabling that it places the appropriate permissions it requires for these folders that it depends on to run properly. So, you need to manually give these permissions, and then things (should) work.
The real issue here is security on your machine: either a virus checker or the security software, Windows Security on Windows 10, for example. The first time you make a project, Intellij goes and produces a number of folders that they need access to.
However, once these folders are available, for whatever, intellij doesn't make sure to give itself access.
On windows 10, in AppData, you'll find several folders required by Intellij to produce, in my case, produce gradle projects.
Try finding the various folders that Intellij has produced on your system, and give them exceptions on your virus checker and on whatever firewall/security software programs that may block access.

Update Dspace 4.2 installation directory from source

I'm new to this repository, I already installed it and it is working fine on Ubuntu 14.04. Now I want to personalize it and I've found everywhere that to avoid losing your customizations, you should place them in [dspace-source]/dspace/modules/xmlui/src/main/webapp/themes (I'm choosing xmlui since that is the interface I'm using and themes because that is the only customizations I want to do for now) and then you should do a mvn package from [dspace-source]/dspace for it to apply the changes to the installation directory ([dspace]). I have done this but the new theme I created doesn't appear in the installation directory. Should I do an ant update after the mvn package? Am I missing something for the documentation?
Thanks for the help!
You are correct. mvn package will build the code in dspace-source/target. ant update will copy the code from dspace-source/target to your installation directory. The maven build is generic and does not know your configuration settings. The ant task will read your configuration settings (which contain the install path).
After running ant update, you should restart tomcat.
Because the maven/ant cycles can take some time, I will occasionally make changes to uncompiled files (xsl, js, css) on the source branch and then copy them directly to the install branch.
Beware of making changes directly in the install branch since it is easy to overwrite with the ant command.
The cocoon layer of XMLUI does cache some files. If you make a change and it does not seem to take effect, sign in with an admin login and go to Administrative->Java Console->Clear Cache to force a change to be reloaded.

Launching Ruby-Cucumber from IntelliJ (OSX)

I am in a new job and am using IntelliJ with Ruby and Cucumber.. all of which are new to me.
I have a working project based upon this project: https://github.com/jonathanchrisp/selenium-cucumber-ruby-kickstarter
So, from the command line, I run my project like this:
sudo cukesparse something
cukesparse is not my project but here is a quick description from github: "A simple command line parser to pass default and custom arguments into Cucumber with the power to define these as tasks in a config/tasks.yml file!"
(seems interesting enough to me)
So, from the command line I am able to execute this project without any problems. I am also able to "Build > Rebuild Project" without issue.
My question is regarding getting a Run Config to work. I have tried to go to Run > Edit Configurations, but have had no luck creating a config to start my run. When I try to click Ruby from the list of 'base configurations', IntelliJ doesn't seem to want me to pick it. The UI sort of doesn't respond.
I must be stuck with some obvious newbie booboo. Any tips greatly appreciated!
Which version of IntelliJ are you using? And do you have the Ruby and Base Cucumber plugins installed in IntelliJ? (From Intellij -> preferences -> Plugins). If not, the first step would be to install those.
Then you can create a run configuration by Run > Edit Configurations, selecting the required details. If you have further issues, a screengrab of your configuration (from Run > Edit Configurations) would be helpful.
I didn't ever get to the bottom of exactly what the issue was, but completely removing IntelliJ (using the comment from Jenny here: In IntelliJ on OS X, how do you clear out all global setting info, licensing etc. (external to any project)) and reinstalling with a very minimal plugin set fixed it. I basically only enabled the git plugin, then got the ruby plugin from the repository and no other plugins.
I did need to add the cucumber gem from the command line but that didn't turn out to be part of the problem. Something about the plugins I had selected was making some of the Run Configurations not function.

how to force maven to update local repo

I compiled a jar file in one project so it can be consumed in the 2nd one. I can see the jar file in .m2 folder. But in the 2nd project it complains about artifact not found.
I guess I have to force maven to update indices/cache something but don't know what exactly. Any tip, thanks.
Update: thanks for all good suggestions.
Turns out that the maven plugin (of IntelliJ) in the second project doesn't update its index. I use command line it compiled ok.
try using -U (aka --update-snapshots) when you run maven
And make sure the dependency definition is correct
You can also use this command on the command line:
mvn dependency:purge-local-repository clean install
If you are installing into local repository, there is no special index/cache update needed.
Make sure that:
You have installed the first artifact in your local repository properly. Simply copying the file to .m2 may not work as expected. Make sure you install it by mvn install
The dependency in 2nd project is setup correctly. Check on any typo in groupId/artifactId/version, or unmatched artifact type/classifier.
Even though this is an old question, I 've stumbled upon this issue multiple times and until now never figured out how to fix it. The update maven indices is a term coined by IntelliJ, and if it still doesn't work after you've compiled the first project, chances are that you are using 2 different maven installations.
Press CTRL+Shift+A to open up the Actions menu. Type Maven and go to Maven Settings. Check the Home Directory to use the same maven as you use via the command line
Click settings and search for "Repositories", then select the local repo and click "Update". That's all. This action meets my need.
If you are struggling with authenticating to a site, and Maven is caching the results, simply removing the meta-data about the site from the meta-data stash will force Maven to revisit the site.
gvim <local-git-repository>/commons-codec/resolver-status.properties

eclipse plugin won't install any more

I received a new version of a plugin of a project I work in collaboration with other people.I copied it over the old version in the /plugin directory. Eclispe (3.7.2 on Win7) ignored the plugin (don’t show up in the Help/About Eclipse/Installed Plugins). I put the old version back (I put an “_old” at the end of the .jar file) and it worked again but the plugin’s command in the menu appeared with a “%” character at the beginning. After some more copying of old/new version in the /plugin directory, even the old plugin won’t install. I put back an acient original version of the plugin, but still not working. It just stop suddenly working. I checked my permissions on the /plugin directory, started Eclipse as an administrator, but no success.
Thanks.
First of all you should put both versions in plugins directory only if they have different versions in plugin.xml definitions but even in this case only one of them probably will be active i.e. will add its contributions to Eclipse. You should use copy/paste actions to provide additionals to Eclipse carefully, plugins and features directories are not supposed for manual usage. To manage your plugins easily follow the dropins directory usage. For now the best you can do is to remove all versions of your custom plugin and run Eclipse to the clean workbench.

Resources