Hi,

jzhang schrieb:
I am using Maven 2.0.7. In my ear file, I have a ejb jar (called core.jar)
that depends on common.jar. They are all in the same ear. I want to have
core.jar manifest.mf file have Class-Path entry for common.jar. But I can
not get that work. I follow maven-ejb-plugin instruction:

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-ejb-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                        </manifest>
                    </archive>
                    <!--<generateClient>true</generateClient>-->
                </configuration>
            </plugin>

And I ran: mvn install. The new generated ejb jar file's manifest does not
have Class-Path entry.

Your configuration looks correct and should work. However since <addClasspath/> adds classpath entries for dependencies of your project to the manifest and you seem not to have declared dependencies it may be that maven omits the empty classpath entry.

Besides, I want to add common.jar to this path. Then I add:

<dependency>
            <groupId>${pom.groupId}</groupId>
            <artifactId>my-common</artifactId>
            <version>${pom.version}</version>
<properties>
                        <ejb.manifest.classpath>true</ejb.manifest.classpath>
                </properties>
                
        </dependency>

Then I got 'org.apache.maven.reactor.MavenExecutionException: Parse error
reading POM. Reason: Unrecognised tag: 'properties' (position: START_TAG
seen ...\r\n            <properties>... @18:25' error.

It seems I can not put <properties> tag in <dependency> element. What is
wrong?

It's just as you say: you can't put a <properties/> tag into an dependency element. I think maven 1 had such a syntax but not maven 2. See [1] and [2] for a reference for the pom.

-Tim

[1] http://maven.apache.org/pom.html
[2] http://maven.apache.org/ref/current/maven-model/maven.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to