The short answer to your question, Ron, is, well, that we don't do it that way. Taking dependencies and packing them all into a single archive is certainly doable, but when you're planning on going into an environment like OSGi, that's a bad, bad idea. :)
On Tue, Feb 5, 2013 at 8:58 AM, Ron Wheeler <[email protected]>wrote: > Why are you using import rather than compile? > > We built our own jars from the Spring jars so that we only had a single > dependency that had a lot of jars that we needed. > We actually when further and built a single Spring-Hibernate-MySql-Tomcat > jar and made it "provided" so we only installed it once rather than > accumulating all this stuff in each war file. > > When we extended this to other third party tools (JasperReports, CXF, > Faces,etc.), we got our war files down to a point where they only included > our code and were a pleasure to build and deploy. > > Ron > > On 05/02/2013 9:37 AM, Matthew Adams wrote: > >> Nope. >> >> Some products (like Spring or ORMs) modularize their offerings, but there >> are common combinations of those modules that are nice to have for >> convenient use. For example, DataNucleus+JPA, DataNucleus+JDO+RDBMS, or >> DataNucleus+JDO+Mongo. See the various datanucleus-accessplatform-* >> artifacts defined at >> http://www.datanucleus.org/**downloads/maven2/org/**datanucleus/<http://www.datanucleus.org/downloads/maven2/org/datanucleus/>for >> more >> examples. >> >> This is different from what I'm proposing. It's one small additional step >> beyond maven pom imports (see >> http://maven.apache.org/**guides/introduction/** >> introduction-to-dependency-**mechanism.html#Importing_**Dependencies<http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Importing_Dependencies> >> ). >> The extra step is for maven to actually include the dependencies for me; >> with current import support, I still have to add the imported dependencies >> manually. >> >> -matthew >> >> >> David Pratt wrote >> >>> Isn't this exactly what transitive dependencies do? >>> >>> -- >>> David Pratt >>> Sent with Sparrow >>> (http://www.sparrowmailapp.**com/?sig<http://www.sparrowmailapp.com/?sig> >>> ) >>> >>> >>> On Tuesday, February 5, 2013 at 8:10 AM, Matthew Adams wrote: >>> >>> Hi all, >>>> >>>> I started using the pom import feature ( >>>> http://maven.apache.org/**guides/introduction/** >>>> introduction-to-dependency-**mechanism.html#Importing_**Dependencies<http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Importing_Dependencies> >>>> ), >>>> and discovered that it differed from my expectations. What I was looking >>>> for was a way to define a new artifact in a pom that, if used in a >>>> consuming artifact's >>>> >>> <dependencies> >>> , would include all of the dependencies >>> >>>> in the referenced artifact. >>>> >>>> For example, take DataNucleus. I've defined my own pom for import >>>> purposes >>>> that contains both the >>>> >>> <dependencyManagement> >>> section and >>> <dependencies> >>> >>>> that are to be included. It's at >>>> https://github.com/**matthewadams/datanucleus-** >>>> rdbms/blob/master/pom.xml<https://github.com/matthewadams/datanucleus-rdbms/blob/master/pom.xml> >>>> . >>>> >>>> As a client, if I use the existing pom import support, then all I >>>> effectively get are entries in my pom's >>>> >>> <dependencyManagement> >>> section. >>> >>>> The inconvenient thing is, I still have to declare each of the imported >>>> pom's dependencies that I want. That kind of defeats the purpose of >>>> defining a pom to be imported, IMHO. >>>> >>>> Instead, I'd like to propose that a new scope be introduced called >>>> "include", that implies >>>> >>> <type> >>> pom >>> </type> >>> so that all I have to do is use >>> >>>> the following in my consuming pom: >>>> >>>> <?xml version="1.0" encoding="UTF-8" standalone="no"?> >>>> >>>> >>>> <project >>> >>> >>>> xmlns="http://maven.apache.**org/POM/4.0.0<http://maven.apache.org/POM/4.0.0> >>>> " >>>> >>>> xmlns:xsi="http://www.w3.org/**2001/XMLSchema-instance<http://www.w3.org/2001/XMLSchema-instance> >>>> " >>>> >>>> xsi:schemaLocation="http://**maven.apache.org/POM/4.0.0<http://maven.apache.org/POM/4.0.0> >>>> http://maven.apache.org/maven-**v4_0_0.xsd<http://maven.apache.org/maven-v4_0_0.xsd> >>>> "> >>>> >>>> >>>> <modelVersion> >>> 4.0.0 >>> </modelVersion> >>> >>>> >>>> >>>> <groupId> >>> me.matthewadams >>> </groupId> >>> >>>> >>>> <artifactId> >>> pom-include-client >>> </artifactId> >>> >>>> >>>> <version> >>> 0.1.0.BUILD-SNAPSHOT >>> </version> >>> >>>> >>>> <packaging> >>> jar >>> </packaging> >>> >>>> >>>> >>>> <dependencies> >>> >>>> >>>> >>>> <dependency> >>> >>>> >>>> <groupId> >>> me.matthewadams >>> </groupId> >>> >>>> >>>> <artifactId> >>> datanucleus-rdbms >>> </artifactId> >>> >>>> >>>> >>>> <scope> >>> include >>> </scope> >>> >>> >>>> >>>> <version> >>> 3.1.4 >>> </version> >>> >>>> >>>> </dependency> >>> >>>> >>>> </dependencies> >>> >>>> >>>> </project> >>> >>>> This way, it's extremely convenient to get all the constituent artifacts >>>> without having to declare them all. >>>> >>>> Thoughts? >>>> >>>> -matthew >>>> >>>> -- >>>> mailto: >>>> >>> matthew@ >>> < >>> matthew@ >>> (mailto: >>> matthew@ >>> )> >>> >>>> skype:matthewadams12 >>>> googletalk: >>>> >>> matthew@ >>> (mailto: >>> matthew@ >>> ) >>> >>>> http://matthewadams.me >>>> http://www.linkedin.com/in/**matthewadams<http://www.linkedin.com/in/matthewadams> >>>> >>>> >>>> >> >> >> >> -- >> View this message in context: http://maven.40175.n5.nabble.** >> com/New-Maven-idea-include-**import-tp5745916p5745923.html<http://maven.40175.n5.nabble.com/New-Maven-idea-include-import-tp5745916p5745923.html> >> Sent from the Maven - Users mailing list archive at Nabble.com. >> >> ------------------------------**------------------------------**--------- >> To unsubscribe, e-mail: >> users-unsubscribe@maven.**apache.org<[email protected]> >> For additional commands, e-mail: [email protected] >> >> >> > > -- > Ron Wheeler > President > Artifact Software Inc > email: [email protected] > skype: ronaldmwheeler > phone: 866-970-2435, ext 102 > > > ------------------------------**------------------------------**--------- > To unsubscribe, e-mail: > users-unsubscribe@maven.**apache.org<[email protected]> > For additional commands, e-mail: [email protected] > > -- mailto:[email protected] <[email protected]> skype:matthewadams12 googletalk:[email protected] http://matthewadams.me http://www.linkedin.com/in/matthewadams
