Java Reference
In-Depth Information
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<version>2.3</version>
<configuration>
<ejbVersion>3.1</ejbVersion>
<generateClient>true</generateClient>
</configuration>
</plugin>
</plugins>
</build>
In the first part of the XML fragment, we have specified the project's finalName
attribute that will dictate the name of the packaged artifact (in our example, the pro-
ject's name corresponds to our project's artifact ID, so it will be named ticket-
agency-ejb.jar ).
The artifact ID named jboss-as-maven-plugin will actually trigger the JBoss
Maven plugin that will be used to deploy our project.
You should also include the maven-compiler-plugin artifact that can be used to
enforce the Java 1.6 compatibility and activate the annotation processors as well.
Finally, maven-ejb-plugin should already be part of your pom.xml file since we
have chosen an EJB archetype. You should set the generateClient option to
true (the default is false ) in order to create the EJB client classes.
Note
All information about plugin versions has been hardcoded into the plugin config-
uration for the sake of readability. As you can see from the source code that is
part of this topic, you should use properties to set up the core project's attributes.
Search WWH ::




Custom Search