Assuming the jar within the omod target only contains web classes as you say, then how about:
- Rename Target/omod/moduleid-x.y.z.jar to Target/omod/moduleid-omod-x.y.z.jar (only contains web classes) - Create a Target/omod/moduleid-x.y.z.jar that contains both API + web classes (.omod would just be a copy with .omod extension) - mvn deploy would deploy the moduleid-x.y.z.jar containing API + web classes - (eventually) uploading an omod to the module repository would deploy to mvn as well if it hadn't already been done So, devs could either deploy an artifact via mvn deploy *or* just upload their omod to the module repository. -Burke On Mon, Jan 9, 2012 at 3:47 PM, Mark Goodrich <[email protected]> wrote: > Yes… but I’m not exactly sure understand it/agree with it…**** > > ** ** > > I would assume that we would want to use mvn deploy to deploy the > module-api and module-omod jars to maven repo. But, if I’m reading it > right… we won’t use mvn deploy to deploy modules to the maven repo. > Instead we would simply run a mvn package and then create a ticket to add > the module jar to maven repo. It is also unclear exactly what file we > would use as the jar. Running a mvn package creates the following files:* > *** > > ** ** > > Target/api/addresshierarchy-api-2.2.0.jar (which only includes the api > classes)**** > > Target/omod/addresshierarchy-2.2.0.jar (which appears to only include the > omod classes)**** > > Target/omod/addresshierarchy-2.2.0.omod (which assumedly includes both the > omod and api classes)**** > > ** ** > > If we want to reference a module just using > <artifactId>module-name</artifactId> instead of > <artifactId>module-name-api</artifactId> we would have to rename either > addresshierarchy-api-2.2.0.jar or addresshierarchy-2.2.0.omod to > addresshierarchy-2.2.0.jar.**** > > ** ** > > Mark**** > > ** ** > > ** ** > > ** ** > > *From:* [email protected] [mailto:[email protected]] *On Behalf Of *Ben Wolfe > *Sent:* Monday, January 09, 2012 1:55 PM > *To:* [email protected] > *Subject:* Re: [OPENMRS-DEV] Including one mavenized module within > another mavenized module**** > > ** ** > > Have you seen this page? > > https://wiki.openmrs.org/display/docs/Requiring+another+module+in+your+module > > Ben**** > > On Mon, Jan 9, 2012 at 9:33 PM, Mark Goodrich <[email protected]> wrote:** > ** > > Hello all—**** > > **** > > I’m having a little trouble referencing one mavenized module within > another mavenized module and am looking for some feedback on what the > preferred way to do this is via maven.**** > > **** > > I was able to deploy the address hierarchy module to the Openmrs maven > repo via mvn deploy, and confirmed that the addresshierarchy poms and jars > have been successfully added to the repo. Now I have a second module that > uses a service provided by the Address Hierarchy module. I’ve tried linking > address hierarchy as a pom dependency in the main pom and the api pom of > the second module using both the following methods, but in all cases I get > compile errors when building the second module because the relevant Address > Hierarchy classes can’t be found:**** > > **** > > <dependency>**** > > <groupId>org.openmrs.module</groupId>**** > > <artifactId>*addresshierarchy*</artifactId>**** > > <version>2.2.0</version>**** > > <type>pom</type>**** > > <scope>provided</scope>**** > > </dependency>**** > > **** > > <dependency>**** > > <groupId>org.openmrs.module</groupId>**** > > <artifactId>*addresshierarchy-api*</artifactId>**** > > <version>2.2.0</version>**** > > <type>pom</type>**** > > <scope>provided</scope>**** > > </dependency>**** > > **** > > The only way I can get it to build correctly is to reference the > addresshierarchy-api jar directly:**** > > **** > > <dependency>**** > > <groupId>org.openmrs.module</groupId>**** > > <artifactId>*addresshierarchy-api*</artifactId>**** > > <version>2.2.0</version>**** > > <type>jar<type>**** > > <scope>provided</scope>**** > > </dependency>**** > > **** > > Is this what we want? Or is there some way to include via pom that I am > missing?**** > > **** > > Thanks,**** > > Mark**** > > **** > > **** > > **** > ------------------------------ > > Click here to > unsubscribe<[email protected]?body=SIGNOFF%20openmrs-devel-l>from > OpenMRS Developers' mailing list > **** > > ** ** > ------------------------------ > > Click here to > unsubscribe<[email protected]?body=SIGNOFF%20openmrs-devel-l>from > OpenMRS Developers' mailing list > **** > ------------------------------ > Click here to > unsubscribe<[email protected]?body=SIGNOFF%20openmrs-devel-l>from > OpenMRS Developers' mailing list > _________________________________________ To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [email protected] with "SIGNOFF openmrs-devel-l" in the body (not the subject) of your e-mail. [mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l]

