Buliding OSMO using Maven

27 views
Skip to first unread message

Petr Široký

unread,
Mar 30, 2014, 7:14:51 PM3/30/14
to osmo...@googlegroups.com
Hello,

I have been trying to built the OSMO from sources (default branch), using Maven. I see there is defined Maven module structure, but it seems bit out-of-date. For example the defined module `miner` does not even exists. Also there is source/target level declared as 1.7, but the code in osmotester module uses Java 8 features (lambdas). 

My questions are: 
Is building from sources using Maven supported? If so, would be interested in contribution fixing the current issues + some clean-up around modules, dependencies, etc?

The source/target language level should be 1.8, right?

Thanks in advance for any response,
Petr Siroky


Teemu Kanstrén

unread,
Mar 30, 2014, 9:59:21 PM3/30/14
to osmo...@googlegroups.com
Hi Petr,

 The current source version requires JDK8 to build, that is correct. I do not personally use Maven so I do not update it. Tamas made the Maven build a while back but I guess it has not been updated. The Ant build should work if you need a quick compile. If you wish to provide a fix for Maven, that is welcome.

Cheers,
Teemu


--
You received this message because you are subscribed to the Google Groups "osmo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osmo-mbt+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Petr Široký

unread,
Mar 31, 2014, 5:08:30 AM3/31/14
to osmo...@googlegroups.com
Hello Teemu,

thanks, will try the Ant build.

It would be nice to use Maven, however having both Ant + Maven together would require to maintain them both and for example when adding new dependency it would need to be added in to places.

Would you be willing to move to Maven only build sometime in future? I think it has a lot of advantages, beside just standardization. You can deploy releases to maven repositories, easily manage dependencies. 
(Just asking, its perfectly to ok to stick with Ant as I know also other people that prefers it)

Thanks,
Petr

Teemu Kanstrén

unread,
Mar 31, 2014, 1:36:33 PM3/31/14
to osmo...@googlegroups.com
Hi Petr,

 Ant works and I find it is pretty clear to use for the build, so I don't see making a change in the near future.

 The only dependency right now is Velocity for various reports. Besides that, I try to avoid any dependencies. As such, Maven scripts should not require huge additional maintenance. I just don't update them as I don't really use them..

Teemu

Petr Široký

unread,
Mar 31, 2014, 7:30:19 PM3/31/14
to osmo...@googlegroups.com
Teemu, you are right, there is not much dependencies anyway, so maintaining both Ant and Maven build should not require a lot of effort.

I have fixed the build issues and pushed the commit into my clone: https://code.google.com/r/sirokypetr-osmo/source/detail?r=ddeabc1e19941e3a8e26defeb6ac89b92331000f

I am also attaching a diff if you want to patch the "master" clone. Or if you prefer I can push directly into the master clone if you give the needed rights.

Thanks,
Petr
mvn-fix.diff

Teemu Kanstrén

unread,
Apr 2, 2014, 11:39:19 AM4/2/14
to osmo...@googlegroups.com
Hi Petr,

 Thanks for your efforts. I pulled your changes and merged them in. I hope it works. Haven't really done that before..

Teemu

Petr Široký

unread,
Apr 2, 2014, 11:54:47 AM4/2/14
to osmo...@googlegroups.com
Hello Teemu,

thanks for merging the changes. I just did
$ cd osmo && mvn clean install

and the build was successful, so everything seems to be fine.

Petr

Teemu Kanstrén

unread,
Apr 2, 2014, 9:30:45 PM4/2/14
to osmo...@googlegroups.com
ok good to hear. thanks for testing

ck

unread,
Jul 17, 2014, 4:38:11 AM7/17/14
to osmo...@googlegroups.com
I can confirm that the maven build is working but important resource files are not added(copied) to the build artefact (e.g. velocity template files). So I switched back to ant for now.

Petr Široký

unread,
Jul 17, 2014, 5:37:17 AM7/17/14
to osmo...@googlegroups.com
Hi,

thanks for reporting the issue. I will look at this and fix it in the next couple of days.

Petr
Reply all
Reply to author
Forward
0 new messages