Closed bhargav closed 8 years ago
So the workflow would look like this:
To compile the super project, from the root directory:
mvn compile
-> This will build LBJava, Lbjava-Maven-Plugin and then use the plugin to generate lbj source. After this, the lbjava-examples project is compiled with the generated code.
To do a lbjava:compile
for the lbjava-examples, you'll have to install the plugin locally first using
mvn -pllbjava-maven-plugin -am install
in the root directory.
This will build the plugin and install that to the local m2 repo.
After this, you can do a mvn lbjava:compile
inside the lbjava-examples directory to compile lbjava plugins.
@danyaljj @bhargav @christos-c Maybe we can keep the compiling script, as it can compile examples individually.
@yimingjiang I don't mind compiling all the examples at once, since at this phase it will only generate the sources and not retrain.
@bhargav So there is no way to install the plugin from the main build script and add the lbjava:generate
goal to the generate-sources
phase?
@bhargav @christos-c is there any unresolved discussion in this PR?
I think I discussed this with @bhargav and it looked like it was a good solution. However, I would like to see the complete sequence of steps before I accept this. @bhargav do you mind changing the README to reflect these changes?
Yes. I'll update the readme. I am currently struck at the compile script. Removing the "lib/" folder and using maven exec:java
or something equivalent.
This is ready now. All lbjava-examples related commands need to run from the root directory now.
At the root directory,
mvn compile
=> Generate all .lbj and compile all projects
mvn compile -P generate-train-examples
=> Generate all .lbj, train all classifiers and compile all projects
mvn compile -P generate-train-examples,spam
=> Generate all .lbj, train the spam classifier only and compile all projects.
Defined profiles for all examples that we currently have. This removes the lbjava-examples/libs folder and compile script. 💯
Semaphore currently fails during test with a gurobi/GRBException
Will have a look at it later today.
Rather than then Gurobi hook (which needs license) you can use OjAlgoHook
:
https://github.com/IllinoisCogComp/lbjava/blob/master/lbjava-examples/src/main/lbj/SetCover.lbj#L19
And I don't know what this wasn't failing before...
And you should update Semaphore commands according to your changes:
So the fix doesn't work with older versions of maven (I tried 3.2.3) due to the String[]
representation in a pom file.
Looking good to me. Merge call with @christos-c !
I get an java.lang.UnsupportedClassVersionError: edu/illinois/cs/cogcomp/lbjava/frontend/GenerateParserAndSymbols : Unsupported major.minor version 52.0
when I run mvn clean compile
mvn compile
at root-level builds all three projects and generates sources for the examples project using the latest LBJava code.Pending:
lbjava:generate
andlbjava:compile
commands do not work currently as the plugin is never installed or fetched from repo. Investigating if we can do this as part of build process itself.