easysoa / EasySOA

A light, collaborative platform to make Service Oriented Architecture simple.
http://www.easysoa.org
35 stars 8 forks source link

Improve build system #80

Closed tiry closed 12 years ago

tiry commented 12 years ago

I just did a fresh build on a clean computer and had some issues.

May be it's my fault, but anyway, it always good to share this kind of feedback, so here I go.

The main problems were on Frascati. The build maven plugins used by Frascati are 1.5 SNAPSHOT are not available anywhere.

So I build frascati source code (trunk). I tried to build only the maven plugins but that was not enought, so I built everything.

For that I had to remove the http://www.openarchitectureware.org/m2 repository that is very very very slow (if not down for real), but it seems to be directly referenced from some of the frascati artifacts poms ...

=> I had to add www.openarchitectureware.org to my /etc/hosts to make it resolve to 127.0.0.1 because I did not want to spend all day waiting for mvn to complete timeout

In addition of pointing eclipse repo to 127.0.0.1, I also had to add the Maven Nuxeo repo to be able to get the eclipses deps.

=> With that in place, I have a frasacti build working

On Easy SOA Build there seem to be some issues too.

For example :

[INFO] Building EasySOA HTTP Discovery Proxy
[INFO]    task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 14 resources
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

Missing:
----------
1) org.easysoa.registry:easysoa-registry-api:jar:0.4-SNAPSHOT

=> I changed the pom to point to org.easysoa.registry.api:easysoa-registry-api-core + remote and added JSOn dep

Looks like there are also some api changes, so I changed quickly the code so that I can build.

==> I get a EasySOA build working

==> I can mvn eclipse:eclipse and import the projects into eclipse :)

So, I got everthing building in command line and in Eclipse at about 4:30 PM :)

I am clearly not a Maven expert, but I spent several hours to try to get the build to run.

=> If needed I can ask our devops to have a look at this when he is back ...

NB : in the CI chain, it may be worth adding a build from a clean repository : this helps finding out this kind of problem that you probably don't have in local (we did that for Nuxeo for the exact same reason).

mdutoo commented 12 years ago

See also #87 about streamlining build process with Nuxeo.

Cleaning the CI maven repository can't be done in the current CI since it would impact other projects. By the way, the more people outside OW commits here, the more we'll need a public CI. So : TODO LATER setup a public EasySOA CI on the dedicated VM

OK jguillemotte patch the registry-api dependency

OK mdutoo workarounds put in the wiki at https://github.com/easysoa/EasySOA/wiki/Building-easysoa

OK mdutoo ask help from INRIA in making it easier : see #92 "Improve build : FraSCAti"

mkalam-alami commented 12 years ago

Indeed the HTTP Discovery Proxy POM was outdated, I just fixed it (891028e).

Now I just tried to rebuild everything from a clean OS, but I found another build issue: the new copy-frascati-resources goal from easysoa-registry-frascati makes the current project hierarchy not suitable anymore. More exactly, easysoa-registry-frascati now depends on easysoa-proxy-core-httpdiscoveryproxy which depends on the registry API.

One solution would be to split the registry projects in two Maven modules, for example like this:

<!-- Master POM modules: -->
<modules>
    <module>easysoa-common</module>
    <module>easysoa-registry-api</module> <!-- With -core and -remote only -->
    <module>easysoa-proxy</module>
    <module>easysoa-registry</module>
    <module>samples</module>
</modules>

or, better:

<modules>
    <module>easysoa-common</module>
    <module>easysoa-registry</module>
    <module>easysoa-proxy</module>
    <module>easysoa-registry-frascati</module> <!-- All "embedded FraSCAti" related projects -->
    <module>samples</module>
</modules>
JGuillemotte commented 12 years ago

"easysoa-registry-frascati now depends on easysoa-proxy-core-httpdiscoveryproxy" => this dependency was a test and has been committed and pushed by error. Now I've just removed it. However, this problem will appear again when we try to put it all together i.e. FraSCAti and Nuxeo : packaging them together, doing integration tests, but also integration of FraSCAti proxies as EasySOA Apps. Your solution can then be used to solve it, by adding a new top-level projects depending from all others, ex. easysoa-apps/solution/light .

philippemerle commented 12 years ago

I just did a fresh build on a clean computer and had some issues.

May be it's my fault, but anyway, it always good to share this kind of feedback, so here I go.

The main problems were on Frascati. The build maven plugins used by Frascati are 1.5 SNAPSHOT are not available anywhere.

Now FraSCAti snapshot artefacts are continuously deployed at https://frascati-repo.inria.fr/

So I build frascati source code (trunk). I tried to build only the maven plugins but that was not enought, so I built everything.

For that I had to remove the http://www.openarchitectureware.org/m2 repository that is very very very slow (if not down for real), but it seems to be directly referenced from some of the frascati artifacts poms ...

=> I had to add www.openarchitectureware.org to my /etc/hosts to make it resolve to 127.0.0.1 because I did not want to spend all day waiting for mvn to complete timeout

This issue is resolved.

The FraSCAti Nexus repository acts as a proxy and cache to all Maven repositories used by FraSCAti. Firstly, now third party repositories could fail then our FraSCAti Nexus repository acts as a cache. This is the case for the OpenArchitectureWare repository as you could see at: https://frascati-repo.inria.fr/nexus/index.html#view-repositories;openarchitectureware~browsestorage Secondly, having just one repository instead of a lot of repositories improves the build time, Maven searches artefacts in only one repository, which is a proxy to all other repositories. Finally, we could be sure that everybody uses exactly the same artefact files, not just version numbers, but really same binary jar files.

In addition of pointing eclipse repo to 127.0.0.1, I also had to add the Maven Nuxeo repo to be able to get the eclipses deps.

=> With that in place, I have a frasacti build working

mdutoo commented 12 years ago

Main problem (FraSCAti build including OAW repo) is now solved, see also #92. Other problems have their own tickets : #87 Nuxeo build, #90 Easysoa-registry-api-frascati project must be free of Nuxeo dependencies, #104 Setup a public EasySOA CI. Therefore closing this ticket.