7 Replies Latest reply on Oct 12, 2007 1:57 AM by marx3

    Seam + Maven/Ant

    marx3 Apprentice


      I would like to build Seam project with Maven. I changed project structure to compatible with
      hovewer no luck. So I tried to adapt Ant build script to work on mavenized structure and resolve maven problem later. Hovewer while I changes paths in Ant buildfile and it build project ok, there is one small problem: components.xml isn't properly filtered (lines with 'debug' etc).

      1)Does anybody have working mavenized Seam project and could share mavenized simple 'Hello World' application?

      2)Is it possible to "seamgen" mavenized project (I saw in the newest seamgen "mavenized=false" in build.properties)

      3)Does anybody have working Ant buildfile working on mavenized project structure

        • 1. Re: Seam + Maven/Ant
          Michael Yuan Newbie

          Hmm, what is the error message you got when using my maven project template you mentioned? Thanks.

          • 2. Re: Seam + Maven/Ant
            marx3 Apprentice

            I didn't finish POM editing because I don't have enough skills. What stopped me is to define repository to hold WAR and JAR, because as I understand I need first build JAR, WAR, put to repository and next build EAR from this repository.
            So I started by redefining project structure made by seamgen to match those proposed by you, and tried to change Ant buildfile. So for now I could build project with Ant (because I need to start coding), and later give another person task to mavenize project (having proper structure should help).

            • 3. Re: Seam + Maven/Ant
              marx3 Apprentice

              mvn errors:

              Validation Messages:

              [0] 'dependencies.dependency.version' is missing for org.jboss.seam:jboss-s

              Reason: Failed to validate POM for project pl.wasko.esp:war at C:\projekty-jsf\e

              The same with JUnit package

              • 4. Re: Seam + Maven/Ant
                Thomas Hamacher Novice

                Then you should probably do, what you´ve been told by this error-message.
                Add a version to your artifact you´d like to use.

                For example a full artifact should look like this:


                By the way: you can also have a look at http://www.mvnrepository.com. There you simply have to search for the artifact you are looking for and the complete code for inserting into your pom is done as well. So it´s only copy & paste.

                Good luck

                • 5. Re: Seam + Maven/Ant
                  marx3 Apprentice

                  i've added version number, hovewer it's unclear for me why sometimes I need to put this numbe, and sometimes I don't. Also XML validator says version numbe isn't proper in this place, but maybe it's validator's error.

                  After fixing it:

                  [INFO] Scanning for projects...
                  [INFO] ------------------------------------------------------------------------
                  [ERROR] BUILD FAILURE
                  [INFO] ------------------------------------------------------------------------
                  [INFO] Project 'pl.xxx.esp:war' is duplicated in the reactor

                  It seems I need to give diferent ArtifactId for WAR, JAR etc?

                  • 6. Re: Seam + Maven/Ant
                    Thomas Hamacher Novice

                    Maybe you have a parent-pom included in your pom, where you have already declared a version?
                    Just an idea!

                    • 7. Re: Seam + Maven/Ant
                      marx3 Apprentice

                      i made POMs just like in example from link above, so I have no idea if "mystuff" should be different in every POM (in example they are all the same).

                      I've finally modifed ANT buildscript so I can build project with mavenized structure, I hope in future there will be working example of mavenized project to adapt my own.