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]

Reply via email to