You can do something in Maven. Usually it has a default method for each thing, and then you can intercept and redefine it if you want to do something special. Sometimes it takes a lot and scratches on the head to figure it out.
There is even an official JFlex Maven plugin .
If possible, find someone who made the Maven plugin to do what you want. Even if he is not 100% right, he can at least give you an idea of how to make maven something.
Minimum configuration
Java- (.jflex, *.jlex, *.lex,.flex), src/main/jflex/ . Java - , . Java target/ /jflex , Java- .
pom.xml
<project>
<build>
<plugins>
<plugin>
<groupId>de.jflex</groupId>
<artifactId>jflex-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
maven -. (src/main/flex), . , . Maven , .