Code Monkey home page Code Monkey logo

Comments (6)

glassfishrobot avatar glassfishrobot commented on August 14, 2024

from jakartaee-firstcup.

glassfishrobot avatar glassfishrobot commented on August 14, 2024

@deglans Commented
After many research it's same to be javaee-api the most correct answer...

from jakartaee-firstcup.

glassfishrobot avatar glassfishrobot commented on August 14, 2024

@deglans Commented
Sorry, i have accidentally close the issue...

from jakartaee-firstcup.

glassfishrobot avatar glassfishrobot commented on August 14, 2024

@bshannon Commented
If you're building a Java EE application for deployment to a Java EE application server,
then compiling against the javaee-api jar file is the right thing to do. Be sure to list it as
a "provided" dependency since you don't want that jar file included in your application
at runtime.

from jakartaee-firstcup.

glassfishrobot avatar glassfishrobot commented on August 14, 2024

@deglans Commented
Do you mean this (https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html):

provided
This is much like compile, but indicates you expect the JDK or a container to provide the dependency at runtime. For example, when building a web application for the Java Enterprise Edition, you would set the dependency on the Servlet API and related Java EE APIs to scope provided because the web container provides those classes. This scope is only available on the compilation and test classpath, and is not transitive.

So the pom.xml become:

<dependency>
   <groupId>javax</groupId>
   <artifactId>javaee-api</artifactId>
   <version>8.0</version>
   <type>jar</type>
   <scope>provided</scope>
</dependency>

Is that right?
I think this explanation should be included in the tutorial....

from jakartaee-firstcup.

glassfishrobot avatar glassfishrobot commented on August 14, 2024

@bshannon Commented
Yes.

from jakartaee-firstcup.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.