This is just in case I loose this reference.
I had an error with my Ivy dependencies which reported "org.eclipse.persistence#org.eclipse.persistence.jpa;2.2.0: not found". It took me a while to find it but this post on Stack-Overflow helped.
It means that the standard Maven repositories do not hold this JAR so I have connected to the Eclipse Maven repository @ http://download.eclipse.org/rt/eclipselink/maven.repo/.
How?
Well my ivysettings.xml has this setting in it <ibiblio name="Eclipse-libraries" m2compatible="true" root="http://download.eclipse.org/rt/eclipselink/maven.repo/" /> and looks like this:
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<ivysettings>
<properties file="${ivy.settings.dir}/ivysettings.properties"/>
<settings defaultResolver="embedplaysafe" />
<!-- Where the Cache is placed -->
<!-- <caches defaultCacheDir="${ivy.settings.dir}/ivy-cache" /> -->
<caches defaultCacheDir="${defaultCache.dir}" />
<resolvers>
<!-- Path is important as this is the final repository -->
<chain name="embedplaysafe"
returnFirst="true"> <!-- if a revision is found in the filesystem then ivyrep will not be queried -->
<!--
It is a filesystem resolver, so looks at a directory structure to retrieve the artifacts.
This one is configured to look in the repository sub directory of the directory that contains the ivysettings.xml file
-->
<filesystem name="local">
<artifact pattern="${repository.dir}/[type]/[artifact]-[revision].[ext]" />
<ivy pattern="${repository.dir}/[type]/[module]-[revision].xml" />
</filesystem>
<!-- See http://www.buildmeister.com/articles/escape_from_jar_hell_with_apache_ivy_the_agile_dependency_manager -->
<!--
<url name="buildmeister">
<ivy pattern="http://m2.buildmeister.com/[module]/[revision]/
ivy-[revision].xml" />
<artifact pattern="http://m2.buildmeister.com/[module]/[revision]/
[artifact]-[revision].[ext]" />
</url>
-->
<!-- See http://stackoverflow.com/questions/1033859/ivy-via-nexus-proxy -->
<!-- It looks in the ibiblio maven repository to retrieve the artifacts. -->
<!-- -->
<ibiblio name="uk-libraries" m2compatible="true" root="http://uk.maven.org/maven2" />
<ibiblio name="global-libraries" m2compatible="true" usepoms="true" />
<ibiblio name="Eclipse-libraries" m2compatible="true" root="http://download.eclipse.org/rt/eclipselink/maven.repo/" />
</chain>
</resolvers>
</ivysettings>
I hope this helps you.
Tuesday, 19 June 2012
Monday, 18 June 2012
Java 7 classpath broken on Windows XP
Please file under "for F*cks sake!!!"
It seems that the ability to assign a wild card as a class path when setting up a Java comand-line script is broken for Java 1.7 and windows users (On XP certainly).
Previously you could type ....
WHICH would do the trick now you have to add a magic character to make it work.
SO the command becomes
Just file under GRRRR!
Or see this handy post by someone far less annoyed than I am.
http://stackoverflow.com/questions/9195073/broken-wildcard-expansion-for-java7-commandline-on-windows7
It seems that the ability to assign a wild card as a class path when setting up a Java comand-line script is broken for Java 1.7 and windows users (On XP certainly).
Previously you could type ....
java -cp "somewhere/*"WHICH would do the trick now you have to add a magic character to make it work.
SO the command becomes
java -cp "somewhere/*;"Just file under GRRRR!
Or see this handy post by someone far less annoyed than I am.
http://stackoverflow.com/questions/9195073/broken-wildcard-expansion-for-java7-commandline-on-windows7
Thursday, 31 May 2012
Version Numbering
So many times I hear developers arguing about how to label versions so here is the "right" way to do it ... well a widely accepted way!
Major versions are incompatible at the API level, as they can include any kind of change.
Minor versions are compatible with older versions at the API and binary level, and they can introduce new functions or deprecate old ones.
Patch versions are perfectly compatible, and they are released to fix defects.
Here are some examples to demonstrate the compatibility:
| Original Version | New Version | Compatible? |
|---|---|---|
| 2.2.3 | 2.2.4 | Yes Compatibility across patch versions is guaranteed. |
| 2.2.3 | 2.2.1 | Yes Compatibility across patch versions is guaranteed. |
| 2.2.3 | 2.3.1 | Yes Compatibility with later minor versions is guaranteed. |
| 2.2.3 | 2.1.7 | No Compatibility with prior minor versions is not guaranteed. |
| 2.2.3 | 3.0.0 | No Compatibility with different major versions is not guaranteed. |
| 2.2.3 | 1.4.7 | No Compatibility with different major versions is not guaranteed. |
Patch Versions
To retain perfect source and binary compatibility, a patch release can only change function implementations. Changes to the API, to the signatures of public functions, or to the interpretation of function parameters is not allowed. Effectively, these releases are pure bug fix releases.Minor Versions
Minor releases can introduce new functions, new symbolic and enumerated constants, and deprecate existing functions. In practice, this will not be a problem since upgrading to newer versions is always safe.Major Versions
Any kind of change can be made during a major version release. Particular types of changes that might occur:- remove or change constants
- remove (deprecated) functions
Minor Versions
Minor Versions
Minor
Data Replication for Stores
(Extract from an article on Oracle's Blog)
A tough problem for store systems is reliably moving data between the home office and stores in both directions. There are many solutions to this problem, each with its own positives and negatives. One solution is using the open-source software SymmetricDS, which was created for this very problem during the Oracle Retail POS implementation at BigLots. The original developers formed JumpMind, a company specializing in helping retailers use open-source to solve difficult problems.
SymmetricDS is an open-source, web-enabled, database independent, data synchronization software application. It uses web and database technologies to replicate tables between relational databases in near real time. SymmetricDS is database agnostic and can even synchronize data between different types of databases.
The idea of SymmetricDS came from the need to synchronize many small, inexpensive databases at stores to a single, large, more expensive one at a corporate location. We needed something that would trickle sales data over a slow network and survive outages
It is possible to host SymmetricDS under Tomcat but it runs very nicely under Jetty as a single command line task.
(More..) (And on facebook...)
A tough problem for store systems is reliably moving data between the home office and stores in both directions. There are many solutions to this problem, each with its own positives and negatives. One solution is using the open-source software SymmetricDS, which was created for this very problem during the Oracle Retail POS implementation at BigLots. The original developers formed JumpMind, a company specializing in helping retailers use open-source to solve difficult problems.
SymmetricDS is an open-source, web-enabled, database independent, data synchronization software application. It uses web and database technologies to replicate tables between relational databases in near real time. SymmetricDS is database agnostic and can even synchronize data between different types of databases.
The idea of SymmetricDS came from the need to synchronize many small, inexpensive databases at stores to a single, large, more expensive one at a corporate location. We needed something that would trickle sales data over a slow network and survive outages
It is possible to host SymmetricDS under Tomcat but it runs very nicely under Jetty as a single command line task.
(More..) (And on facebook...)
Log4j - Tricks
This post will grow as I find more little tricks and gotchas...
Log4j manual...
- Changing the timestamp format in the appender.
Add %d{dd MMM yyyy HH:mm:ss,SSS} sooner than just %d and then edit the bits out you don't like.
Log4j manual...
Wednesday, 23 May 2012
"Cmd here" in windows 7
In Win XP I found very useful the power toy CmdHere to open a command
window in the current folder.
Q: So what is the equivalent in Windows 7?
A: Hold the Shift key down while right-clicking. You should see an entry "Open Command Window Here" appear.
Q: So what is the equivalent in Windows 7?
A: Hold the Shift key down while right-clicking. You should see an entry "Open Command Window Here" appear.
Wednesday, 7 March 2012
Facebook Share button
| An example of the share button |
If you want to add a share button to your site all you need to do is add a small amount of script.
Simply add:
<a name="fb_share"></a>
<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share"
type="text/javascript">
</script>
and you're done!Look at the developer information for more details.
However it can sometimes go wrong and you don't see the text you expect.
According to Facebook, it scrapes your page every 24 hours to ensure the description (and other share data) are up to date. However, you can manually refresh it by entering the post URL into the Facebook URL Linter. Entering your url onto this page will cause Facebook to update its cache of your page and you will get a diagnostic of what Facebook sees when they look at your page.
This would be great except Facebook are deprecating the share button in favour of like ...
Subscribe to:
Posts (Atom)