Java Developer Guide/Using java-pkg-simple.eclass/Code generation with mvel

From Gentoo Wiki
Jump to:navigation Jump to:search

A code snippet of using mvel for generating Java code can be found in dev-java/lz4-java:

CODE Using dev-java/mvel for code generation
src_compile() {
	# cannot include template 'decompressor.template': file not found.]
	cp src/build/source_templates/* . || die

	einfo "Code generation"
	"$(java-config -J)" \
		-Dout.dir="src/java" \
		-cp "$(java-pkg_getjars --build-only mvel-2.5)" \ \
		src/build/gen_sources.mvel \
		|| die