Tim,
I think you are right. The project set up has more than I need for EJB. I
will double check the dependencies. But I still the plugin provides some
sort of selection mechanism.
J
Tim Kettler wrote:
>
> I don't know a way to do this. Why do you want to do this at all? Either
> your jar depends on a other jar, then you declare it in a dependency and
> it ends up in the classpath entry or you dont't depend on it, then just
> don't declare the dependency at all.
>
> -Tim
>
> jzhang schrieb:
>> Tim,
>>
>> You are right. I had <packaging>jar</packaging> instead of
>> <packaging>ejb</packaging> so the ejb-plugin did not get executed. Now
>> all
>> dependencies are in calss-path. Is there anyway I can select some of
>> them? I
>> don't think <includes> works here.
>>
>> Thanks,
>>
>> J
>>
>>
>>
>> jzhang wrote:
>>> 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. 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?
>>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/Having-trouble-using-maven-ejb-plugin----can%27t-get-Class-Path-in-manifest-tf4312954s177.html#a12313575
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]