thanks will keep in mind Regards, B. Ravi Shankar
2010/11/12 Ron Wheeler [via Maven] < [email protected]<ml-node%[email protected]> > > On 12/11/2010 12:24 AM, banka.ravi wrote: > > by mentioning "Looking for classes", I did not meant the source code, I > was > > mentioning . I extracted the war file manually using 7zip tool and found > > that it had compiled .class files. I know that war contains all > resources. > > Our project don't have separate modules for Model, View and Controllers. > And > > its high time to setup everything like that. so, I am finding a way to > > generate jar also in the war project and setting fer other projects > depend > The jar is its own project and probably can be released earlier than the > war. > The jar can be machine tested. > The war can not be completely tested because it contains visual elements > and navigation and flow that usually requires manual testing. > > In a large project (2-3 people is enough), the jar and war have > different teams working on them. > The jar file possibly has database access, web services, etc. > The war project might include graphic artists, SEO experts and someone > in charge of UI standards and practices (might all be the same guy). It > will not need database or web service expertise. > > In my ideal world, a war file will depend on a jar of function specific > code and a few jar of our utiities and 3rd party code. > > Maven should help you build smaller, easier to test modules that are > combined into application WARs (servelets, portlets, webservices) and > standalone (batch) jobs. > > You should be able to control releases and SNAPSHOTs easily. > > Try to avoid big projects with lots of unrelated functionality. It makes > them unstable and hard to manage. > Small projects built by one or two people that do specific things are > much easier to manage and lead you much quicker to an SOA, which is a > nice place to live. > > Ron > > > Ron > > > on that. > > > > Regards, > > B. Ravi Shankar > > > > 2010/11/11 Ron Wheeler [via Maven]< > > [hidden email] > > <http://user/SendEmail.jtp?type=node&node=3262263&i=0><[hidden > email] <http://user/SendEmail.jtp?type=node&node=3262263&i=1>> > >> War project has almost no code or preferably no code . > >> Code is in jar project. > >> > >> War project has WebContent stuff (configurations, XML, images, JSPs) and > > >> depends on your Jar project for its classes. It will create a WAR file > >> with the classes from the dependencies. > >> > >> Ron > >> > >> > >> On 11/11/2010 8:29 AM, banka.ravi wrote: > >> > >>> I tried using classifier already, it is not working. > >>> > >>> Currently, the maven project where I have all the implementations is > >>> generating war file. If I add another maven project for generating JAR, > > >> from > >>> where will this project get the source files from? I can add a > dependency > >> on > >>> first project then my second project will have access to the war > >> generated, > >>> right. What I wrote in my earlier mail was, should my second project > >> extract > >>> the war. locate the .class files then again package them in to jar? but > > >> that > >>> will be lots of work right? > >>> > >>> Regards, > >>> B. Ravi Shankar > >>> > >>> 2010/11/11 Kalpak Gadre [via Maven]< > >>> [hidden > >>> email]<http://user/SendEmail.jtp?type=node&node=3260435&i=0><[hidden > > >> email]<http://user/SendEmail.jtp?type=node&node=3260435&i=1>> > >>>> On Thursday 11 November 2010 03:19 PM, banka.ravi wrote: > >>>>> The jar file is getting generated (as "projectVersion-modals.jar", > but > >>>> the > >>>>> war file is named as "projectVersion.war") and also getting installed > > >> to > >>>> the > >>>>> repository. But wen I try to reference it in the pom of the dependent > > >>>>> project, the wizard don't work, it shows only the > "projectVersion.war". > >>>>> How do I add the "projectVersion.jar" as a dependency? > >>>> Use dependency classifier. Specifying type as jar is not required > since > >>>> it is the default. > >>>> > >>>> <dependency> > >>>> <groupId>your.groupId</groupId> > >>>> <artifactId>your-artifactId</artifactId> > >>>> <version>${project.version}</version> > >>>> <classifier>modals</classifier> > >>>> <type>jar</type> > >>>> </dependency> > >>>> > >>>> > >>>>> Separate modules you mean separate Maven Projects? Then I don't get > the > >>>>> other modules source files right. I will have to unpack the war and > >>>> repack > >>>>> them as jar? > >>>> Yes separate module means separate Maven Project. I did not understand > > >>>> the rest of your comment. > >>>> > >>>> - Kalpak > >>>> > >>>>> Regards, > >>>>> B. Ravi Shankar > >>>>> > >>>>> 2010/11/11 Kalpak Gadre [via Maven]< > >>>>> [hidden > >>>>> email]<http://user/SendEmail.jtp?type=node&node=3260044&i=0><[hidden > > >>>> email]<http://user/SendEmail.jtp?type=node&node=3260044&i=1>> > >>>>>> To make it work the Maven way, you should ideally separate the > jar > >>>>>> from the war file as an independent module. Your war file will then > >>>>>> depend on the jar. > >>>>>> > >>>>>> Not sure if your packaging is war, adding maven-jar-plugin creates a > > >> jar > >>>>>> file? If it does then you can use build-helper-maven-plugin to > install > >>>>>> the additional jar generated to the repository. > >>>>>> > >>>>>> In any case you can even depend on the war file with dependency > >>>>>> definition like, > >>>>>> > >>>>>> <dependency> > >>>>>> <groupId>mycorp.groupid</groupId> > >>>>>> <artifactId>mycorp-artifactid</artifactId> > >>>>>> <version>myversion</version> > >>>>>> <type>war</type> > >>>>>> </dependency> > >>>>>> > >>>>>> But I would strongly recommend separating jar and war as separate > >>>> module. > >>>>>> - Kalpak > >>>>>> > >>>>>>> I have a scenario where in my pom generates a war file. Whereas I > >> also > >>>>>> need a > >>>>>>> jar of the same to be referenced by other projects. So I added a > >>>>>>> maven-jar-plug-in to generate a jar for the same. As the pom was > >>>>>> installing > >>>>>>> this generated jar as the war to the repository. I mentioned a > >>>> classifier > >>>>>> to > >>>>>>> differentiate this jar with war. Now the problem is how I should > put > >> a > >>>>>>> dependency in other projects on this jar file. > >>>>>>> > >>>>>>> Thanks in advance > >>>>>>> Ravi > >>>>>>> > >>>>>> > --------------------------------------------------------------------- > >>>>>> To unsubscribe, e-mail: [hidden email]< > >>>> http://user/SendEmail.jtp?type=node&node=3259883&i=0> > >>>>>> For additional commands, e-mail: [hidden email]< > >>>> http://user/SendEmail.jtp?type=node&node=3259883&i=1> > >>>>>> > >>>>>> ------------------------------ > >>>>>> View message @ > >>>>>> > >> > http://maven.40175.n5.nabble.com/Setting-dependency-with-plugin-generated-jar-tp3259867p3259883.html<http://maven.40175.n5.nabble.com/Setting-dependency-with-plugin-generated-jar-tp3259867p3259883.html?by-user=t> > < > http://maven.40175.n5.nabble.com/Setting-dependency-with-plugin-generated-jar-tp3259867p3259883.html?by-user=t<http://maven.40175.n5.nabble.com/Setting-dependency-with-plugin-generated-jar-tp3259867p3259883.html?by-user=t&by-user=t>> > > >> < > >> > http://maven.40175.n5.nabble.com/Setting-dependency-with-plugin-generated-jar-tp3259867p3259883.html?by-user=t<http://maven.40175.n5.nabble.com/Setting-dependency-with-plugin-generated-jar-tp3259867p3259883.html?by-user=t&by-user=t> > < > http://maven.40175.n5.nabble.com/Setting-dependency-with-plugin-generated-jar-tp3259867p3259883.html?by-user=t&by-user=t<http://maven.40175.n5.nabble.com/Setting-dependency-with-plugin-generated-jar-tp3259867p3259883.html?by-user=t&by-user=t&by-user=t>>> > > >> > >>>>>> To unsubscribe from Setting dependency with plugin generated jar, > >> click > >>>>>> here< > >> > http://maven.40175.n5.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_code&node=3259867&code=YmFua2EucmF2aUBnbWFpbC5jb218MzI1OTg2N3wtODYyMDIzNzQ0<http://maven.40175.n5.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_code&node=3259867&code=YmFua2EucmF2aUBnbWFpbC5jb218MzI1OTg2N3wtODYyMDIzNzQ0&by-user=t> > < > http://maven.40175.n5.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_code&node=3259867&code=YmFua2EucmF2aUBnbWFpbC5jb218MzI1OTg2N3wtODYyMDIzNzQ0&by-user=t<http://maven.40175.n5.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_code&node=3259867&code=YmFua2EucmF2aUBnbWFpbC5jb218MzI1OTg2N3wtODYyMDIzNzQ0&by-user=t&by-user=t>> > > >> < > >> > http://maven.40175.n5.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_code&node=3259867&code=YmFua2EucmF2aUBnbWFpbC5jb218MzI1OTg2N3wtODYyMDIzNzQ0&by-user=t<http://maven.40175.n5.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_code&node=3259867&code=YmFua2EucmF2aUBnbWFpbC5jb218MzI1OTg2N3wtODYyMDIzNzQ0&by-user=t&by-user=t> > < > http://maven.40175.n5.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_code&node=3259867&code=YmFua2EucmF2aUBnbWFpbC5jb218MzI1OTg2N3wtODYyMDIzNzQ0&by-user=t&by-user=t<http://maven.40175.n5.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_code&node=3259867&code=YmFua2EucmF2aUBnbWFpbC5jb218MzI1OTg2N3wtODYyMDIzNzQ0&by-user=t&by-user=t&by-user=t>>>>. > > >> > >>>>>> > >>>> --------------------------------------------------------------------- > >>>> To unsubscribe, e-mail: [hidden email]< > >> http://user/SendEmail.jtp?type=node&node=3260044&i=2> > >>>> For additional commands, e-mail: [hidden email]< > >> http://user/SendEmail.jtp?type=node&node=3260044&i=3> > >>>> > >>>> > >>>> ------------------------------ > >>>> View message @ > >>>> > >> > http://maven.40175.n5.nabble.com/Setting-dependency-with-plugin-generated-jar-tp3259867p3260044.html<http://maven.40175.n5.nabble.com/Setting-dependency-with-plugin-generated-jar-tp3259867p3260044.html?by-user=t> > < > http://maven.40175.n5.nabble.com/Setting-dependency-with-plugin-generated-jar-tp3259867p3260044.html?by-user=t<http://maven.40175.n5.nabble.com/Setting-dependency-with-plugin-generated-jar-tp3259867p3260044.html?by-user=t&by-user=t>> > > >>>> To unsubscribe from Setting dependency with plugin generated jar, > click > >>>> here< > >> > http://maven.40175.n5.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_code&node=3259867&code=YmFua2EucmF2aUBnbWFpbC5jb218MzI1OTg2N3wtODYyMDIzNzQ0<http://maven.40175.n5.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_code&node=3259867&code=YmFua2EucmF2aUBnbWFpbC5jb218MzI1OTg2N3wtODYyMDIzNzQ0&by-user=t> > < > http://maven.40175.n5.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_code&node=3259867&code=YmFua2EucmF2aUBnbWFpbC5jb218MzI1OTg2N3wtODYyMDIzNzQ0&by-user=t<http://maven.40175.n5.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_code&node=3259867&code=YmFua2EucmF2aUBnbWFpbC5jb218MzI1OTg2N3wtODYyMDIzNzQ0&by-user=t&by-user=t>>>. > > >> > >>>> > >>>> > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [hidden email]< > http://user/SendEmail.jtp?type=node&node=3260435&i=2> > >> For additional commands, e-mail: [hidden email]< > http://user/SendEmail.jtp?type=node&node=3260435&i=3> > >> > >> > >> > >> ------------------------------ > >> View message @ > >> > http://maven.40175.n5.nabble.com/Setting-dependency-with-plugin-generated-jar-tp3259867p3260435.html<http://maven.40175.n5.nabble.com/Setting-dependency-with-plugin-generated-jar-tp3259867p3260435.html?by-user=t> > >> To unsubscribe from Setting dependency with plugin generated jar, click > >> here< > http://maven.40175.n5.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_code&node=3259867&code=YmFua2EucmF2aUBnbWFpbC5jb218MzI1OTg2N3wtODYyMDIzNzQ0<http://maven.40175.n5.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_code&node=3259867&code=YmFua2EucmF2aUBnbWFpbC5jb218MzI1OTg2N3wtODYyMDIzNzQ0&by-user=t>>. > > >> > >> > >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden > email]<http://user/SendEmail.jtp?type=node&node=3262263&i=2> > For additional commands, e-mail: [hidden > email]<http://user/SendEmail.jtp?type=node&node=3262263&i=3> > > > > ------------------------------ > View message @ > http://maven.40175.n5.nabble.com/Setting-dependency-with-plugin-generated-jar-tp3259867p3262263.html > To unsubscribe from Setting dependency with plugin generated jar, click > here<http://maven.40175.n5.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_code&node=3259867&code=YmFua2EucmF2aUBnbWFpbC5jb218MzI1OTg2N3wtODYyMDIzNzQ0>. > > > -- View this message in context: http://maven.40175.n5.nabble.com/Setting-dependency-with-plugin-generated-jar-tp3259867p3262398.html Sent from the Maven - Users mailing list archive at Nabble.com.
