Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.7
    • Fix Version/s: None
    • Component/s: Maven Integration
    • Labels:
      None

      Description

      I faced a situation where I need to set a resource-ref on jboss.xml, but the maven plugin does not provide an elegant way to do it (I had to add a postGoal to cactus:cactifywar) as it always use a jboss-web.xml on the plugin-resources:

      <ant:webinf dir="$

      {plugin.resources}/jboss3x">
      <ant:include name="jboss-web.xml" if="cactus.home.jboss3x"/>
      </ant:webinf>

      A temporary solution would be to add a new property:

      on plugin.properties:

      cactus.jboss3x.jboss_web_xml=${plugin.resources}

      /jboss3x

      on plugin.jelly:

      <ant:webinf dir="$

      {cactus.jboss3x.jboss_web_xml}

      ">
      <ant:include name="jboss-web.xml" if="cactus.home.jboss3x"/>
      </ant:webinf>

      A more elegant solution would handle it to Cargo or the Ant task.

      Vincent, any thoughts?

      – felipe

        Activity

        Hide
        Thomas Van de Velde added a comment -

        I'd suggest the following solution:

        <maven:get plugin="maven-war-plugin" property="maven.war.src" var="warSrc" />

        <ant:webinf dir="$

        {warScr}

        /WEB-INF">

        <ant:include name="jboss-web.xml" if="cactus.home.jboss3x"/>

        </ant:webinf>

        Show
        Thomas Van de Velde added a comment - I'd suggest the following solution: <maven:get plugin="maven-war-plugin" property="maven.war.src" var="warSrc" /> <ant:webinf dir="$ {warScr} /WEB-INF"> <ant:include name="jboss-web.xml" if="cactus.home.jboss3x"/> </ant:webinf>
        Hide
        Vincent Massol added a comment -

        Thanks Thomas.

        Actually there is a bug in our current implementation. There should be no resources at all in plugin-resources of course. Look at all other containers. They don't have any resources in there. This should be fixed for JBoss 3x.

        So the solution is to move JBoss resources back to the Ant integration project (same as is done with all other projects) and possibly to provide an attribute to pass a custom version of a config file (if required).

        Show
        Vincent Massol added a comment - Thanks Thomas. Actually there is a bug in our current implementation. There should be no resources at all in plugin-resources of course. Look at all other containers. They don't have any resources in there. This should be fixed for JBoss 3x. So the solution is to move JBoss resources back to the Ant integration project (same as is done with all other projects) and possibly to provide an attribute to pass a custom version of a config file (if required).
        Hide
        Thomas Van de Velde added a comment -

        Yes. I think it is necessary though to have the possibility to add application server specific configuration files (like jboss-web.xml) in the cactified war so that the war can call the EJB through jndi. I haven't understood what you mean with "move JBoss resources back to the Ant integration project (same as is done with all other projects)".

        Show
        Thomas Van de Velde added a comment - Yes. I think it is necessary though to have the possibility to add application server specific configuration files (like jboss-web.xml) in the cactified war so that the war can call the EJB through jndi. I haven't understood what you mean with "move JBoss resources back to the Ant integration project (same as is done with all other projects)".
        Hide
        Vincent Massol added a comment -

        "I haven't understood what you mean with "move JBoss resources back to the Ant integration project (same as is done with all other projects)".

        Cactus creates a default container configuration for all configurations. The default configuration files are located in the cactus-ant jar. We must do the same for jboss. BTW, we do already support jboss-web.xml files in your WAR file.

        What I am just saying is that we MUST NOT have the jboss-web.xml, users.properties and roles.properties files in integration/maven/src/plugin-resources/jboss3x. These files need to be moved to the samples projects because they are not generic. They are simply required for the samples for testing authentication. This is a leftover from the past that has never been fixed. We need to do that now.

        Show
        Vincent Massol added a comment - "I haven't understood what you mean with "move JBoss resources back to the Ant integration project (same as is done with all other projects)". Cactus creates a default container configuration for all configurations. The default configuration files are located in the cactus-ant jar. We must do the same for jboss. BTW, we do already support jboss-web.xml files in your WAR file. What I am just saying is that we MUST NOT have the jboss-web.xml, users.properties and roles.properties files in integration/maven/src/plugin-resources/jboss3x. These files need to be moved to the samples projects because they are not generic. They are simply required for the samples for testing authentication. This is a leftover from the past that has never been fixed. We need to do that now.

          People

          • Assignee:
            Unassigned
            Reporter:
            Felipe Leme
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development