1 2 Previous Next 21 Replies Latest reply: Feb 8, 2012 2:50 PM by Rafik F Go to original post RSS
  • 15. Re: maven and jboss hot deployment does not work correctly
    Snjezana Peco Expert

    > Okay, I corrected source and target jdk in pom.xml and got it to deploy correctly, but although all files are now in an exploded directory below default/deploy, I get an http 404 error if I access the URL.

    > The jboss console confirmed the deployment. No error message is shown.

     

    Could you please attach a test project ?

     

    > BTW, I am new to Maven and don't understand why it created two directories (...-SNAPSHOT and src/main/webapp) ...

     

    You can remove the line

     

    <wb-resource deploy-path="/" source-path="/smsurbano-1.0-SNAPSHOT"/>

     

    from the .settings/org.eclipse.wst.common.component file.

     

    If the line is created again when calling Maven>Update Project Configuration, there is a problem in m2eclipse.

    Will try to help more if you send me the test project.

  • 16. Re: maven and jboss hot deployment does not work correctly
    u j Novice

    Please find attached the entire project. I only deleted the war in the target folder to decrease the size.

     

    The line

    <wb-resource deploy-path="/" source-path="/smsurbano-1.0-SNAPSHOT"/>

    is recreated automatically in the .settings/org.eclipse.wst.common.component file when I Maven update the project.

    Can I delete the ...SNAPSHOT folder in Eclipse?

     

    Thanks,

    Ulrich

  • 17. maven and jboss hot deployment does not work correctly
    Snjezana Peco Expert

    I can't reproduce your problem.

    I have done the following:

     

    - imported your project as an Eclipse project

    - removed the line

    <wb-resource deploy-path="/" source-path="/smsurbano-1.0-SNAPSHOT"/>

    from the .settings/org.eclipse.wst.common.component file

    The Maven>Update Project Configuration action doesn't recreate this line.

    - removed the smsurbano-1.0-SNAPSHOT directory

    - right-clicked the project, selected Properties>Maven and entered 'release' to the Active Maven Profiles text field

    Your release profile doesn't deploy jsf libraries  which is correct for JBoss AS.

    - deployed the application to JBoss AS 6

    - started the server

    - ran http://localhost:8080/smsurbano/

     

    Not sure how did you get the /smsurbano-1.0-SNAPSHOT directory.  You can remove it.

    Do you use the maven command line?

    Could you send your Eclipse configuration (Help>About Eclipse SDK>Installation Details>Configuration)?

  • 18. Re: maven and jboss hot deployment does not work correctly
    u j Novice

    Now it works! I think your step

    "- right-clicked the project, selected Properties>Maven and entered 'release' to the Active Maven Profiles text field"

    did the trick. I didn't know that this is necessary.

     

    Still, the ...snapshot line is always recreated if I choose Maven>Update Project Configuration. No idea why. But not so important.

    To create the project, I followed the guide

    http://docs.jboss.org/richfaces/latest_4_0_X/Developer_Guide/en-US/html/chap-Developer_Guide-Getting_started_with_RichFaces.html#sect-Developer_Guide-Getting_started_with_RichFaces-Creating_a_project_with_Maven

    So, yes, used the maven command line.

     

    I attach my Eclipse configuration.

     

    Thanks,

    Ulrich

  • 19. Re: maven and jboss hot deployment does not work correctly
    Snjezana Peco Expert

    > "- right-clicked the project, selected Properties>Maven and entered 'release' to the Active Maven Profiles text field"

    > did the trick. I didn't know that this is necessary.

     

    You have to use the release profile if you deploy the application to JBoss AS. If you exclusively use JBoss AS, you can setup the provided scope for the jsf-api and jsf-impl artifacts.

     

    > Still, the ...snapshot line is always recreated if I choose Maven>Update Project Configuration. No idea why. But not so important.

     

    The only way I can reproduce the issue is by setting the warSourceDirectory element to the configuration section of the maven-war-plugin as follows:

    ...

    <plugin>

         <artifactId>maven-war-plugin</artifactId>

         <configuration>

            ...

            <warSourceDirectory>smsurbano-${project.version}</warSourceDirectory>

            ...

        </configuration>

    </plugin>

     

    The WTP configurator  will recreate the directory in this case.

     

    I have used the same Eclipse configuration as you.

  • 20. maven and jboss hot deployment does not work correctly
    u j Novice

    Hi, I deleted the line ..SNAPSHOT again and this time a Maven>Update Project Configuration did not recreate it!

    Maybe due to the restart of Eclipse.

    Anyway, problem solved. See also http://community.jboss.org/message/599389.

     

    Thanks,

    Ulrich

  • 21. Re: maven and jboss hot deployment does not work correctly
    Rafik F Newbie

    Hi,

     

    I search about using the plugin jboss in the pom.xml of maven,

     

    whithout at this moment !

     

    Any idea ?

     

    Thanks

     

    R.F.

1 2 Previous Next