Coder Social home page Coder Social logo

msiemczyk / core Goto Github PK

View Code? Open in Web Editor NEW

This project forked from weld/core

0.0 1.0 0.0 48.91 MB

Weld, including integrations for Servlet containers and Java SE, examples and documentation

Home Page: http://weld.cdi-spec.org/

License: Apache License 2.0

Java 97.22% Groovy 0.07% JavaScript 1.75% CSS 0.05% HTML 0.91%

core's Introduction

Weld

Gitter Travis CI Build Status Maven Central License

Weld is the reference implementation of CDI: Contexts and Dependency Injection for the Java EE Platform which is the Java standard for dependency injection and contextual lifecycle management and one of the most important and popular parts of the Java EE platform.

Weld is integrated into many Java EE application servers such as WildFly, JBoss Enterprise Application Platform, GlassFish, Oracle WebLogic and others. Weld can also be used in a Servlet-only environment (Tomcat, Jetty) or plain Java SE environment.

See http://weld.cdi-spec.org for more details.

Building Weld

To build Weld simply run

$ mvn clean install

Upgrading Weld in WildFly

Firstly, set the JBOSS_HOME environment property to point to your WildFly installation which already contains Weld 3 in older version:

$ export JBOSS_HOME=/opt/wildfly

Then, run the upgrade script:

$ mvn package -Pupdate-jboss-as -f jboss-as/pom.xml -Dweld.update.version=${weld.version}

In the above snippet, ${weld.version} is the version of Weld you want to use. Now you should have patched WildFly in JBOSS_HOME.

Creating a patch file for WildFly

Apart from just patching a WildFly, there is a semi-automated way to create reusable patch-file too. To do that, three things are needed:

  • Clean WildFly
    • A basis which you want the patch for
    • If you use following profile, WildFly 10.1.0.Final will be automatically donwloaded -Pdownload-wfly
    • If you already have one, or wish to use a different version, set the path to it throught property -DwildflyOriginal=/path/to/clean/wfly
  • Patched WildFly with Weld 3 version you want
    • Needs to prepared in advance and placed in -DwildflyPatched=/path/to/patched/wfly
    • -Pupdate-jboss-as can be used to create patched WildFly, see the paragraph above
  • Patch XML descriptor
    • By default, this is automatically grabbed from our repository for WildFly 10.1.0.Final
    • You can set different version via -Dpatch.file.name="patch-config-wildfly-10-weld-3.0.xml"

So, here are the commands:

  • export JBOSS_HOME=/path/to/wfly; mvn clean install -Pupdate-jboss-as,download-wfly,wfly-patch-gen -f jboss-as/pom.xml
    • In your target folder you get pristine WildFly, patch file (XML) and a complete patch.zip
    • Your JBOSS_HOME will be patched
  • export JBOSS_HOME=/path/to/wfly; mvn clean install -Pupdate-jboss-as,download-wfly -f jboss-as/pom.xml
    • You will end up with pristine WildFly in your target folder
    • Your JBOSS_HOME will be patched
    • No patch will be generated
  • export JBOSS_HOME=/path/to/wfly; mvn clean install -Pwfly-patch-gen -DwildflyOriginal=/opt/myCleanWfly11 -DwildflyPatched=/opt/myPatchedWfly11 -Dpatch.file.name=patch-config-wildfly-11-weld-3.0.xml -f jboss-as/pom.xml
    • This is a manual way where all variables are specified, here we patch Wildfly 11 to latest Weld 3
    • Need to specify both WildFly instances - clean one and already patched one
    • Also need to give provide specific patch XML descriptor as the default one targets WildFly 10, but we need 11 - hence patch-config-wildfly-11-weld-3.0.xml

Running integration tests and the TCK on WildFly

Follow the steps above to set the JBOSS_HOME environment property and to upgrade Weld within WildFly. Then, run:

$ mvn clean verify -Dincontainer -f tests-arquillian/pom.xml

$ mvn clean verify -Dincontainer -f jboss-tck-runner/pom.xml

If you want to run a specific test you can use the -Dtest=<test_name> flag. For example

$ mvn clean verify -Dincontainer -f jboss-tck-runner/pom.xml -Dtest=FireEventTest

Will run all the tests defined in FireEventTest.

$ mvn clean verify -Dincontainer -f jboss-tck-runner/pom.xml -Dtest=FireEventTest#testInjectedEventAcceptsEventObject

Will only run the FireEventTest.testInjectedEventAcceptsEventObject() test method.

core's People

Contributors

alartin avatar alesj avatar antoinesd avatar aslakknutsen avatar bafco avatar brunolmfg avatar drallen avatar hasys avatar jharting avatar kpiwko avatar luksa avatar manovotn avatar maschmid avatar maxmil avatar mbogoevici avatar mgencur avatar mkouba avatar mmazi avatar mojavelinux avatar nbenaglia avatar nickarls avatar peteroyle avatar pmuir avatar rh-tchuang avatar rogerk avatar sbryzak avatar seanf avatar stefangrossmann avatar stuartwdouglas avatar tremes avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.