December 15, 2012

Maven command to attach source and javadoc

Filed under: Java — mariojump @ 8:23 am

The steps to have Maven attach source and Javadoc files are as follows.

First, edit pom.xml as shown in:

Then, run:

mvn package

December 1, 2012

Maven command to generate a jar file that includes dependencies

Filed under: Java — mariojump @ 8:12 pm
Here is a Maven command to generate a jar file that includes dependencies.
mvn assembly:assembly -DdescriptorId=jar-with-dependencies

According to the Maven documentation, assembly:assembly is deprecated, though.

November 24, 2012

“Database is locked” on SQLite

Filed under: Database,Java,SQLite,Uncategorized — mariojump @ 8:42 pm

An article below helped me remove SQLite’s “Database is locked” messages.

First, I added the following lines to all methods that use Hibernate.

For those non-Hibernate code, (plain JDBC codes), ensure it has something like:



“Database is locked” disappeared.

August 25, 2012

Maven – How do I skip the tests? -Dmaven.test.skip=true

Filed under: Java,Useful sites — mariojump @ 8:00 pm

At default, Maven runs JUnit tests.  There are occasions that we would like to skip JUnit tests.

Maven FAQ had answers.

By adding a command line parameter,


Maven skips JUnit tests.



can be used as well, according to the FAQ.




December 4, 2011

X11 Forwarding Fails When IPv6 is Disabled [Resolved]

Filed under: Ubuntu — mariojump @ 5:49 pm
Tags: , , ,

After disabling Ubuntu 11.10’s IPv6 by putting the following lines in /etc/sysctl.conf, I found that X11 Forwarding (ssh -X option) stopped working.
#Disable IPv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1

Ubuntu Forum had an exact same case and workaround.

So, I put the following lines in remoet host’s /etc/ssh/sshd_config file.

$ cat /etc/ssh/sshd_config


# Workaround to have X forwarding work when ipv6 is disabled
AddressFamily inet


It worked.

November 13, 2011

Linux rdesktop (Remote Desktop) with ClearType font smoothing enabled

Filed under: Linux,Ubuntu,Windows — mariojump @ 9:41 pm
Tags: , ,

I was looking for ways to make fonts look better in connecting to Windows from Linux via rdesktop.

The following page shows a great resolution/workaround.

$ rdesktop -u mywinusername -k en-us -g 93% -x 80 -r sound myhostipaddress

Two other options than -x 80 are shown in the page above, -x 81 and -x 8f.  (Refer to the page above.)



September 19, 2011

Maven 2.2.1 – [WARNING] repository metadata for: ‘org.apache.maven.plugins’ could not be retrieved from repository

Filed under: Java,XML — mariojump @ 10:22 pm

On Maven 2.2.1, I had trouble when executing, “mvn archetype:generate”, with the following errors.

[INFO] Searching repository for plugin with prefix: ‘archetype’.
[INFO] org.apache.maven.plugins: checking for updates from central
[WARNING] repository metadata for: ‘org.apache.maven.plugins’ could not be retrieved from repository: central due to an error: Error transferring file: Connection timed out
[INFO] Repository ‘central’ will be blacklisted

Finally, it turned out that the proxies section in settings.xml was not commented/uncommented properly. Windows XP Firewall or security software had nothing to do with the error.

August 27, 2011

Trang – Multi-format schema converter based on RELAX NG

Filed under: Java,Software Development,Ubuntu,XML — mariojump @ 10:53 am

Trang is a schema converter.

Install Trang on Ubuntu 10.04 LTS.
$ sudo apt-get install trang

This time, I used Trang to generate an XSD file from an XML file.

$ trang -I xml -O xsd InputXmlFile.xml OutputXSDFile.xsd

December 18, 2010

CVS Server Installation on Ubuntu Linux 10.04

Filed under: Linux memo,Ubuntu — mariojump @ 6:48 am

I installed CVS Server on Ubuntu 10.04.
CVS repository is copied from another machine, and it is placed in /opt/cvsroot .


# apt-get install xinetd
# apt-cache search git-cvs
# apt-get install git-cvs
# apt-cache search cvsps
# apt-get install cvsps

Edit /etc/xinetd.d/cvspserver .

# vi /etc/xinetd.d/cvspserver

The file now looks:

# cat /etc/xinetd.d/cvspserver
service cvspserver
port = 2401
socket_type = stream
protocol = tcp
user = root
wait = no
server = /usr/bin/cvs
server_args = -f –allow-root /opt/cvsroot pserver
disable = no

# /etc/init.d/xinetd restart

Ensure CVS server is running.

# netstat -tap | grep cvs
tcp 0 0 *:cvspserver *:* LISTEN 11676/xinetd

December 8, 2010

Ubuntu Screen Resolution on Toshiba Satellite Pro 4600 with Trident XP

Filed under: Linux memo,Ubuntu — mariojump @ 9:48 pm

I installed Ubuntu Linux 10.04 on Toshiba Satellite Pro 4600 with Trident XP 16MB video, which is about 10 years old.
At first, the screen resolution was 800×600 on 1024×768 LCD.

Finding the following entry, I made /etc/X11/xorg.conf as shown below.

Then, the screen resolution became 1024×768.

$ cat /etc/X11/xorg.conf
Section “Monitor”
Identifier “Configured Monitor”
Option “DPMS” “true”
HorizSync 30.0-60.0
VertRefresh 50.0-70.0

Section “Screen”
Identifier “Default Screen”
Monitor “Configured Monitor”
Device “Configured Video Device”
DefaultDepth 24
SubSection “Display”
Depth 24
Modes “1024×768” “800×600”


Next Page »

Create a free website or blog at