maven 2 - Transitive dependencies in Maven2 -
i've started using maven2 after using ant last 3 years. far i'm seeing i'm still getting grips structure of tool , integration intellij , whats going on in background.
one of biggest draws maven ability resolve dependencies transitively part of build process, having problems feature @ moment through lack of understanding believe.
consider simple java ee project (simple web services) consisting of following modules: core (persistence entities, , generic dao jpa implementation), ejb-component(ejb3 web service - dependent on core), , webapp (spring web service - dependent on core).
i've installed core module , available in repository, , i've added dependency of both ejb module , webapp module scope of compile. however, if dont have javaee api dependency in webapp module won't compile. @ moment source code pojo no metadata.
any appreciated!
however, if dont have javaee api dependency in webapp module won't compile. @ moment source code pojo no metadata.
web apps (and java ee modules in general) of time need compile time dependency on java ee apis servlet api, etc provided @ runtime container. when using maven, such dependencies declared provided
scope. example:
<dependency> <groupid>javax</groupid> <artifactid>javaee-api</artifactid> <version>6.0</version> <scope>provided</scope> </dependency>
in case, since mention compilation problem, i'm tempted webapp module missing dependency on api should declared mentioned above.
what unclear how relates question title. maybe providing relevant part of poms , exact error more precise answer.
Comments
Post a Comment