Re: Want explain on Dependencies Scope

2006-07-21 Thread Roy Siu

Yes, it's what i want
-- 
View this message in context: 
http://www.nabble.com/Want-explain-on-Dependencies-Scope-tf1979614.html#a5442789
Sent from the Maven - Users forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Want explain on Dependencies Scope

2006-07-21 Thread Roy Siu

Thanks.  I have read it yet. But the samples do not suit my case. What I want
is how to let project A use project B's wrapper function of project C, in
which the function use "Class.forName" or more specific that how can my
[plugin] project use [CommonLib]'s wrapper of [JDom's XPath]'s function
which use "Class.forName" to dynamic load classes.
-- 
View this message in context: 
http://www.nabble.com/Want-explain-on-Dependencies-Scope-tf1979614.html#a5436211
Sent from the Maven - Users forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Want explain on Dependencies Scope

2006-07-21 Thread Roy Siu

I just want to know how can my [plugin] project use [jaxen], [saxpath]
properly with only set dependency on [CommonLib]. 

Or more general, if there is artifact C, B, A, X-Z

  - artifact A has a function dynamic load (Class.forName) some of the class
appeared in project X-Z
  - artifact B wrap the project A function into a class 
  - artifact C want to use project B's wrapper class of project A function

Then what dependency and corresponding scope I need to set in pom.xml of
artifact C and artifact B?
-- 
View this message in context: 
http://www.nabble.com/Want-explain-on-Dependencies-Scope-tf1979614.html#a5436092
Sent from the Maven - Users forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Want explain on Dependencies Scope

2006-07-21 Thread Roy Siu

I am newbie to Maven, and now want to write a custom plugin. But I get
confuse on maven's transitive dependency handling. My poms' dependencies
setting is something like:


Project A

  ... 

  saxpath
  saxpath
  1.0-FCS
  ${compile}


  jaxen
  jaxen
  1.0-FCS
  ${compile}

...


   (1)  (2)
[pluginProject]  <---  [CommonLib] <--- [Jaxen]
 <-- [saxpath]


I have read an article 
http://cvs.peopleware.be/training/maven/maven2/dependencies.html
http://cvs.peopleware.be/training/maven/maven2/dependencies.html  and test
with all the scope dependency 

I get confuse on the dependency scope.

   
-- 
View this message in context: 
http://www.nabble.com/Want-explain-on-Dependencies-Scope-tf1979614.html#a5431731
Sent from the Maven - Users forum at Nabble.com.


Problem on java plugin development (fail to use dependency classpath)

2006-07-20 Thread Roy Siu

Hi,

I am new to Maven and currently want to write a custom java plugin, my
workspace is something like below:

template:common   --- a project to store utility class and method
template:maven-buildarchetype-plugin   --- Test writing java mojo plugin

, where their file structure is something like this:

[template:Common]  
   |_ 
   |   src/main/java/
   ||___ 
   |  
http://www.nabble.com/user-files/62/XMLPathHelper.java XMLPathHelper.java 
   |_ 
   |   src/test/java/
   ||___  ...
   | 
http://www.nabble.com/user-files/63/XMLPathHelperTest.java
XMLPathHelperTest.java  
   | ...
   |_ 
http://www.nabble.com/user-files/61/pom.xml pom.xml 

[template:myplugintest]  
   |_ 
   |   src/main/java/
   ||___  http://www.nabble.com/user-files/64/Archetype.java
Archetype.java  
   |_ 
http://www.nabble.com/user-files/66/pom.xml pom.xml 

I then use "mvn install" first in "Common" project then "myplugintest". But
my problem is that XMLPathHelperTest works in the "Common", but not
"myplugintest".
I suspect the problem is the related to classloader that:

   (1) "XMLPathHelperTest" use "org.jdom.xpath.XPath"
   (2) "org.jdom.xpath.XPath" call "java.lang.Class.forName" to dynamic load
some class in "saxpath library" (propably XPath's  "selectNode" method)
   (3) but the classloader is different in the plugin project 

So my question is how to pass the correct maven dependency classloader to
the plugin "test" flow?

Thanks,
RoySiu


-- 
View this message in context: 
http://www.nabble.com/Problem-on-java-plugin-development-%28fail-to-use-dependency-classpath%29-tf1978606.html#a542
Sent from the Maven - Users forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]