11 Replies Latest reply on Jan 31, 2011 1:40 PM by nickarls Branched from an earlier discussion.

    update weld in jboss as 6

    nimo22

      I have set my JBOSS-HOME, the question is:

       

      Jboss 6 integrates weld version 1.1.Beta2. I want to update that version to 1.1.0.FINAL. How should I do that?

       

      Is it better to get the nightly builds of jboss 6 which maybe integrates 1.1.0.FINAL?

        • 1. update weld in jboss as 6
          nickarls

          1.1.0 Final should work in AS 6.

           

          I meant "go to the jboss-as subdir of the downloaded Weld 1.1.0.Final and do mvn". It will update the deployers in the AS JBOSS_HOME points to.

          • 2. update weld in jboss as 6
            nimo22

            I have downloaded the zip from sourceforge manually. But why do I need that when using maven-repo?

             

            I have a maven-project and in the pom I include this:

             

             

            <dependency>

                    <groupId>org.jboss.weld</groupId>

                    <artifactId>weld-api</artifactId>

                    <version>1.0-SP1</version>

                    <scope>provided</scope>

                </dependency>

             

             

            After updating my dependencies (with scope 'provided'), I had the weld-jar included in my project folder. But it does not change the jboss-lib-directory which contains all the old weld-jars!

             

            However, I need the 1.1.0 Final but it seems there is no repo-version for that.

            • 3. update weld in jboss as 6
              nickarls

              Because the "mvn" in the jboss-as will pull down the stuff it needs to upgrade the things it needs to update in your AS.

               

              https://repository.jboss.org/nexus/content/groups/public/org/jboss/weld/

               

              holds weld-releases. Although for portability, you should avoid binding it to Weld and use CDI

              • 4. Re: update weld in jboss as 6
                shelly.mcgowan

                My suggestion would be to download the latest nightly JBoss AS 6 zip distribution which has WELD 1.1.0.Final integrated

                • 5. Re: update weld in jboss as 6
                  nimo22

                  Hello Nicklas,

                   

                  thank you! I integrated this into my project-pom:

                      <dependency>

                          <groupId>org.jboss.weld</groupId>

                          <artifactId>weld-api</artifactId>

                          <version>1.1.Final</version>

                          <scope>provided</scope>

                      </dependency>

                   

                  Download works.

                   

                  But what about weld-core and weld-spi? There are no jars for that in the repo.

                   

                  <dependency>

                          <groupId>org.jboss.weld</groupId>

                          <artifactId>weld-core</artifactId>

                          <version>1.1.Final</version>

                          <scope>provided</scope>

                  </dependency>

                  <dependency>

                          <groupId>org.jboss.weld</groupId>

                          <artifactId>weld-spi</artifactId>

                          <version>1.1.Final</version>

                          <scope>provided</scope>

                  </dependency>

                   

                  "Because the "mvn" in the jboss-as will pull down the stuff it needs to upgrade the things it needs to update in your AS."

                   

                  I tried to do mvn in my jbossas-dir, but it does not work (I have no pom-file in my jbossas-direcory). I use maven3.

                   

                   

                  "Although for portability, you should avoid binding it to Weld and use CDI"

                   

                  I dont understand that. I use CDI which is implemented by weld. (A old version of) Weld is within my jbossas-directory.

                  • 6. Re: update weld in jboss as 6
                    nimo22

                    Hello Shelly,

                     

                    yes indeed, this is the cleanest solution! I will do that.

                    • 7. Re: update weld in jboss as 6
                      nickarls

                      I generally just include the https://repository.jboss.org/nexus/content/groups/public/org/jboss/spec/jboss-javaee-6.0/1.0.0.Final/ pom dep

                       

                      weld-spi and all other artifact should be in the jboss nexus repo, too but what do you need them for? @Inject and the CDI stuff is in cdi-api which is included in the ee-pack above. weld-core can be justified if you need to cast to BeanManagerImpl (instead of injecting BeanManager) if you want to do dirty hacks but due to portability, it should be avoided.

                      • 8. Re: update weld in jboss as 6
                        nimo22

                        I included the pom.xml from your link into my jboss-as-root-dir and tried to do a mvn but it does not work:

                         

                        -mvn

                         

                        ..build failure..no goals have been specified for this buil...

                         

                        By the way, I cannot find a goal such as mvn -update-dependencies).

                         

                         

                        Yes, indeed, I do not need weld-spi and weld-core.

                        • 9. Re: update weld in jboss as 6
                          nickarls

                          Bah, rollback on what I said. The jboss-as dir and method of update is not included in the binary build of course. Just go with the hudson build if it works for you. I've been living on the snapshot trunk source tree for too long, I forget these things ;-)

                          • 10. Re: update weld in jboss as 6
                            tmanning

                            Being able to upgrade the version of Weld in the binary version would still be really handy if possible.

                             

                            I'm running the JBoss 6.0.0 Final binary but really need the fix for https://issues.jboss.org/browse/WELD-833 integrated (or it's unusable for conversation scopes). I'm not sure the Hudson build incorporates the fix (could be wrong - I'm not really sure).

                             

                            JBoss includes two weld-core jars (jsf-only and no-jsf). Is there a script that generates both of these? What if I just replaced both jars with the latest weld-core, would that work?

                            • 11. Re: update weld in jboss as 6
                              nickarls

                              Most likely, I don't think there has been any SPI/API changes.