I think your right, somehow the excludes not working in the ejb plugin is
overriding the excludes that now works in the jar plugin (2.2-SNAPSHOT). The
ejb plugin is only at version 2.1 so my guess is the path that was put into
the jar plugin needs to go into the ejb plugin. 

I will try to submit this as an issue.

Regards,
Mark


Tim Kettler wrote:
> 
> I think the reason he's using both plugins is that the ejb-plugin
> currently doesn't provide the includes/excludes configuration as
> the jar plugin. So the intention is not to produce two (main) artifacts
> from the same pom but to just to have the ejb and a ejb-client jar.
> 
> What happens with this pom snippet is that the jar produced by the
> jar-plugin is overwritten by the jar produced by the ejb-plugin, as both
> produce main artifacts (with the same filename) for the project. You can
> try moving the jar-plugin configuration afer the ejb-plugin in your pom
> and see if that helps.
> 
> The real solution for this of course is to support the includes/excludes
> configuration in the ejb plugin, too.
> 
> -Tim
> 
> Wayne Fay schrieb:
>> Is there a specific reason you're building both artifacts out of the
>> one codebase? Can you not break it into 2 separate codebases and
>> specify one as "jar" and the other as "ejb" and then put a dependency
>> in the ejb on the jar project, as I'm assuming the ejb needs the jar
>> files to work (like a utility library)?
>> 
>> This is the "Maven way" to do things. Of course, you can do it however
>> you want, but I generally find it easiest to just do what Maven is
>> expecting.
>> 
>> Wayne
>> 
>> On 10/18/07, Mark_E <[EMAIL PROTECTED]> wrote:
>>> Hi Wayne,
>>>    I am actually building both a jar and ejb in the same project, here
>>> are
>>> the 2 plugins I use.
>>>
>>>     <plugin>
>>>          <groupId>org.apache.maven.plugins</groupId>
>>>          <artifactId>maven-jar-plugin</artifactId>
>>>          <version>2.2-SNAPSHOT</version>
>>>          <configuration>
>>>             <excludes>
>>>               <exclude>**/handlers/**/*.*</exclude>
>>>             </excludes>
>>>          </configuration>
>>>      </plugin>
>>>     <plugin>
>>>        <groupId>org.apache.maven.plugins</groupId>
>>>        <artifactId>maven-ejb-plugin</artifactId>
>>>        <executions>
>>>         <execution>
>>>           <id>ejb-client</id>
>>>            <phase>package</phase>
>>>           <goals>
>>>              <goal>ejb</goal>
>>>           </goals>
>>>         </execution>
>>>        </executions>
>>>        <configuration>
>>>          <ejbVersion>2.1</ejbVersion>
>>>          <generateClient>true</generateClient>
>>>          <archive>
>>>            <manifest>
>>>              <addClasspath>true</addClasspath>
>>>              <classpathPrefix>lib</classpathPrefix>
>>>            </manifest>
>>>          </archive>
>>>          <clientIncludes>
>>>              <clientInclude>com/**/ejb/**/*.class</clientInclude>
>>>              <clientInclude>META-INF/jboss.xml</clientInclude>
>>>              <clientInclude>META-INF/ejb-jar.xml</clientInclude>
>>>          </clientIncludes>
>>>        </configuration>
>>>     </plugin>
>>>
>>> If Maven does not like that I am build both artifacts, I may just create
>>> the
>>> EJB inside the antrun plugin, since I already have the compiled classes
>>> from
>>> the compile phase. If you have any other suggestions, that would be
>>> great.
>>>
>>>
>>> Regards,
>>> Mark
>>>
>>> Wayne Fay wrote:
>>>> Are you building both a Jar and an EJB Jar in a single Maven project?
>>>> Or are these 2 separate projects that have a common parent?
>>>>
>>>> Maven likes 1 artifact per module. Please explain your project better
>>>> and/or send the poms for diagnosis.
>>>>
>>>> Wayne
>>>>
>>>> On 10/18/07, Mark_E <[EMAIL PROTECTED]> wrote:
>>>>> Hello,
>>>>>  I am running into a strange situation with the maven-ejb-plugin and
>>>>> maven-jar-plugin
>>>>>
>>>>> I am performing a build, building a jar and an ejb. Seems that when I
>>>>> execute the ejb plugin during the package phase, it messes up the
>>>>> execution
>>>>> of the maven-jar-plugin.
>>>>>
>>>>> For example, I am using the snapshot version of the maven-jar-plugin
>>>>> (2.2)
>>>>> that contains the excludes fix. If I build both an ejb and jar in my
>>>>> project, it seems to override the exclude switch in the jar plugin and
>>>>> I
>>>>> get
>>>>> files I do not want in the jar.
>>>>>
>>>>> If I turn off the maven-ejb-plugin in my build and re-run the mvn
>>>>> package
>>>>> command, the exclude switch in the jar plugin works fine and I do not
>>>>> get
>>>>> the files I excludes from my jar.
>>>>>
>>>>> I am running version 2.1 of the EJB Plugin.
>>>>>
>>>>> Just wondering if anyone else is running into this. Maybe I am doing
>>>>> something wrong? I thought it might be the clientInclude switch used
>>>>> in
>>>>> the
>>>>> ejb plugin so I disabled this in my pom.xml but the issue still
>>>>> exists. I
>>>>> have to comment out the ejb plugin all together to get the excludes
>>>>> for
>>>>> the
>>>>> jar to work.
>>>>>
>>>>> Anyway, if anyone has any suggestions, I would appreciate them very
>>>>> much.
>>>>> I
>>>>> need to get this resolved and I would like to use the maven plugin as
>>>>> opposed to have to do it with Ant.
>>>>>
>>>>> Regards,
>>>>> Mark
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/Possible-conflict-with-ejb-and-jar-plugins-tf4649756s177.html#a13283698
>>>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>>
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>>
>>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Possible-conflict-with-ejb-and-jar-plugins-tf4649756s177.html#a13284025
>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Possible-conflict-with-ejb-and-jar-plugins-tf4649756s177.html#a13301908
Sent from the Maven - Users mailing list archive at Nabble.com.


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

Reply via email to