I am using Grails 2.3.2 with GGTS and am doing development on two different machines (Mac and Windows). Each time I commit my project from one machine and update the other I have to refresh my dependencies. Is there a way I can set this to some sort of relative path? That way it doesn't have to change each time I do an update from my repository.
It seems that a full path is being included in my .project file as shown below.
<linkedResources>
<link>
<name>.link_to_grails_plugins</name>
<type>2</type>
<location>C:/Users/michael/workspace/myproject/target/work/plugins</location>
</link>
</linkedResources>
I changed it manually in the file, but GGTS seemed to change it back when I did the refresh. Has anyone else run into this problem?
After some looking around it looks like I can specify a path relative to my workspace using the WORKSPACE_LOC and building up a path relative to that within my .project file.
<linkedResources>
<link>
<name>.link_to_grails_plugins</name>
<type>2</type>
<location>WORKSPACE_LOC/myproject/target/work/plugins
</location>
</link>
</linkedResources>
The better is to not commit files generated by the GGTS and that are S.O. dependent.
If you're using git, there's a command to generate the file:
grails integrate-with --eclipse
If not, you can see the git file and ignore those files in the SVN.
Related
I have set up Guacamole 1.2.0 on Ubuntu server 20.04 which works great. Is it possible to bypass the login page in Guacamole 1.2.0 using the auth-noauth component from a previous Guacamole release? The release notes in 1.2.0 say the older components are compatible. I used guacamole-auth-noauth-0.9.14.tar.gz, but I still get the Guacamole login page come up.
This is what I did.
Downloaded guacamole-auth-noauth-0.9.14.tar.gz
Extracted the .jar file using tar xzf guacamole-auth-noauth-0.9.14.tar.gz
Copied the file guacamole-auth-noauth-0.9.14.jar to /etc/guacamole/[extensions,lib]
Amended my guacamole.properties file to:
guacd-hostname: localhost
guacd-port: 4822
user-mapping: /etc/guacamole/noauth-config.xml
auth-provider: net.sourceforge.guacamole.net.auth.noauth.NoAuthenticationProvider
noauth-config: /etc/guacamole/noauth-config.xml
Created a new noauth-config.xml file with the contents
<configs>
<config name="myconfig" protocol="rdp">
<param name="SVxxxx01" value="rdp-server" />
<param name="port" value="3389" />
</config>
</configs>
I then copied guacamole-auth-noauth-0.9.14.jar to the classpath directory I created cp guacamole-auth-noauth-0.9.14.jar /var/lib/guacamole/classpath
Any advice and tips to bypass the login page will be appreciated.
You should check if the plugin is correctly loaded. The tomcat logs (catalina.out) should write something like
"INFO o.a.g.extension.ExtensionModule - Extension "My guacamole extension" loaded.".
If it is not loaded, check if the location of the plugin is correct. Normally, the plugins are located in GUACAMOLE_HOME/extensions directory. You may see the default values for GUACAMOLE_HOME here: https://guacamole.apache.org/doc/gug/configuring-guacamole.html
I usually create extension directory in ~tomcat/.guacamole/extensions, but you should be fine with any other location specified in the documentation.
Sure enough changing the version of the extension worked! guacamole-auth-noauth-0.9.14.jar is not compatible by default but if you change the .jar extension to .zip, extract, edit guac_manifest.json to replace "0.9.14" with "1.2.0", re-zip (or replace), and optionally rename the whole thing guacamole-auth-noauth-1.2.0.jar (to avoid confusion) you end up with a working extension provided all other standard configuration steps are followed as well.
I am currently going through a tutorial on Pluralsite on how to build a web app. The instructor wants me to install 'underscore' and 'jquery' using 'Bower'. I added bower and edited the bower.json file to add underscore and jquery however both have failed to install and I am not sure why.
I also added them via nuget and that works however I am not sure how to reference the nuget packages in my index.html file. Everything I have read seems to indicate that bower is the better option but at this point getting it to work either way would make me happy.
Without any real detail in your post you can check the following but this may differ a bit. But it's not clear if you actually see an error or whether you just can't see the files?
In Visual Studio 2015 if you open the .xproj file using a text editor you should see the following entries:
<ItemGroup>
<DnxInvisibleContent Include="bower.json" />
<DnxInvisibleContent Include=".bowerrc" />
</ItemGroup>
If you're using VS 2017 then Right Click your Project and click "Edit .csproj" and if you see anything similar to below your bower file is in the wrong location for the default setup:
<ItemGroup>
<Content Include="wwwroot\.bowerrc" />
<Content Include="wwwroot\bower.json" />
</ItemGroup>
Your bower.json should look like this:
{
"name": "asp.net",
"private": true,
"dependencies": {
"underscore": "~1.8.3"
,"jQuery": "~3.2.1"
}
}
When you save the bower.json file it will automatically get the packages.
It sounds to me like you already know this though and the actual getting of the package is failing. Do you know this because there is an error message or because you can't see the files? If you can't see the files check the wwwroot folder for a lib folder or another wwwroot folder and a lib folder within that.
If you have added the bower configuration file to a different location to the base of the project you may end up with the files in a wwwroot folder and the lib folder inside that from where your config file resides.
To use this file in your HTML you add a script tag or find the file in your Solution Explorer window and drag it into your HTML file when it is open and Visual Studio will automatically create the correct script tag and location for the file:
<script type="text/javascript" src="lib/jquery/dist/jquery.min.js></script>
If you look at jQuery in "Manage NuGet Packages" you should see it says "Incompatible: Use Bower instead". But that doesn't stop you from getting it using NuGet and you can locate the files in "$(UserProfile).nuget\packages\" which should mean "C:\Users\.nuget\packages\jquery\3.1.1\Content\Scripts\jquery-3.1.1.min.js" is what you would need to include on your HTML page but browsers tend to block links to the file system now so you would probably be better off using:
<script src="https://code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script>
That doesn't resolve your issue because that file could be removed from the host and then your link would fail and therefore it's best to fix the root of the problem but you may need to add a bit more detail to your post to get a clear answer I think but the above may help a bit.
Do you have Git installed for windows?
Try installing Git and then restart visual studio.
I ran into this problem when updating from VS2015 to VS2017.
You should see a folder called 'lib' after you've installed underscore.js.
Hope this helps!
Not sure if you are still having issues with this but it looks like this was a bug in Visual Studio 2017. I was having this same issue on the same tutorial.
Microsoft has since fixed it with their latest release of Visual Studio 2017 (15.3).
Update to the current version and then re-add the packages using bower and it should work correctly.
The bug has returned in VS 2019. Trying to install via NuGet the Jquery packages and I get the Incompatible. Use Bower instead.
My system default to the Locale: "iw", I created a few Locale files:
messages_iw.properties,
messages.properties
I check that grails indeed change the language file depending on the system locale and it did.
after this test i deleted the first file(messages_iw.properties) and lunched the grails server again (With IntelliJ + tomcat 8).
For some reason grails still referencing the file that i DELETED! how is it possible? i looked for this file everywhere and it doesn't exists. why does grails use a file i already deleted?
They're probably cached in a subdirectory of the target directory. Run
grails clean
and you should be all set; if that doesn't work, delete the entire target directory.
I’ve added a GRAILS_HOME environment variable, which points to the folder in which I extracted the Grails distribution zip, and I’ve added %GRAILS_HOME%\bin to my path. Yet after I open a new command prompt, the “grails” command is still not found. Does anyone have any clue as to why this is happening?
I’m running Grails 2.2 on Windows 7.
I have the same problem on Windows 7 64 bit and Grails version 2.*
By removing local neither maven repository nor installed plugins repository doesn't help.
I found - just set properties of %GRAILS_HOME%/bin/grails.bat and startGrails.bat as Run in compatibility mode: Windows XP (Service Pack 3).
To do that You need to have local PC Administrators rights.
/igors
have you create JAVA_HOME in there?
Maybe you are experiencing [STS-2530] Problem deploying Grails App if workspace path has a space. Jira shows the issue as resolved but it would not hurt to check that you do not have a space in your workspace path as it my trip up grails.
Do the following.
Go to your command prompt, execute the Path command. If everything has been set right your paths should show up as complete paths starting with C:... If the paths show up with the % sign that means your paths need to be set correctly. I did noticed that in your example you have used the forward slash - I am assuming that is a typo, because that will be a problem.
Another way to trouble shoot the issue is CD to the location C:\Grails\bin, execute the command grails.bat, if it executes you are in a good place that means you have to tweak your paths - following this path might give you a clue about other issues....
You might want to check the bin folder of your grails installation. The grails.bat file could be missing. I had this problem today and solved it by downloading the zip file again.
When managing a grails plugin in Intellij Idea (I'm using version 10.5.2 on OSX, if it matters), I can't get it to add the *GrailsPlugin.groovy file to the classpath in a way that it can be recognized by unit tests run from the IDE. The tests run fine from the command line using grails test-app; I just want IDEA to be able to run them too.
The problem is that the *GrailsPlugin.groovy file is at the top level directory in the plugin, which is not marked as a source directory in IDEA. I definitely don't want to make it a source folder, since that will screw up lots of things such as the package path to all of my regular source files (amongst many other issues).
I've tried adding *GrailsPlugin.groovy to my Settings->Compiler Resource Patterns, but to no avail. Since the file isn't in a source folder, it's ignored.
I tried creating a source folder that has a symlink to the *GrailsPlugin.groovy file, but that introduces all kinds of synchronization issues.
Anyone have any ideas?