Building easyb

67 views
Skip to first unread message

Juergen Kindler

unread,
Jan 7, 2014, 9:32:58 AM1/7/14
to easyb...@googlegroups.com
Hi all,

I'm a little confused about the structure of the easyb git repo(s).
If I take the repos as they are this does not result in something that can be build with Maven as it is.
(Maven expects nesting of projects, but as there are different repos this conflicts with git structures ...)

I can refumble this by adding relative paths to the parents to some extent, but finally end up with a build error in easyb-core (note: I started with an empty Maven repo):
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.3:run (test-behaviors) on project easyb-core: An Ant BuildException has occured: java.lang.NoClassDefFoundError: org/codehaus/groovy/runtime/BytecodeInterface8: org.codehaus.groovy.runtime.BytecodeInterface8 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.3:run (test-behaviors) on project easyb-core: An Ant BuildException has occured: java.lang.NoClassDefFoundError: org/codehaus/groovy/runtime/BytecodeInterface8
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: An Ant BuildException has occured: java.lang.NoClassDefFoundError: org/codehaus/groovy/runtime/BytecodeInterface8
    at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:131)
    at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:98)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    ... 19 more
Caused by: java.lang.NoClassDefFoundError: org/codehaus/groovy/runtime/BytecodeInterface8
    at org.apache.tools.ant.IntrospectionHelper.extractBuildException(IntrospectionHelper.java:697)
    at org.apache.tools.ant.IntrospectionHelper.setAttribute(IntrospectionHelper.java:393)
    at org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfigurable.java:392)
    at org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfigurable.java:349)
    at org.apache.tools.ant.Task.maybeConfigure(Task.java:202)
    at org.apache.tools.ant.UnknownElement.configure(UnknownElement.java:193)
    at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:160)
    at org.apache.tools.ant.Task.perform(Task.java:347)
    at org.apache.tools.ant.Target.execute(Target.java:357)
    at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:118)
    ... 22 more

What is the the right way to set this up ???

Cheers
  Jürgen

Juergen Kindler

unread,
Jan 13, 2014, 9:37:26 AM1/13/14
to easyb...@googlegroups.com
Seems that in the mean time I found the reason for the compile problem.

Even would have some commits to fix known issues ...

Richard Vowles

unread,
Jan 13, 2014, 3:26:38 PM1/13/14
to easyb...@googlegroups.com
Maven does not expect nested projects, and in fact that is a worst practice and one of the reasons why so many projects are so poorly structured in the Maven world.

I have been receiving updates recently because easyb-core is not building because the parent is in snapshot. I can't remember why I did that but if you just clone and install the parent, then you'll be good with then just building the client.

Have you changed the version of Groovy it is using? Is that why it can't find the specified interface?


On Tue, Jan 14, 2014 at 3:37 AM, Juergen Kindler <jkin...@talend.com> wrote:
Seems that in the mean time I found the reason for the compile problem.

Even would have some commits to fix known issues ...

--
You received this message because you are subscribed to the Google Groups "Easyb Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to easyb-users...@googlegroups.com.
To post to this group, send email to easyb...@googlegroups.com.
Visit this group at http://groups.google.com/group/easyb-users.
For more options, visit https://groups.google.com/groups/opt_out.



--
---
Richard Vowles,
Groovy, Java, Javascript, AngularJS

Juergen Kindler

unread,
Jan 14, 2014, 7:02:01 AM1/14/14
to easyb...@googlegroups.com
Well, whether the structures I see in e.g. Apache projects or depicted on Sonatype docs like http://books.sonatype.com/mvnref-book/reference/pom-relationships-sect-pom-best-practice.html are good or bad may be a matter of taste.

For easyb I found no documentation about the sequence of projects to build, so I started searching and experimenting.
So for me as an outsider things could be easier if there was something like a module pom that you can just grab and build.
That could help increasing activity and number of contributions / fixes on the project. (It really deserves more attention by other developers ;-) )

As some of the projects are still referencing each other I worked around by adding relativePath entries like in easyb-maven-parent

  <parent>

    <groupId>org.easyb</groupId>

    <artifactId>easyb-parent</artifactId>

    <version>1.1-SNAPSHOT</version>

    <relativePath>../easyb-parent</relativePath>

  </parent>

  <artifactId>easyb-maven-parent</artifactId>


and in easyb-core

<parent>

<artifactId>easyb-maven-parent</artifactId>

<groupId>org.easyb</groupId>

<version>1.5-SNAPSHOT</version>

<relativePath>../easyb-maven-parent</relativePath>

</parent>

<artifactId>easyb-core</artifactId>


to the parent sections to get the builds working, but actually it feels wrong to me to add something I cannot commit. Maybe my approach is wrong here.
That's why I asked about how do you (or others involved) build easyb …
It may be worthwhile to capture that and add that to the easyb wiki. (I'd be happy to document things ;-) )

Apart from that it seems to me that – as I started on a new machine without .m2 folder - I ran into issues that you have not seen with building easyb. So I just opened a new pull request about this. It may be a corner case, but a tricky one to fix – even with Google as a friend ;-)

Cheers
  Jürgen
--
Jürgen Kindler

Richard Vowles

unread,
Jan 17, 2014, 8:17:55 PM1/17/14
to easyb...@googlegroups.com
You just need to install the easyb-maven-parent and then you can build easyb-core, but it needs Java 7. If you drop the version back to 1.4 it seems to be ok.

Sonatype and Apache are so incredibly wrong-headed in their Maven project design it is frightening. One day I will get around to writing the booklet on how to use it properly :-(

Richard

Juergen Kindler

unread,
Jan 20, 2014, 11:09:10 AM1/20/14
to easyb...@googlegroups.com
Hi Richard,

Ok, I understood that the relative paths for the parent refs are not necessary.

Unfortunately it is still not as easy as you write … as the easyb-maven-parent cannot installed before easyb-parent has been installed … and before installing easyb-core one has to install easyb-ast …
When subsequently trying to install easyb-core, that will fail with an java.lang.NoClassDefFoundError: org/codehaus/groovy/runtime/BytecodeInterface8: org.codehaus.groovy.runtime.BytecodeInterface8 , because (after some searching) one will sooner or later realize that it is necessary to install easyb-composite-groovy, because otherwise the Maven build will grab groovy-all version 1.7.* which does not contain org.codehaus.groovy.runtime.BytecodeInterface8

So in case the local Maven repo does not know easyb it comes down to installing 
  • easyb-parent
  • easyb-maven-parent
  • easyb-ast
  • easyb-composite-groovy
  • easyb-core
Quite a few manual steps to do for building easyb-core only.
To prevent that others have to figure this out on their own again: Can I have access to the wiki or should I send a pull request to change the source of the contents of the easyb web page ?

Richard Vowles

unread,
Jan 20, 2014, 12:56:28 PM1/20/14
to easyb...@googlegroups.com

I'm a little confused Juergen, those other dependencies are in Central? The only reason for installing easyb-maven-parent is that it is a snapshot...?

Juergen Kindler

unread,
Jan 21, 2014, 3:11:45 AM1/21/14
to easyb...@googlegroups.com
Hm, well … I did not check whether something is on central – and did not assume so as the heads of the projects have snapshot versions.
I assumed that I want to check out / clone everything – esp. as building easyb-core from master/head did not work.

As I am doing all this on a new machine (with clean Maven cache), it sounds natural that all those projects would have to be fetched from Maven central and if they are not available, I run into problems and have to build them from scratch locally …

--
Jürgen Kindler

Richard Vowles

unread,
Jan 21, 2014, 3:23:40 AM1/21/14
to easyb...@googlegroups.com
Yes, but for a new user, ideally they should just need to fork easyb-core and that should work, and it not working (and not having done so for 7 months!) is a valid criticism. Putting the parent back to 1.4 makes it compile - all other dependencies come from Central - thats why I wasn't too bothered about it. 

If I had expected the pain you went through, I would have created a reactor build with submodules - I apologise for the difficulty in leaving it in such a state!

Richard

Juergen Kindler

unread,
Jan 21, 2014, 3:31:43 AM1/21/14
to easyb...@googlegroups.com
Richard, no need to apologize!
Such things can always happen – I usually also do not clear my Maven cache each day and from time to time run into such issues myself ;-)

I'd suggest we just start with documenting the simplest happy path for everyone who wants to install easyb-core and the maven plugin from source locally and invite others to contribute to that docs for other pieces :-)

Richard Vowles

unread,
Jan 21, 2014, 3:36:50 AM1/21/14
to easyb...@googlegroups.com
Agreed!

Juergen Kindler

unread,
Jan 21, 2014, 4:43:48 AM1/21/14
to easyb...@googlegroups.com
Put that on the google-code project wiki? (If so, I'd ask you to allow me to add / edit pages there … )
(I guess github wikis do not make sense here as this topic spans across projects … )

--
Jürgen Kindler

Richard Vowles

unread,
Jan 22, 2014, 3:57:19 AM1/22/14
to easyb...@googlegroups.com
What is your github id?
Reply all
Reply to author
Forward
0 new messages