maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From TomerL <shaoli...@gmail.com>
Subject Re: <type>pom</type> not working
Date Wed, 23 Dec 2009 15:58:40 GMT

Thanks!

I was not aware of that. 


kristian-2 wrote:
> 
> as far I understand (so did not try it) but you can use composition
> but the ONLY the dependencies from pom dependency will be included, in
> the same fashion as maven resolve transitive dependencies.
> 
> in your example I you would need a pom with three dependencies to
> "lambda", "hol" and "fol" and reference that pom via a dependencies.
> 
> the modules do not play any role in dependency resolution (as far I know).
> 
> with regards,
> Kristian
> 
> 
> On Wed, Dec 23, 2009 at 8:10 PM, TomerL <shaolintl@gmail.com> wrote:
>>
>> Thanks for your help. As I explain very badly, I will give an example:
>>
>> I have a module with the following pom.xml
>>
>> <artifactId>language</artifactId>
>>  <modules>
>>    <module>lambda</module>
>>    <module>hol</module>
>>    <module>fol</module>
>>  </modules>
>>
>> In another module I would like to create a dependency to all the
>> submodules
>> of language:
>>
>> <dependency>
>>      <groupId>..</groupId>
>>      <artifactId>language</artifactId>
>>      <version>1.0</version>
>>      <type>pom</type>
>> </dependency>
>>
>> So automatically lambda, hol and fol will be added as dependencies. I get
>> no
>> error from maven about this but the scala compiler tells me it cannot
>> find
>> specific classes within the jars of lambda, hol and fol. when I do
>> instead:
>>
>> <dependency>
>>      <groupId>..</groupId>
>>      <artifactId>lambda</artifactId>
>>      <version>1.0</version>
>> </dependency>
>>
>> etc.
>>
>> it works OK.
>>
>> I was wondering if I am not using this recursive dependency correctly.
>>
>> Thanks again for your help,
>> Tomer
>>
>>
>> Baptiste MATHUS wrote:
>>>
>>> Well, not sure to understand.
>>> If you want to build a multimodules project, that is: a projet composed
>>> of
>>> several projects, then you should use <modules> tag in you parent pom.
>>> But generally you won't depend on a pom project.
>>>
>>> Adding dependencies on a parent pom is also used to centralize
>>> dependencies
>>> declaration for all submodules of that pom.
>>>
>>> Could you still clarify a bit more what you want to do?
>>>
>>> Cheers
>>>
>>> 2009/12/23 TomerL <shaolintl@gmail.com>
>>>
>>>>
>>>> Maybe I am doing something completely wrong. I have read that I can
>>>> automatically add the modules within another module (which is defined
>>>> as
>>>> pom) as dependencies if I put a dependency for that pom module and add
>>>> the
>>>> <type>pom</type> tag. I try only to have the jars defined as
submodules
>>>> of
>>>> the pom project in the classpath.
>>>>
>>>> Thanks,
>>>> Tomer
>>>>
>>>>
>>>> Baptiste MATHUS wrote:
>>>> >
>>>> > You might have a good reason for that, but why are you trying to add
>>>> a
>>>> pom
>>>> > in the classpath?
>>>> > Do you need to parse it at runtime?
>>>> >
>>>> > Cheers.
>>>> >
>>>> > 2009/12/23 TomerL <shaolintl@gmail.com>
>>>> >
>>>> >>
>>>> >> Hi all,
>>>> >>
>>>> >> I have a a project with several modules, all with the same version
>>>> and
>>>> >> groupId. One of the modules is a pom project contains several other
>>>> >> projects
>>>> >> which are jars projects. I managed to build this module and the
>>>> >> repository
>>>> >> contains the required artifacts.
>>>> >>
>>>> >> When I try to add a dependency for this module:
>>>> >>
>>>> >> <dependencies>
>>>> >>    <dependency>
>>>> >>      <groupId>abc</groupId>
>>>> >>      <artifactId>language</artifactId>
>>>> >>      <version>1.0</version>
>>>> >>      <type>pom</type>
>>>> >>    </dependency>
>>>> >>  </dependencies>
>>>> >>
>>>> >> The artifact is found but the jars within are not in the classpath
>>>> and
>>>> i
>>>> >> get
>>>> >> a compilation error.
>>>> >>
>>>> >> Is there some limitation on using the pom type dependency within
the
>>>> same
>>>> >> project? I have used it with scala so maybe there is some
>>>> incompatibility
>>>> >> with the scala compiler.
>>>> >>
>>>> >> Thanks,
>>>> >> Tomer
>>>> >> --
>>>> >> View this message in context:
>>>> >>
>>>> http://old.nabble.com/%3Ctype%3Epom%3C-type%3E-not-working-tp26902026p26902026.html
>>>> >> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>> >>
>>>> >>
>>>> >>
>>>> ---------------------------------------------------------------------
>>>> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>> >> For additional commands, e-mail: users-help@maven.apache.org
>>>> >>
>>>> >>
>>>> >
>>>> >
>>>> > --
>>>> > Baptiste <Batmat> MATHUS - http://batmat.net
>>>> > Sauvez un arbre,
>>>> > Mangez un castor !
>>>> >
>>>> >
>>>>
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/%3Ctype%3Epom%3C-type%3E-not-working-tp26902026p26902438.html
>>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>
>>>>
>>>
>>>
>>> --
>>> Baptiste <Batmat> MATHUS - http://batmat.net
>>> Sauvez un arbre,
>>> Mangez un castor !
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/%3Ctype%3Epom%3C-type%3E-not-working-tp26902026p26903026.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
> 
> 
> 
> -- 
> Kristian Meier + Saumya Sharma + Sanuka Meier
> Vadakkethu House,
> Edayanmula West PO - 689532,
> Pathanamthitta District, Kerala, INDIA
> 
> tel: +91 468 2319577
> 
> protect your privacy while searching the net: www.ixquick.com
> 
>              _=_
>            q(-_-)p
>             '_) (_`
>             /__/  \
>          _(<_   / )_
>       (__\_\_|_/__)
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/%3Ctype%3Epom%3C-type%3E-not-working-tp26902026p26903881.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Mime
View raw message