Yes, you should use classifiers, so the POM you have looks fine (and
there need be just one). If you are building with NMaven yourself, we
need to make sure the compiler plugin supports adding classifiers.
Profiles shouldn't be needed. If the dependencies differ between them,
it might be a problem.
Is it required to have different versions for each framework? How do
they differ exactly?
Cheers,
Brett
On 05/11/2008, at 10:36 AM, Mimil Mimil wrote:
Hello,
I am trying to make nmaven artifacts using dll binaries but I would
like to
define the dependencies of this dll.
In the case of log4net I am currently trying to make I want to make
artifacts for each dotnet environments (dotnet 2.0, dotnet 1.1,
mono ...)
and I think it should be handled using classifiers.
As for now I think we have to use profiles to define each environemnt
artifacts, by the way I don't know how to use these profiles to make
classifiers.
Here is my current pom with net-1.2 profile and its dependencies:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>log4net</groupId>
<artifactId>log4net</artifactId>
<version>1.2.10.0-SNAPSHOT</version>
<name>Log for .Net</name>
<description>log4net is a tool to help the programmer output log
statements to a variety of output targets.
</description>
<url>http://www.xml-rpc.net/</url>
<packaging>dotnet:library</packaging>
<licenses>
<license>
<name>The Apache2 License</name>
<url>
http://logging.apache.org/log4net/license.html
</url>
</license>
</licenses>
<build>
<finalName>log4net</finalName>
<!-- To define the plugin version in your parent POM -->
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-repository-plugin</artifactId>
<version>2.1</version>
</plugin>
</plugins>
</pluginManagement>
<!-- To use the plugin goals in your POM or parent POM -->
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-repository-plugin</artifactId>
<version>2.1</version>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>net-2.0</id>
<dependencies>
<dependency>
<groupId>System.Data</groupId>
<artifactId>System.Data</artifactId>
<version>2.0.0.0</version>
<type>dotnet:gac</type>
<scope>system</scope>
<classifier>b77a5c561934e089</classifier>
<systemPath>${env.GAC_ROOT}/System.Data/2.0.0.0__b77a5c561934e089/
System.Data.dll</systemPath>
</dependency>
<dependency>
<groupId>System.Web</groupId>
<artifactId>System.Web</artifactId>
<version>2.0.0.0</version>
<type>dotnet:gac</type>
<scope>system</scope>
<classifier>b03f5f7f11d50a3a</classifier>
<systemPath>${env.GAC_ROOT}/System.Web/2.0.0.0__b03f5f7f11d50a3a/
System.Web.dll</systemPath>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
Another way to do it is to have a pom by environment and insert the
classifier name inside the versionId. I remember something about
versionId
that must be w.x.y.z, will it be a problem?
I thought to use repository:bundle-pack for the installation in
repositories
but I don't know if I have to use this or just a mvn deploy:deploy-
file
or...
Any help welcome. I think it will help a lot to have more nmaven
artifacts
to have such a thing clear (and documented somewhere).
Thanks,
Regards,
Cédric,
--
Brett Porter
[EMAIL PROTECTED]
http://blogs.exist.com/bporter/