Thursday, March 28, 2013

Shutdown a remote windows desktop

If you are working on a remote windows desktop you can not power off the system...
Sounds like a good idea, because the machine you are working on is not under your control. But what if this machine is just in the next room and you know exactly what's going on?

Just create a desktop shortcut with the following command and you can power off windows very easy:

shutdown -s

Wednesday, March 13, 2013

Specify Maven environment on windows powershell

Here is just a smart snippet to specify the maven environment like PermGen or Memory space on windows powershell:
$env:MAVEN_OPTS="-Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m"
Simple but useful ;-)

Tuesday, January 1, 2013

Vaadin - url mapping and javascript files

If you are developing a Vaadin-based application and you are getting an error like this:

Failed to load the bootstrap javascript: ./VAADIN/vaadinBootstrap.js

you should have a look to your web.xml! Vaadin couldn't find the javascriptfile as expected.
Maybe you've defined some servlet-mapping that's not matching with the vaadin defaults. Just change your mapping to:
 
  simpleapp
  /*
 

and see if things are working correctly now. For more details see Vaadin ticket#10122

Monday, December 31, 2012

Eclipse behind proxy

If you are using Eclipse behind a proxy you will sometimes notice, that your network connection will fail although you have filled out your proxy settings correctly.
Especially when using the update center to install new software.
 Eclipse will try to establish the network connection but without any success.

But there is a simple solution for the problem. Just edit your eclipse.ini file (could be foound in the eclipse installation root directory) and append the following line:

-Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient

Restart eclipse and you will be happy ;-)

Thursday, August 2, 2012

Netbeans and maven: create custom goal

It's very easy to create and store a custom maven goal inside the Netbeans IDE for your projects. Maybe you want to have a goal for clean build but skip test's

  • Just right-click on the module you want to create the goal for and choose Properties
  • Navigate to the Actions tab and press Add custom...
  • Enter a name for your goal - e.g. clean build no tests
  • In Execute goals you can enter the maven-goals you want to execute: clean install
  • adding properties is quite simple: press Add -> and choose the one you need
  • you can also just input the properties you need in the textarea
This custom-action will be stored in the nbactions.xml of the corresponding module:

        
            CUSTOM-clean build no tests
            clean build no tests
            
                clean
                install
            
            
                true
            
        

Friday, July 27, 2012

Netbeans and maven: no single test execution

If you are using Netbeans in a maven build environment and got the problem that you cann't execute a single test you've probably specified the surefire 2.12 plugin... that's a bad idea :-)

Netbeans will prompt a:

No tests executed (0, 0)

The reason is, that this version of the surefire-plugin (2.12) has a bug and it's not possible to execute single tests or even single test-files.

See Surefire 2.12 cannot run a single test - JIRA for more information about the status of this bug.

The solution:
Quite simple - go back to surefire 2.11 :-)


        
          org.apache.maven.plugins
          maven-surefire-plugin
          2.11
        

Thursday, July 19, 2012

Netbeans Plugin: Copy and Paste History - quick review

The Copy and Paste Histroy - Plugin for Netbeans is imho a small but very very usefull extension you should install to the Netbeans IDE.
There is just one Key-Feature:  

Enable more than one entry to CopyNPaste

But that's a killer-feature in some cases ;-)

By pressing ALT-V instead of CTRL-V you will get a list of the last history-entries you have copied. Just choose the right one and press ENTER - and that's all.
Just have a look: