0

Hi I've created an new Maven Enterprise Application, which gives me 3 modules: {proj}-ear, {proj}-web and {proj}-ejb.

I think my Facelets and JSF beans should be in {proj}-web, but in this module, I cannot import from javax.batch.*. If I put the batch processing java classes in {proj}-ejb, I cannot refer them from {proj}-web. How should I do this?

In fact I am fine with just {proj}-web, so long as I can use batch processing.

cpliu338
  • 645
  • 1
  • 7
  • 20

1 Answers1

1

When you create a new Java EE 7 web profile maven application( in NetBeans), in the pom.xml file, one of the dependencies will be:

 <dependency>
      <groupId>javax</groupId>
      <artifactId>javaee-web-api</artifactId>
      <version>7.0</version>
      <scope>provided</scope>
 </dependency>

To use the packages of the batch processing API, replace the above dependency with :

<dependency>
    <groupId>javax</groupId>
    <artifactId>javaee-api</artifactId>
    <version>7.0</version>
    <scope>provided</scope>
</dependency>

That is replace javaee-web-api with javaee-api

nashtry
  • 48
  • 4