1 2 Previous Next 20 Replies Latest reply: Nov 21, 2008 3:35 AM by Andrew Rubinger RSS

EJB3-embed jars in Maven repo?

darren hartford Expert

Hey all,
Would it be possible to add the jboss ejb3 embed jars to the maven repo at http://repository.jboss.com/maven2/ ?

Originally asked on the installation/configuration forum, but that may not have been the correct location to ask:
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973242


Thanks, this would be a huge timesaver!
-D

  • 1. Re: EJB3-embed jars in Maven repo?
    Wanderlei Souza Newbie

    Man, I have the same problem and I put it manually in my internal repository =(

    I have other problems with ebj3 and ebj-plugin but I can fix it. Send me an email if are you interested and I will send my pom.xml with the correct config for the plug-in.

    [s]
    Wandi

  • 2. Re: EJB3-embed jars in Maven repo?
    darren hartford Expert

    Hi Wandi,
    Configuring the ejb3-embed jars into an eclipse plugin was going to be my next challenge!

    A pom.xml file to automatically make the plugin would be great, especially when the ejb3 jars are available from the jboss maven repo.

    My thought was a library-plugin that just exposes those classes/jars, then have embed-server Eclipse RCP plugins (that depend on the library plugin) that are specific to your purpose/need -- does that sound correct?

    -D

  • 3. Re: EJB3-embed jars in Maven repo?
    J-C jc Apprentice

    If you have a correct config, you can post it on the forum, ti may have insterest for other peaople.

    Thxs

  • 4. Re: EJB3-embed jars in Maven repo?
    mazz Master

    I'm about to upload the some EJB3-embeddable ALPHA9 dependencies on the JBoss Maven2 repository.

    I'm thinking a groupId of "jboss" with artifacts of:

    jboss-embed-ejb3-hibernate-all
    jboss-embed-ejb3-jboss-ejb3-all
    jboss-embed-ejb3-thirdparty-all

    with version of "alpha9"

    I'm not sure if that's the right breakdown, but it seems logical.

    Any one have any suggestions or ideas on how the Maven2 repo should be populated with the embedded EJB jars - or do you agree with the above?

  • 5. Re: EJB3-embed jars in Maven repo?
    mazz Master

    Maybe I should have a group of "jboss-embeddable-ejb3".

    That way it would make more semantic sense.

    All the artifacts within that group can then be:

    hibernate-all
    jboss-ejb3-all
    thirdparty-all

    each with a version of "alpha9".

    The only issue here is that the group won't be under the all-encompassing "jboss" group. But I'm leaning towards doing it this way since it makes more sense.

  • 6. Re: EJB3-embed jars in Maven repo?
    mazz Master

    Oh, and I just realized that to follow the new JBoss versioning rules:

    http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossProductVersioning

    I'll be making the version "1.0.0.Alpha9"

  • 7. Re: EJB3-embed jars in Maven repo?
    ryan.campbell Expert

    It should not be hibernate-all/alpha9, it should be the link to the actual hibernate version. ie, don't make up a version for a jar which already has a proper version, and is probably already in the repository.

    ie, here: [link]http://repository.jboss.com/maven2/hibernate/hibernate3/[/link]


    Same for whatever thirdparty is, they should be under the appropriate groups, with their canonical names and versions. ie, you shouldn't make an "island" of jars here. This defeats the purpose of having declarative dependencies and essentially reverts back to the "lib folder" approach.

    It seems all we are missing is ejb3? This should be in the group jboss, under the ejb3 artifact name.

    Does this make sense?

  • 8. Re: EJB3-embed jars in Maven repo?
    mazz Master

    The problem here is that "hibernate-all.jar" (this is the actual jar that ships with the embeddable EJB3 alpha9 distro) includes "some" version of hibernate (not sure which) along with javax.persistence classes.

    Same with thirdparty jar, although its more complicated because it has a whole bunch of stuff inside it (antlr, trove, oswego-concurrent, javassist, dom4j and many, many others) all of unknown versions.

    I have not been able to find any documentation as to what are the actual dependencies (product and version numbers) for the embedded EJB3 stuff (other than those jars which are shipped with the product - hibernate-all.jar, jboss-ejb3-all.jar, thirdparty-all.jar).

    Since these libs ship with the EJB3 distribution I'm assuming these are the jars that people are using to satisfy the EJB3 dependencies (that is to say, they are not grabbing a hibernate3 jar from the hibernate site, not going to Apache for the commons jars, etc. etc.).

  • 9. Re: EJB3-embed jars in Maven repo?
    J-C jc Apprentice

    If you need hibernate, you just need to add a dependency to:

    <groupId>org.hibernate</groupId>
    <artifactId>hibernate</artifactId>
    <version>3.2.0.cr4</version>
    


    Have a look to http://www.ibiblio.org/maven2/org/hibernate/hibernate/3.2.0.cr4/


    You don't care about librairies you are not using. If you are using a librairy in your source code, just add it in your dependies. If there is a conflict with the same librairies used with different version you will see an error on report.


    In my opinion, deploying a thirdpartytools-all.jar is the best solution to hide issues and to loose of of the great benefits of maven, the dependency management.

    I perform some tests using the embedded EJB3, there is really a lot of great features in it, but the way it is deployed (3 jars) is a real issue. I use other librairies that have dependy with apache jars. Consequently I'm not able to check that I have no conflict in my classpath ...

  • 10. Re: EJB3-embed jars in Maven repo?
    mazz Master

     

    If you need hibernate, you just need to add a dependency to...
    Have a look to http://www.ibiblio.org/maven2/org/hibernate/hibernate/3.2.0.cr4/


    If you look at the hibernate-all.jar that ships with embedded EJB3 - it is not that jar you see in that URL. hibernate-all.jar also contains the javax.persistence API as well.

    If we are to do what Ryan suggests, I think there needs to be a piece of documentation that lists all the dependencies that the EJB3 embedded project needs. Because right now, there is no easy way to know that I can see. As mentioned before, thirdparty-all.jar contains a boatload of stuff and it has the potential of conflicting with others if they are using the same products as in thirdparty-all but are of a non-compatible version.

  • 11. Re: EJB3-embed jars in Maven repo?
    J-C jc Apprentice

    Right, it is not the rc4 but more probably the rc2. It looks like the last rc for the entitymanager is only compliant with hibernate rc2.
    That's one of the interest of maven. I just need to know that I want to use embedded EJB3 RC9, I do not have to take care on its dependencies.

  • 12. Re: EJB3-embed jars in Maven repo?
    Bill Burke Master

    sigh...

    Got people telling me there is too many jars, others not enough. Guess we'll have to have 2 distributions.

  • 13. Re: EJB3-embed jars in Maven repo?
    mazz Master

    :-)

    Really, what we need is just the EJB3 code WITH some documentation as to what third-party dependencies it has. With that, we can write our Maven pom's with the appropriate dependencies.

    For example, document all the products (with their versions) that are included in thirdparty-all.jar and hibernate-all.jar. I'm assuming jboss-ejb3-all.jar is all of the EJB3 project code and do not include any external dependency classes.

    So with this in hand, all I should have to do is grab the EJB3 jar from the EJB3 distribution and my Maven build will pull down all its external dependencies from the JBoss Maven Repo, and Ibiblio and where ever else I can grab them.

    This should concievably make this 2nd distribition much smaller than the current one. You don't need to ship all the dependent jars, just document what they are and Maven takes care of the rest.

  • 14. Re: EJB3-embed jars in Maven repo?
    J-C jc Apprentice

    I think that mazz is right. When we used a tool that manages dependencies, we don't care about the number of jars. Consequently, with maven, number of jars is not a problem.
    If you have to do that manually, number of jars is a nightmare ...

    Having just a list of the jars and their version used for hibernate-all.jar and thirdpartytool.jar will probably make everyone happy :-))

1 2 Previous Next