-
Notifications
You must be signed in to change notification settings - Fork 8
Mavenbuild #2
base: master
Are you sure you want to change the base?
Mavenbuild #2
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,3 +30,40 @@ The following is the list of changes, which the commit history should easily ref | |
| We are working on the [TouchCORE](http://touchcore.cs.mcgill.ca) (formerly TouchRAM) project in the [Software Engineering Laboratory](http://www.cs.mcgill.ca/~joerg/SEL/SEL_Home.html) at [McGill University](http://www.mcgill.ca). When we started developing our application, MT4j v0.98 was freshly released. Unfortunately, it was never updated since, which lead us to making some adjustments our own (besides extending some of MT4j's components in our project). We always had the problem of running it with Java 7 and higher on OSX, because of JOGL 1.x only working with the JRE provided by Apple. We worked with this constraint for a long time, but finally made the switch due to other constraints, thanks to some helpful pointers we found in the [UltraCom project](https://github.com/lodsb/UltraCom/tree/proc2) (which unfortunately has many more modifications to MT4j). | ||
|
|
||
| Because there are probably more people out there facing the same problem, we are sharing this updated version. Hope it helps! :) | ||
|
|
||
| ## How! | ||
|
|
||
| This sections explains how to configure eclipse to actually build this library for further reuse: | ||
|
|
||
|
|
||
| ### Project configurations | ||
|
|
||
| * Clone this repo | ||
| * Make sure eclipse uses JDK 1.8 as runtime and compiler compliance: | ||
| * Right-click on project -> properties -> Java Build Path -> Libraries -> Remove JDK13, add JDK 1.8 (```brew cask install adoptopenjdk8```) | ||
| * Right-click on project -> properties -> Java Compiler -> Enable project specific settings, compiler compliance level = 1.8 | ||
| * Clean and build: Project -> Clean... | ||
| * Make sure the tests pass: | ||
| * mt4j-core -> examples -> basic.helloworld -> Right-click: StartHelloWorld -> Run as... -> Java application | ||
|
|
||
| ### Build a JAR | ||
|
|
||
| * Right click on ```build.xml``` -> Run As... -> Ant Build | ||
| Alternatively: ```cd mt4j-core; ant create_run_jar``` | ||
| * This generates a new file, for further use as MT4J-library: **mt4j-core/mt4j.jar** | ||
|
|
||
| > *Note:* Unfortunately the ant build requires the compiled classes in a ```bin```subfolder (Created by eclipse: ```clean & build```). So you can not avoid eclipse. | ||
|
|
||
| ### Mavenize it | ||
|
|
||
| * To build a local maven artifact, based on this jar: | ||
| ```mvn install:install-file -Dfile=mt4j.jar -DgroupId=friend.of.mcgillsel -DartifactId=mt4j -Dversion=mspatch-1.0 -Dpackaging=jar -DcreateChecksum=true``` | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I hesitate to use ca.mcgill.sel. Usually the groupId are the source-authors (who we are not). So it would be misleading to use our own id here. On the other hand it would be bold to use the signature of mt4j's official authors. I found it best to indicate in the signature that it is related to our work at sel/mcgill, but unofficial.
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is the version set as
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just an indicator, that it is a patched version of the original mt4j, and that it is the first maven release. Have another one in the queue, that would then become 1.1 etc... |
||
| * From here on you can simply refer to mt4j in your maven projects, using the following snippet: | ||
| ```xml | ||
| <dependency> | ||
| <groupId>friend.of.mcgillsel</groupId> | ||
| <artifactId>mt4j</artifactId> | ||
| <version>mspatch-1.0</version> | ||
| </dependency> | ||
| ``` | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't mind if we make this non-Eclipse specific. Would you be willing to add an ANT task that compiles the sources first?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have little experience with ant and would have to get into it first. It's probably more efficient if you modify the existing ant task.