vraptor-biscotti-compiler

Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/

GroupId

GroupId

br.com.caelum.vraptor
ArtifactId

ArtifactId

vraptor-biscotti-compiler
Last Version

Last Version

4.0.0-RC1
Release Date

Release Date

Type

Type

jar
Description

Description

vraptor-biscotti-compiler
Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/
Project URL

Project URL

http://github.com/caelum/vraptor-biscotti-compiler
Source Code Management

Source Code Management

http://github.com/caelum/vraptor-biscotti-compiler

Download vraptor-biscotti-compiler

How to add to project

<!-- https://jarcasting.com/artifacts/br.com.caelum.vraptor/vraptor-biscotti-compiler/ -->
<dependency>
    <groupId>br.com.caelum.vraptor</groupId>
    <artifactId>vraptor-biscotti-compiler</artifactId>
    <version>4.0.0-RC1</version>
</dependency>
// https://jarcasting.com/artifacts/br.com.caelum.vraptor/vraptor-biscotti-compiler/
implementation 'br.com.caelum.vraptor:vraptor-biscotti-compiler:4.0.0-RC1'
// https://jarcasting.com/artifacts/br.com.caelum.vraptor/vraptor-biscotti-compiler/
implementation ("br.com.caelum.vraptor:vraptor-biscotti-compiler:4.0.0-RC1")
'br.com.caelum.vraptor:vraptor-biscotti-compiler:jar:4.0.0-RC1'
<dependency org="br.com.caelum.vraptor" name="vraptor-biscotti-compiler" rev="4.0.0-RC1">
  <artifact name="vraptor-biscotti-compiler" type="jar" />
</dependency>
@Grapes(
@Grab(group='br.com.caelum.vraptor', module='vraptor-biscotti-compiler', version='4.0.0-RC1')
)
libraryDependencies += "br.com.caelum.vraptor" % "vraptor-biscotti-compiler" % "4.0.0-RC1"
[br.com.caelum.vraptor/vraptor-biscotti-compiler "4.0.0-RC1"]

Dependencies

test (1)

Group / Artifact Type Version
junit : junit jar 4.8.2

Project Modules

There are no modules declared in this project.

vraptor-biscotti-compiler

A messages.properties to Messages.java compiler.

Why?

Because you don't want that ugly message showing to your end user. Yep, that message.

How?

java -jar vraptor-biscotti-compiler.jar

It will read src/main/resources/messages.properties and save target/i18n-classes/Messages.java and target/i18n-classes/MessagesDefault.java.

How can I deal with multiple languages

java -jar vraptor-biscotti-compiler.jar

If there is a default and a french version, it will generate:

target/i18n-classes/Messages.java
target/i18n-classes/Messages_FR.java (extends Messages.java)

Why does it extends Messages.java? Because it is a fallback, my boy.

VRaptor it with panettone, please

Yes, sir:

java -jar vraptor-i18n-compiler.jar 

VRaptor it with jsp, please

Yes, sir:

@Named

FAQ

  1. But why would I deal with Messages? There is a french message I want to use... You should only use messages that are contained in all files, but if you really want to use, just receive the type you want.

  2. Custom dirs?

java -jar vraptor-i18n-compiler.jar -i custom_messages.properties -o custom_output_folder
  1. Is it really a good practice to output to src/main/java and commit it to github? I already have my messages.properties there. Although it is a generated resource, it is a non-expensive one (it is small enough) so you can commit to your git repository. Feel free to write to another folder and enjoy life as you wish.

Programmatic API

Yes, we have it:

new Compiler(output).compile(input);

You want it even more fine grained? Go for your TypeCollector or MessageType. Enjoy our test cases and use them as you wish.

Who do I thank for being 100% sure I won't get a crappy message in my production code?

Thanks Java.

How do I contribute?

Where do I get help?

br.com.caelum.vraptor

Caelum

Versions

Version
4.0.0-RC1