Thanks again. Your explanation is fine. I have a few questions specific to my 
case -

1) I use maven 1.0.2, since there doesnt seem to be a good netbeans mevenide 
plugin for maven 2. Many things explained in the link you gave dont seem to be 
present in maven 1.0.2. Do you think I can still go in the same way?

2) In maven 1.0.2, adding an <extend> created some problems for me. The child 
project just needed some files from the parent (NOT as classpath, but a copy of 
some of the class files generated by the parent, to be added to its own jar). 
Now when I added the <extend> to the child, it started executing the ejbdoclet 
tasks defined in the parent (the child is just a simple jar:jar task and 
nothing more). I'm not sure if this is the way parent-child is supposed to work.

3) Suppose a project compiles and generates a bunch of classes. At the end, 
maven jars it all up to create the artifact. Now, is there a way for me to 
exclude some of the compiled classes from being added to the artifact? You may 
want to ask me not to compile those unwanted classes at all, but thats not an 
option for me. In other words, is it true that ALL the classes in the target 
folder will always go into the final jar? Can it be controlled?

Thanks
Karthik.


Alexandre Poitras <[EMAIL PROTECTED]> wrote: First I suggest you yo read this :
http://maven.apache.org/guides/getting-started/index.html#How%20do%20I%20build%20more%20than%20one%20project%20at%20once?

So the idea now is to create a parent project using the structure
explained in the document:

+- pom.xml
+-my-commons
| +- pom.xml
+- my-ejb
| +- pom.xml
+- my-webapp
| +- pom.xml
+- my-app-ear
| +- pom.xml

Don't forget to declare the parents in the children pom.xml like it is
explained in the guide.
Now just add a dependency in both my-webapp and my-ejb pom.xml files
pointing on the my-commons project. Then add two dependencies in the
my-app-ear pom.xml file pointing on my-webapp and my-ejb projects.
Finally, declare the my-app-ear packaging as "ear" then you'll need to
do to get your ear is run "mvn packaging" in the parent project
directory.

Hope it is clear enough since english isn't my native language! Don't
be afraid to ask more if you don't understand.



On 1/3/06, Karthik V  wrote:
> Hi,
>
> Thanks a lot for the quick reply. I'm not sure if I explained properly. Below 
> is my requirement:
>
> myproj.ear
> -- myproj-bean.jar
> -- myproj.war
>    -- all jsps, css
>    -- WEB-INF/lib/myproj-web.jar
>    -- WEB-INF/lib/(other 3rd party jars)
> -- meta-inf
>    -- application.xml
> -- some 3rd party jar files
> -- some config files
>
> In the above, you can see 2 jars, myproj-bean.jar and myproj-web.jar. I have 
> one set of source files which generate classes and xml files. From this 
> output, I have to pick some class files for myproj-web.jar, and put the 
> remaining (with some overlap) in myproj-bean.jar.
>
> Please tell me how I can create maven project for this (the parent-child 
> relationships, the folder structure etc.)
>
> Thanks
> Karthik.
>
>
> Alexandre Poitras  wrote: First, from what I understand you want two jars for 
> your ejb, ie.
> ejb-client.jar and ejb-impl.jar.
>
> If this is what you are looking for, this page might help :
> http://maven.apache.org/plugins/maven-ejb-plugin/howto.html
> *you should declare an "ejb" packaging in your ejb pom.
> **To include a dependency to your ejb client into another project, you
> need to use the type "ejb-client" in the type element of the
> dependency declaration
>
> Hope this help!
>
>
>
> On 1/3/06, Karthik V  wrote:
> > Hi All,
> >
> > I'm new to maven and xdoclet and I have a confusion in organizing my 
> > project. I need to run ejbdoclet and hibernatedoclet on my source, then 
> > compile. After this, I need to create 2 jar files, each of them containing 
> > some files from the previous steps' output.
> >
> > By default, one jar is created as the artifact. This one contains ALL the 
> > class files, but this isnt what I want (I need only some of them to be 
> > present in the jar). The rest of the class files (with some overlap) should 
> > go into another jar.
> >
> > I'm not sure how to exclude .class files from the artifact coz they seem to 
> > be happening by default. Also, I tried creating a new project for the 2nd 
> > jar, extending the previous. Now, I need some way to copy the class files I 
> > need from the parent and jar them up. I used "jar:jar" as the default goal 
> > for this new project, extended the previous project, added the parent's 
> > classes as resources. But this new one seems to be running ejbdoc let, 
> > trying to create xml files (all this is being done only in the previous 
> > proj), throwing a lot of errors.
> >
> > Please help me by giving a proper way to accomplish this task.
> >
> > Thanks
> > Karthik.
> >
> >
> >
> >
> > ---------------------------------
> > Yahoo! Shopping
> >  Find Great Deals on Holiday Gifts at Yahoo! Shopping
> >
>
>
> --
> Alexandre Poitras
> Qu�bec, Canada
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>
> ---------------------------------
> Yahoo! Photos
>  Ring in the New Year with Photo Calendars. Add photos, events, holidays, 
> whatever.
>


--
Alexandre Poitras
Québec, Canada



                
---------------------------------
 Yahoo! DSL Something to write home about. Just $16.99/mo. or less

Reply via email to