How to determine dependencies?

2010-05-18 Thread Dan King
Hi all,

I'd like to use CXF's built-in clients, but rather than downloading all of the 
dependencies I'd like to pull only those jars that are relevant and needed for 
the clients. I ran mvn dependency:tree -Dincludes=org.apache.cxf (output is 
below). By examing the output of the dependency tree, I found that the 
cxf-rt-frontend-jaxrs artifact contains the org.apache.cxf.jaxrs.client package 
-- this package provides the clients.

But I don't know where to go from here. How do I determine what 
org.apache.cxf.jaxrs.client package's dependencies are? Also, is there a way to 
determine dependencies of a class?

-- Dependency tree -- 

\- org.apache.cxf:cxf-rt-frontend-jaxrs:jar:2.2.7:compile
[INFO]   +- org.apache.cxf:cxf-common-utilities:jar:2.2.7:compile
[INFO]   +- org.apache.cxf:cxf-api:jar:2.2.7:compile
[INFO]   |  \- org.apache.cxf:cxf-common-schemas:jar:2.2.7:compile
[INFO]   +- org.apache.cxf:cxf-rt-core:jar:2.2.7:compile
[INFO]   +- org.apache.cxf:cxf-rt-bindings-xml:jar:2.2.7:compile
[INFO]   +- org.apache.cxf:cxf-rt-transports-http:jar:2.2.7:compile
[INFO]   \- org.apache.cxf:cxf-rt-databinding-aegis:jar:2.2.7:compile

Thanks.

-Dan


  


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: How to determine dependencies?

2010-05-18 Thread Dan King
 CXF makes a combined jar that you can use.

Do you know where I can find this combined client jar? I've searched everywhere 
with no luck.

If you do not use this beware of incorporating CXF jars into a single 
jar (jar-with-dependencies) since the individual CXF jars have duplicate 
property files that only contain the properties required for the jar 
that they are in and you will end up with one that does not have all the 
properties that CXF needs.

Their combined jar has property files that are complete for all of the 
modules combined.

It may add to your overhead to have modules that you do not need but 
that is infinitely better than having property files that are missing 
properties that CXF needs.

This is exactly my concern; so my preference is to find and use a client jar 
provided by CXF.

Even so I'm curious if it is possible to use maven to dissect dependencies and 
determine which set of dependencies allow for which set of functionality. If 
yes, how?

-Dan


  

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Integrating persistence (sub)module into web app

2010-05-13 Thread Dan King
Hi all,

How can I get maven to automatically copy (or move) my persistence.xml file 
from my persistence module's meta-inf directory to the web app's meta-inf 
directory?

I have a persistence module that contains, among other things, entity classes 
and the persistence.xml file. I've stored the persistence.xml file in 
src/main/resources/meta-inf. When I build the app from the parent directory 
(directory that contains the parent pom), the persistence.xml file is NOT added 
to the META-INF directory of the web app. 

Also, since the persistence.xml file  currently resides in the same jar as the 
entity classes, I do not need to specify them; if I move the persistence.xml 
file to the meta-inf directory I'd have to list the entities. Is there a way 
around this? Thanks.

-Dan



  

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: [Solved] Integrating persistence (sub)module into web app

2010-05-13 Thread Dan King

I have a persistence module that contains, among other things, entity classes 
and the persistence.xml file. I've stored the persistence.xml file in 
src/main/resources/meta-inf. When I build the app from the parent directory 
(directory that contains the parent pom), the persistence.xml file is NOT 
 added to the META-INF directory of the web app. 

Also, since the persistence.xml file  currently resides in the same jar as the 
entity classes, I do not need to specify them; if I move the persistence.xml 
 file to the meta-inf directory I'd have to list the entities. Is there a way 
 around this? Thanks.

The root of the problem was the (fat32) partition where I stored my
code. When I created the  META-INF directory in
src/main/resources the partition renamed it to meta-inf. Therefore during 
the build process the META-INF directory was missing, and thus so was the 
persistence.xml file. I originally thought that I wasn't using maven correctly. 
So as temporary solution I manually added the persistence.xml file to the web 
apps META-INF directory, but this required me to list my entity classes in the 
persistence.xml file; thus leading to my questions above. 

Modifying my partition setting solved the problem.

-Dan




  

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

How can I get maven to automatically copy (or move) my persistence.xml file 
from my persistence module's meta-inf directory to the web app's meta-inf 
directory?



  

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



How to unit testing (sub)module that uses DI?

2010-05-03 Thread Dan King
Hi all,

I have a webapp (sub)module that uses Spring's dependency injection; how 
can/should I load the application context so I may run the unit tests for this 
module? 

Once all the modules are complete, I will add them to the webapp as 
dependencies and load the application context via the web container and 
Spring's ContextLoaderListener.

-Dan



  


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Unclear about maven web app directory structure

2010-04-26 Thread Dan King
 The java folder is for your java source code, while the webapp folder is for
 your web application source files such as jsp files. Create a jar project
 through the quickstart archetype to get an example of the former and the
 webapp archetype shows the latter.

 /Anders

Exactly, you have to see the source/main/... structure as structure by 
type. A Servlet is mostly coded in java, so it is a java file,
if you code it in groovy it would go into src/main/groovy

@Anders, @Wayne, @Werner: thanks for the clarifications, they fully answered my 
immediate queries.

However, I do have one follow-up question. It seems that in the case of 
webapps/web services it make sense to use maven (sub)modules, to that end how 
many (sub)modules should one use? Is there a recommended/best practice? For 
example does the following set of (sub)modules make sense?

web-service/ -- directory that contains parent POM
| models/ (maven sub-module for entities)
| persistence/ (maven sub-module for DAOs)
| service/ (maven sub-module for web service logic)
| webapp/ (maven sub-module for the web app)


  

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Unclear about maven web app directory structure

2010-04-25 Thread Dan King
Hi all,

I've recently started learning/using maven, and I'm unclear where my source 
code is supposed to go. I used the maven archetype:create goal to create a 
webapp. In Maven by Example the servlet source code is placed in 
'src/main/java/'. However, according to Introduction to the Standard Directory 
Layout on the maven website 'src/main/webapp' is for the web application 
sources.

Can someone explain:
1. The difference between the two directories, i.e. /src/main/webapp  
/src/main/java
2. Where the source code is supposed to go?

Thanks.

-Dan 


  

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Unclear about maven web app directory structure

2010-04-25 Thread Dan King
From: Anders Hammar and...@hammar.net

To: Maven Users List users@maven.apache.org
Sent: Sun, April 25, 2010 4:11:57 PM
Subject: Re: Unclear about maven web app directory structure

The java folder is for your java source code, while the webapp folder is for
your web application source files such as jsp files. Create a jar project
through the quickstart archetype to get an example of the former and the
webapp archetype shows the latter.

/Anders

So, if I understand correctly for 'jar' projects the source code goes in the 
src/main/java directory, while in webapps the source code (such as jsps, 
servlets, daos, models, etc.) go into the src/main/webapp directory.

Not to be belabor the question, but why in Maven by Example is the source 
code for the simple servlet in the src/main/java directory?

Link to the example follows: 
http://www.sonatype.com/books/mvnex-book/reference/web-sect-adding-simple-servlet.html

Thanks,
Dan


  

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org