LearnLib / automatalib

A free, open-source Java library for modeling automata, graphs, and transition systems
http://automatalib.net
Apache License 2.0
92 stars 34 forks source link

Update README.md #19

Closed omarzd closed 6 years ago

omarzd commented 6 years ago

added build instructions for the poor.

mtf90 commented 6 years ago

Dear @omarzd, thanks for contributing. I extended the build instructions based on your work to capture also Eclipse (which actually requires some more work, because of annotation processing).

You mentioned, you had problems with some of the serialization modules. Care to elaborate? I have not encountered any problems with IntelliJ. Regarding your JAR export, I will write some notes on the README of LearnLib.

omarzd commented 6 years ago

I was planning on adding instructions for Eclipse as well as Maven command line, but in neither case could I work it out. Thanks for adding those and the nice formatting too. I'll try to build a fresh clone and report back on serialization libraries error if it occurs. Could these errors have occurred with me because I simply use git clone without any flags while you do -b develop --single-branch?

mtf90 commented 6 years ago

Hm, it shouldn't make a difference. git clone just clones the whole repo, but since the development branch is configured as the default branch, you should automatically build the correct branch. The --single-branch is just some bandwidth optimizations (since ppl. don't normally need the master branch (which is deployed on maven central) or any feature branches)

omarzd commented 6 years ago

I have one more point. I prefer producing one JAR from automatalib to include in LearnLib, but your method produces multiple. It's the same case for LearnLib; I would like to create one LearnLib JAR that I can include in my projects. That is why I had the following step in both edits: "To produce the jar file, go to File -> Project Structure -> Artifacts -> Add (the plus sign) -> JAR -> From modules with dependencies -> OK -> On the right hand side, check box "Include in project build"."

mtf90 commented 6 years ago

That's what the -Pbundles part is about (it is essentially a profile, that wraps all maven artifacts into one big JAR).

In order to produce your standalone Learnlib JAR, you should run mvn clean install -Pbundles in the AutomataLib folder (here, we need to install the artifacts, because the build process for LearnLib will look in the local Maven repository for artifacts) and then mvn clean package -Pbundles in the LearnLib folder. Your LearnLib JAR should then be available under distribution/target/bundles/learnlib-0.12.1-SNAPSHOT-dependencies-bundle.jar. This JAR includes all classes to use LearnLib (including AutomataLib and 3rd party libraries, like Guava). If you're just interested in the LearnLib classes, use the learnlib-0.12.1-SNAPSHOT-bundle.jar one

(Note: this might take a little longer than the regular build process, because we also build JavaDoc and Source-JARs in the -Pbundles profile)