Nov 20, 2011

Override pom from command line

Hi Everyone,

I had this scenario but my solution catch them all.
I had this <skipTests>true</skipTests> in my pom.
Trying to "mvn -DskipTests=false test" => not good, it doesn't override the pom.

Solution:
Define a property like this
  <skip.my.tests>true</skip.my.tests>
Add it to the <properties> section

In the above example, i will replace it and it will look like this <skipTests>${skip.my.tests}</skipTests>

This is the solution for all the thing you want to override from command line.

Hoped it helped,

Dor

Sep 21, 2011

getResponseCode() Illegal character in URL

2 Hours i have spent on this.

String key = base64encode(password);

What's solved me the issue was this "key.replaceAll("\r\n?", "");"

Hoping that it will assist you too and save you the time i already spent,

(The base64encode method based on apache-commons base64encoder)

Dor

Sep 18, 2011

FTPClient completePendingCommand() deadlock stuck freeze

It's strange, that this method hangs or freeze for this method.

I used commons-net 2.2v, don't know if it already solved at 3v. But, i have found that my problem was:
Executing this method before closing the input stream.
Switching them, first closing the input stream and then running completePendingCommand() solved the issue.
+
There are some cases where this method isn't really necessary, beware.

Hoped it helped,
Dor

Sep 12, 2011

quartz cron expression

Lately i looked over the web for cron expression maker or validations, thought to my self that if it doesn't exists already, i will write something. That will help us all. 

So , i have found it, it is here http://www.cronmaker.com/

Nice 1,

Dor

Aug 23, 2011

the project does not have any gwt sdks on its build path

Strange when this occurs although everything is configured well, build path as well as maven pom.xml file.
The solution i have found here is working.


Bye,
Dor


Group not found: launchGroup

Happened to me in eclipse, unable to compile my project although it's not the issue.
I have found that in the work space directory there is a file named ".lock" in which eclipse creates.
After exiting Eclipse -> Deleting this file -> Entering again to eclipse -> Trying to compile the project succeeded.


See ya,

Dor

Aug 7, 2011

unable to find valid certification path to requested target

Hi,

The issue: You are probably missing the certificate for the specific site you work with.

Solution: You need to add export the certificate for the site mentioned above, After exporting it, add it to the cacerts file of java (default file) which located usually here : "c:\Program Files\Java\jdk1.6.0_23\jre\lib\security".
(the default java password for this file is 'changeit').

* If you need the export procedure, tell me, it's simple i can guide you.

In the code, add this lines :

System.setProperty("javax.net.ssl.trustStore", "path_to_cacerts_file/cacerts"); // for example c:\cert\cacerts
System.setProperty("javax.net.ssl.trustStorePassword", "changeit"); //unless you change it


You can also create your own certificate storage file and direct java to it instead.

Helpful link to keytool can be found here.