Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » UOMo » UOMo Examples
UOMo Examples [message #650241] Sun, 23 January 2011 16:09 Go to next message
Werner Keil is currently offline Werner KeilFriend
Messages: 1083
Registered: July 2009
Senior Member
Using the Maven Exec Plugin from Codehaus is a rather convenient way to
execute UOMo Units Console Examples or similar examples to follow.

Go to the Units Console Examples project folder.
E.g.:
~\workspace\units\org.eclipse.uomo\examples\units\org.eclips e.uomo.examples.units.console
And run:
mvn exec:java -Dexec.mainClass="<Full Class Name>"
E.g.:
mvn
exec:java -Dexec.mainClass="org.eclipse.uomo.examples.units.console.HelloUnits "

Result:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------ ------------
[INFO] Building UOMo Units Console Examples 0.1.0.SNAPSHOT
[INFO] ------------------------------------------------------------ ------------
[INFO]
[INFO] --- exec-maven-plugin:1.2:java (default-cli) @
org.eclipse.uomo.examples.units.console ---
10 m
m
3.048
393.7007874015748 fuß
100.0 m²
[INFO] ------------------------------------------------------------ ------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------ ------------
[INFO] Total time: 1.990s
[INFO] Finished at: Sun Jan 23 21:37:13 IST 2011
[INFO] Final Memory: 5M/15M
[INFO] ------------------------------------------------------------ ------------

Note, the locale is German, otherwise you'll see "foot" or other localized
versions of corresponding units.

UOMo Documentation is going to be updated with a more detailed version of
this guideline.

Please feel free to comment or provide additional examples.
Re: UOMo Examples [message #650242 is a reply to message #650241] Sun, 23 January 2011 16:16 Go to previous messageGo to next message
Werner Keil is currently offline Werner KeilFriend
Messages: 1083
Registered: July 2009
Senior Member
Note, under Windows Vista or below you may see Unicode issues like this in
the Windows Command Line:
10 m
m
3.048
393.7007874015748 fu▀
100.0 m▓

An issue has been raised against Maven Exec Plugin, but it almost seems like
a problem of Windows, since the same plugin works perfectly fine in Eclipse
with M2E.
Windows 7 provides additional Encoding options to adjust, which Vista (at
least the versions I know) doesn't.

Please share your experience if you came across similar problems or know,
how to easily address it also under Vista?

Or just use Eclipse instead of the Command Line ;-)

Thanks,
Werner
Re: UOMo Examples [message #658122 is a reply to message #650241] Sun, 06 March 2011 17:58 Go to previous message
Werner Keil is currently offline Werner KeilFriend
Messages: 1083
Registered: July 2009
Senior Member
Please note, the minimum Java 6 version for UOMo Examples is 1.6_20.

Due to some JDK issues solved in recent versions especially the Maven build
or example goals may otherwise fail.
Previous Topic:UOMo Logo
Next Topic:Git Repository
Goto Forum:
  


Current Time: Sat Nov 29 08:00:41 GMT 2014

Powered by FUDForum. Page generated in 0.06455 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software