I have a java project which uses some already existing specific code.
This code has a MakeFile
all: Parser.java
javac -cp java-cup-11b-runtime.jar:. *.java
Parser.java: Parser.cup
java -jar java-cup-11b.jar -nonterms -expect 150 -interface -parser Parser Parser.cup
I know for example that with Gradle it will look like this:
task make {
dependsOn build
exec{
workingdir './src/main/java'
commandLine "bash","-c", "java -jar java-cup-11b.jar -nonterms -expect 150 -interface -parser Parser Parser.cup;javac -cp java-cup-11b-runtime.jar:. *.java"
}
}
So I am using it on a bigger project on Intellij with Maven, and I don't know how to setup these specific rules.
I tried like this:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<compilerArgs>
<arg>Parser.java:-nonterms -expect 150 -interface -parser Parser</arg>
</compilerArgs>
</configuration>
</plugin>
---EDIT
The package I would like to use is Cup.
They provide a code block for Ant.
http://www2.cs.tum.edu/projects/cup/install.php
So I want the same for Maven.
I found an old plugin : http://czt.sourceforge.net/dev/cup-maven-plugin/ but the repository is down.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…