0

I'm using Maven 1.0 to generate the ear and deploy it in JBoss 4.0.

The issue I'm facing is, the java module entries in ear/META-INF/application.xml are incorrect. I have placed all jars inside a 'library' folder under the ear. But in application.xml, only the name of the jar is mentioned without the directory prefix.

ear structure

    ear
        META-INF
            application.xml
        library
            CertificateServer.jar

Code snippets given below.

Project.xml (only the dependency section)

    <dependency>
        <groupId>mstr</groupId>
        <artifactId>CertificateServer</artifactId>
        <version>1.0</version>
        <type>jar</type>
        <properties>
            <ear.module>true</ear.module>
            <ear.bundle.dir>lib</ear.bundle.dir>
        </properties>
    </dependency>

The generated application.xml (only the module entry)

    <module>
        <java>CertificateServer.jar</java>
    </module>

Since it is not prefixed by the 'library' folder, JBoss is not able to find it and throws ClassNotFoundException.

I would want the above entry to be like this -

    <module>
        <java>library/CertificateServer.jar</java>
    </module>

On manually prefixing the folder, JBoss is able to find the jar.

How should I prefix the jar file path during build ?

Sri Sankaran
  • 8,120
  • 4
  • 38
  • 47
Sundeep
  • 11
  • 1
  • 4
  • At the risk of not answering your question....Is upgrading to Maven-3 or _at least_ Maven-2 an option? – Sri Sankaran Dec 19 '11 at 20:22
  • Unfortunately, at this point there is no plan to invest on upgradation. The application will shortly be set on auto pilot mode. But we need to make some important changes before that, hence this query. – Sundeep Dec 20 '11 at 03:37

0 Answers0