You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Joerg Hohwiller <jo...@j-hohwiller.de> on 2006/11/29 22:42:31 UTC

m2 profiles: pom with os specific (and native) dependencies

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi there,

I am using SWT in my maven project. Now I have two major problems:

1. There are different JARs required depending on the OS:
swt-win32 for Windows and swt-linux-gtk for linux, etc.
Now I tried to definie these using profiles:

<profiles>
  <profile>
    <id>linux</id>
    <activation>
      <os>
        <family>Linux</family>
      </os>
    </activation>
    <dependencies>
      <dependency>
        <groupId>swt</groupId>
        <artifactId>swt-linux-gtk</artifactId>
        <version>3.2.1</version>
        <scope>compile</scope>
      </dependency>
    </dependencies>
  </profile>
  <profile>
    <id>windows</id>
    <activation>
      <os>
        <family>Windows</family>
      </os>
    </activation>
    <dependencies>
      <dependency>
        <groupId>swt</groupId>
        <artifactId>swt-win32</artifactId>
        <version>3.2.1</version>
        <scope>compile</scope>
      </dependency>
    </dependencies>
  </profile>
</profiles>

when I do "mvn eclipse:eclipse" then both win32 and linux-gtk JARs are added to
the classpath. Is this a bug or did I get something wrong?

2. SWT also requires native libraries (dll/so files). Is there a proper way how
to put native libs into a repository and define them as dependency?

Thank you very much...
Regards
  Jörg


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFFbf7GmPuec2Dcv/8RAo/0AJ9+ccQZPUvDdPwStNnX8SoMqqlErgCfVQdA
7zBeKSLQKMsjWFRvu0AxlvQ=
=JN8X
-----END PGP SIGNATURE-----

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


Re: m2 profiles: pom with os specific (and native) dependencies

Posted by jcharum <jc...@gmail.com>.

Joerg Hohwiller wrote:
> 
> 2. SWT also requires native libraries (dll/so files). Is there a proper
> way how
> to put native libs into a repository and define them as dependency?

Did you ever find an elegant way to do this?  I am running into the same
issue with SWT as we speak.  Specifically, I am looking at
'libswt-carbon-3236.jnilib'.  I think I can use the dependency plugin to
just copy it somewhere to build my application when using Maven, but I do
not know how to get the Eclipse plugin to recognize that it should be
included as a dependency when build Eclipse projects with 'mvn
eclipse:eclipse'.

Any help is much appreciated, and thanks in advance.
-- 
View this message in context: http://www.nabble.com/m2-profiles%3A-pom-with-os-specific-%28and-native%29-dependencies-tf2727975s177.html#a9873091
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


Re: m2 profiles: pom with os specific (and native) dependencies

Posted by Bhupendra Bhardwaj <bh...@gmail.com>.
Hi,

could you resolve your problem. I am in similar situation, so you may be
helpful for me.
And in the repo1.maven.org the swt for win32 is there, but didn't find the
swt for linux in that repository. Can you tell me which repository has the
swt for linux?

I was thinking if the runtime binary (zip/tar) files from eclipse cvs
repository can be downloaded instead of downloading each plugin.

I have those two questions. if you can give me your input, that will be very
helpful

Thanks,
Bhupendra




Joerg Hohwiller wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi there,
> 
> I am using SWT in my maven project. Now I have two major problems:
> 
> 1. There are different JARs required depending on the OS:
> swt-win32 for Windows and swt-linux-gtk for linux, etc.
> Now I tried to definie these using profiles:
> 
> <profiles>
>   <profile>
>     <id>linux</id>
>     <activation>
>       <os>
>         <family>Linux</family>
>       </os>
>     </activation>
>     <dependencies>
>       <dependency>
>         <groupId>swt</groupId>
>         <artifactId>swt-linux-gtk</artifactId>
>         <version>3.2.1</version>
>         <scope>compile</scope>
>       </dependency>
>     </dependencies>
>   </profile>
>   <profile>
>     <id>windows</id>
>     <activation>
>       <os>
>         <family>Windows</family>
>       </os>
>     </activation>
>     <dependencies>
>       <dependency>
>         <groupId>swt</groupId>
>         <artifactId>swt-win32</artifactId>
>         <version>3.2.1</version>
>         <scope>compile</scope>
>       </dependency>
>     </dependencies>
>   </profile>
> </profiles>
> 
> when I do "mvn eclipse:eclipse" then both win32 and linux-gtk JARs are
> added to
> the classpath. Is this a bug or did I get something wrong?
> 
> 2. SWT also requires native libraries (dll/so files). Is there a proper
> way how
> to put native libs into a repository and define them as dependency?
> 
> Thank you very much...
> Regards
>   Jörg
> 
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
> 
> iD8DBQFFbf7GmPuec2Dcv/8RAo/0AJ9+ccQZPUvDdPwStNnX8SoMqqlErgCfVQdA
> 7zBeKSLQKMsjWFRvu0AxlvQ=
> =JN8X
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> 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://www.nabble.com/m2-profiles%3A-pom-with-os-specific-%28and-native%29-dependencies-tf2727975s177.html#a7837376
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


Re: m2 profiles: pom with os specific (and native) dependencies

Posted by franz see <fr...@gmail.com>.
Good day to you, Joerg,

1. Try help:active-profiles to see which profiles are running to help you in
your debuging
2. Try installing / deploying with packaging set to zip.

Cheers,
Franz


Joerg Hohwiller wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi there,
> 
> I am using SWT in my maven project. Now I have two major problems:
> 
> 1. There are different JARs required depending on the OS:
> swt-win32 for Windows and swt-linux-gtk for linux, etc.
> Now I tried to definie these using profiles:
> 
> <profiles>
>   <profile>
>     <id>linux</id>
>     <activation>
>       <os>
>         <family>Linux</family>
>       </os>
>     </activation>
>     <dependencies>
>       <dependency>
>         <groupId>swt</groupId>
>         <artifactId>swt-linux-gtk</artifactId>
>         <version>3.2.1</version>
>         <scope>compile</scope>
>       </dependency>
>     </dependencies>
>   </profile>
>   <profile>
>     <id>windows</id>
>     <activation>
>       <os>
>         <family>Windows</family>
>       </os>
>     </activation>
>     <dependencies>
>       <dependency>
>         <groupId>swt</groupId>
>         <artifactId>swt-win32</artifactId>
>         <version>3.2.1</version>
>         <scope>compile</scope>
>       </dependency>
>     </dependencies>
>   </profile>
> </profiles>
> 
> when I do "mvn eclipse:eclipse" then both win32 and linux-gtk JARs are
> added to
> the classpath. Is this a bug or did I get something wrong?
> 
> 2. SWT also requires native libraries (dll/so files). Is there a proper
> way how
> to put native libs into a repository and define them as dependency?
> 
> Thank you very much...
> Regards
>   Jörg
> 
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
> 
> iD8DBQFFbf7GmPuec2Dcv/8RAo/0AJ9+ccQZPUvDdPwStNnX8SoMqqlErgCfVQdA
> 7zBeKSLQKMsjWFRvu0AxlvQ=
> =JN8X
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> 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://www.nabble.com/m2-profiles%3A-pom-with-os-specific-%28and-native%29-dependencies-tf2727975s177.html#a7623798
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