I don't know whether this problem belongs to M2T or EMF. I suppose here first.
The background is that I need dynamical JET transform, so I use JETEmitter and my project is based on EMF.
As far as I know the normal XPath is not compatible with EMF, so I found one replacement named JXPath. My problem is that I want to use JXPath in the JET templates to filter the content and I only can use it as external jars. When I ran the project, I got some error messages like these:
ERROR in /.../.../.../JXPATHTemplate.java (at line 7)
import org.apache.commons.jxpath.*;
The import org.apache cannot be resolved
ERROR in /.../.../.../JXPATHTemplate.java (at line 30)
JXPathContext xPathContext = JXPathContext.newContext(documentRoot);
JXPathContext cannot be resolved
I have added common-jxpaht-1.3.jar to my build path and also classpath. But it still doesn't work.
Does anyone have idea about it?
I fixed it. This common-jxpath-1.3.jar must be turned into a plugin project so that JETEmitter can add this variable to use it at the runtime, because JETEmitter addVaviable method only can add plugin id, no jar id.