[prev in list] [next in list] [prev in thread] [next in thread] 

List:       maven-user
Subject:    Re: dependency and os.arch os.name
From:       "Laurent GRANIE" <laurent.granie () gmail ! com>
Date:       2007-01-31 15:56:39
Message-ID: 4d68b2da0701310756g36c5e9e6j9e1b0783ad7dcc39 () mail ! gmail ! com
[Download RAW message or body]

Thanks! I'va already deal with profiles and I think this is the solution !
I just don't think about it...

Many thanks.

2007/1/31, Wayne Fay <waynefay@gmail.com>:
> Declare the dependencies inside a <profile> which is activated when
> <os> matches XYZ. As for the architecture, that does not yet exist in
> Maven profiles/activation, so if you have a real requirement to deal
> with multiple architectures, you'll need to hardcode it and specify
> profiles like -Pwin32-intel on the command line when you run "mvn
> compile" etc.
>
> http://maven.apache.org/guides/introduction/introduction-to-profiles.html
> http://maven.apache.org/ref/2.0.4/maven-profile/apidocs/org/apache/maven/profiles/Activation.html
>
> Wayne
>
> On 1/31/07, Laurent GRANIE <laurent.granie@gmail.com> wrote:
> > Hi all,
> >
> > I would like to devel an application that depends on JOGL (from
> > http://jogl.dev.java.net). There is no repository for JOGL but I can
> > create mine using mvn deploy:deploy-file.
> >
> > The problem is that JOGL provides several jar files depending on
> > os.arch and os.name variables values. How can I create dependency
> > declaration in my pom.xml?
> > I try the following with no success :
> >    <dependency>
> >      <groupId>jogl</groupId>
> >      <artifactId>jogl-native-${os.name}-${os.arch}</artifactId>
> >      <version>1.0</version>
> >    </dependency>
> >
> > org.apache.maven.reactor.MavenExecutionException: Failed to validate POM
> > [...]
> > Caused by: org.apache.maven.project.InvalidProjectModelException:
> > Failed to validate POM
> >
> > I think this error is due to a space in the value of the os.name
> > variable (ie. "Windows XP").
> >
> > If you take a look to the following jnlp files, you will notice that
> > dependencies depend on arch and os :
> > http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jnlp
> > http://download.java.net/media/gluegen/webstart/gluegen-rt.jnlp
> >
> > Any suggestion to make the same with maven2?
> >
> > Thanks, Laurent.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic