How to make manual artifacts using classifiers

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to make manual artifacts using classifiers

Mimil
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,
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to make manual artifacts using classifiers

Shane Isbell
On Wed, Nov 5, 2008 at 8:36 AM, Mimil Mimil <[hidden email]> wrote:

>
> 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?

You need to use w.x.y.z, but may append it with anything after a hyphen. For
example. 2.0.0.0-SNAPSHOT or 1.3-alpha1 are both okay to use.

>
>
> 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...

mvn deploy will work fine.

Thanks,
Shane
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to make manual artifacts using classifiers

brettporter
Administrator
In reply to this post by Mimil
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
[hidden email]
http://blogs.exist.com/bporter/

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to make manual artifacts using classifiers

Mimil
Hi,

As you advised I am making artifacts from binaries because I do not belong
to the projects I am doing artifacts - I just want to add more nmaven
artifacts for the community.

Dependencies will be differents are they are I think related to the
environments so I think the only way to manage this is classifier.

How the lib differs between environments? I don't have any knowledge of .net
but the clearest exemple is for compact framework. As it targets mobiles,
pda, ... it is certainly a lot different from the conventional framework.
As yes did different DLLs for the different frameworks I think it is because
they need it, that's all I can say =)

An easy way would be for now to not set dependencies (if we have problem on
this point) but is the classifier stuff supported out of the box to deploy
manual artifacts? I mean is the namming convention
<artifactId>-<version>-<everything else after version is considered as a
classifier> ?

Do we have to develop a little plugin in order to specify the classifier of
artifacts? I say that because the only things I saw through the web as or
based on the maven-jar-plugin or on war plugin which I don't remember the
name.
Maybe http://mojo.codehaus.org/build-helper-maven-plugin/usage.html can be
used with attach-artifact?

Regards,
Cedric,

On Thu, Nov 6, 2008 at 7:19 PM, Brett Porter <[hidden email]> wrote:

> 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
> [hidden email]
> http://blogs.exist.com/bporter/
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to make manual artifacts using classifiers

James Carpenter-2
You might want to consider adding the pdb and source archives with  
appropriate classifiers along with the assemblies/dlls.  Even if you  
don't index the pdb files (see below) it will be easy to go back and  
do so later.


=======================================
If you want to go way out of the way you can even add source server  
information to the pdb files.

Lets say you create a maven plugin with the following goal/arguments:

prompt>mvn source-server:resolve -DgroupId="com.acme.mortar" -
DartifactId="tools" -Dversion="1.3.2" -DrelativeFile="tooling/
trowel.cs" -DoutputPath="C:\mysrc\"

The result of this goal would be to resolve the  
com.acme.mortar:tools:sources:1.3.2:jar artifact and extract the  
tooling/trowel.cs file and copy it to C:\mysrc\com\acme\mortar\tools
\1.3.2\tooling\trowel.cs

You then process the pdb files to inject the magic srcsrv stream (see  
an earlier post) which will tell the MS debugging tools for windows  
how to form the above command for any of the files used to build the  
assembly/pdb.

The result of this dance will be the ability for the Visual Studio  
debugger to magically step down into the source code of any of the  
assemblies you have placed into the maven repository.

I wrote a post on this mailing list a few weeks ago which gives a lot  
more of the details.

On Nov 6, 2008, at 3:52 PM, Mimil Mimil wrote:

> Hi,
>
> As you advised I am making artifacts from binaries because I do not  
> belong
> to the projects I am doing artifacts - I just want to add more nmaven
> artifacts for the community.
>
> Dependencies will be differents are they are I think related to the
> environments so I think the only way to manage this is classifier.
>
> How the lib differs between environments? I don't have any knowledge  
> of .net
> but the clearest exemple is for compact framework. As it targets  
> mobiles,
> pda, ... it is certainly a lot different from the conventional  
> framework.
> As yes did different DLLs for the different frameworks I think it is  
> because
> they need it, that's all I can say =)
>
> An easy way would be for now to not set dependencies (if we have  
> problem on
> this point) but is the classifier stuff supported out of the box to  
> deploy
> manual artifacts? I mean is the namming convention
> <artifactId>-<version>-<everything else after version is considered  
> as a
> classifier> ?
>
> Do we have to develop a little plugin in order to specify the  
> classifier of
> artifacts? I say that because the only things I saw through the web  
> as or
> based on the maven-jar-plugin or on war plugin which I don't  
> remember the
> name.
> Maybe http://mojo.codehaus.org/build-helper-maven-plugin/usage.html 
> can be
> used with attach-artifact?
>
> Regards,
> Cedric,
>
> On Thu, Nov 6, 2008 at 7:19 PM, Brett Porter <[hidden email]> wrote:
>
>> 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
>> [hidden email]
>> http://blogs.exist.com/bporter/
>>
>>

Sincerely,
James Carpenter
cell: 832-677-7247
email: [hidden email]



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to make manual artifacts using classifiers

Mimil
Hello everybody,

I think I will upload to maven central repository the log4net artifacts I
have created. They are only based on binaries and do not define any
dependencies because I haven't yet succeed to make work classifiers and
dependencies in the same time.

Concerning the sources classifier, do we have the jar file format or there
is a format for dotnet tools?
Concerning the pdb files, it sounds that there is no much support so I will
wait until I understand how to make them and how to use them in
nmaven/dotnet tools.

Concerning the help of log4net team to support this artifact, I think it is
better to wait for the full support of all previous questions.
I hope there will be no problem on the central repository team to let me
upload these artifacts. Brett, I think it is the same case for you and
nunit, so could I had you in copy if I have troubles?

The following files will be uploaded:

> log4net-1.2.10.0-cli-1.0.dll
> log4net-1.2.10.0-mono-1.0.dll
> log4net-1.2.10.0-mono-2.0.dll
> log4net-1.2.10.0-net-1.0.dll
> log4net-1.2.10.0-net-1.1.dll
> log4net-1.2.10.0-net-2.0.dll
> log4net-1.2.10.0-netcf-1.0.dll
> log4net-1.2.10.0.pom
> log4net-1.2.10.0-sscli-1.0.dll
>

They have been generated using this script:

> #!/bin/sh
>
> LOG4NETVERSION=1.2.10.0
> export LOG4NETVERSION
>
> mvn install:install-file  -DpomFile=pom.xml
> -Dfile=lib/log4net-$LOG4NETVERSION/bin/net/2.0/release/log4net.dll
> -Dclassifier=net-2.0
> mvn install:install-file  -DpomFile=pom.xml
> -Dfile=lib/log4net-$LOG4NETVERSION/bin/net/1.0/release/log4net.dll
> -Dclassifier=net-1.0
> mvn install:install-file  -DpomFile=pom.xml
> -Dfile=lib/log4net-$LOG4NETVERSION/bin/net/1.1/release/log4net.dll
> -Dclassifier=net-1.1
> mvn install:install-file  -DpomFile=pom.xml
> -Dfile=lib/log4net-$LOG4NETVERSION/bin/mono/2.0/release/log4net.dll
> -Dclassifier=mono-2.0
> mvn install:install-file  -DpomFile=pom.xml
> -Dfile=lib/log4net-$LOG4NETVERSION/bin/mono/1.0/release/log4net.dll
> -Dclassifier=mono-1.0
> mvn install:install-file  -DpomFile=pom.xml
> -Dfile=lib/log4net-$LOG4NETVERSION/bin/netcf/1.0/release/log4net.dll
> -Dclassifier=netcf-1.0
> mvn install:install-file  -DpomFile=pom.xml
> -Dfile=lib/log4net-$LOG4NETVERSION/bin/cli/1.0/release/log4net.dll
> -Dclassifier=cli-1.0
> mvn install:install-file  -DpomFile=pom.xml
> -Dfile=lib/log4net-$LOG4NETVERSION/bin/sscli/1.0/release/log4net.dll
> -Dclassifier=sscli-1.0
>
> cd ~/.m2/repository/log4net/log4net/$LOG4NETVERSION/
> echo "Bundling local repository files"
> jar -cf log4net-bundle.jar *.dll *.pom
>

And my pom is:

> <?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>
>     <!-- the last version number will be used for nmaven artifact packaging
> -->
>     <version>1.2.10.0</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://logging.apache.org/log4net/</url>
>     <packaging>dotnet:library</packaging>
>     <developers>
>         <developer>
>             <id>mimil</id>
>             <email>[hidden email]</email>
>             <roles>
>                 <role>artifact creator</role>
>             </roles>
>         </developer>
>     </developers>
>     <licenses>
>         <license>
>             <name>The Apache2 License</name>
>             <url>
>                 http://logging.apache.org/log4net/license.html
>             </url>
>         </license>
>     </licenses>
>     <build>
>         <finalName>log4net</finalName>
>         <plugins>
>             <!-- dotnet compiler plugin is needed to be aware of
> dot:library packaging -->
>             <plugin>
>                 <groupId>org.apache.maven.dotnet.plugins</groupId>
>                 <artifactId>maven-dotnet-compiler-plugin</artifactId>
>                 <!--version>0.16-incubating-SNAPSHOT</version-->
>                 <extensions>true</extensions>
>             </plugin>
>         </plugins>
>     </build>
> </project>
>

Any comments are welcome before I upload them.

Regards,
Cedric,

On Fri, Nov 7, 2008 at 5:03 AM, James Carpenter <[hidden email]>wrote:

> You might want to consider adding the pdb and source archives with
> appropriate classifiers along with the assemblies/dlls.  Even if you don't
> index the pdb files (see below) it will be easy to go back and do so later.
>
>
> =======================================
> If you want to go way out of the way you can even add source server
> information to the pdb files.
>
> Lets say you create a maven plugin with the following goal/arguments:
>
> prompt>mvn source-server:resolve -DgroupId="com.acme.mortar"
> -DartifactId="tools" -Dversion="1.3.2" -DrelativeFile="tooling/trowel.cs"
> -DoutputPath="C:\mysrc\"
>
> The result of this goal would be to resolve the
> com.acme.mortar:tools:sources:1.3.2:jar artifact and extract the
> tooling/trowel.cs file and copy it to
> C:\mysrc\com\acme\mortar\tools\1.3.2\tooling\trowel.cs
>
> You then process the pdb files to inject the magic srcsrv stream (see an
> earlier post) which will tell the MS debugging tools for windows how to form
> the above command for any of the files used to build the assembly/pdb.
>
> The result of this dance will be the ability for the Visual Studio debugger
> to magically step down into the source code of any of the assemblies you
> have placed into the maven repository.
>
> I wrote a post on this mailing list a few weeks ago which gives a lot more
> of the details.
>
>
> On Nov 6, 2008, at 3:52 PM, Mimil Mimil wrote:
>
>  Hi,
>>
>> As you advised I am making artifacts from binaries because I do not belong
>> to the projects I am doing artifacts - I just want to add more nmaven
>> artifacts for the community.
>>
>> Dependencies will be differents are they are I think related to the
>> environments so I think the only way to manage this is classifier.
>>
>> How the lib differs between environments? I don't have any knowledge of
>> .net
>> but the clearest exemple is for compact framework. As it targets mobiles,
>> pda, ... it is certainly a lot different from the conventional framework.
>> As yes did different DLLs for the different frameworks I think it is
>> because
>> they need it, that's all I can say =)
>>
>> An easy way would be for now to not set dependencies (if we have problem
>> on
>> this point) but is the classifier stuff supported out of the box to deploy
>> manual artifacts? I mean is the namming convention
>> <artifactId>-<version>-<everything else after version is considered as a
>> classifier> ?
>>
>> Do we have to develop a little plugin in order to specify the classifier
>> of
>> artifacts? I say that because the only things I saw through the web as or
>> based on the maven-jar-plugin or on war plugin which I don't remember the
>> name.
>> Maybe http://mojo.codehaus.org/build-helper-maven-plugin/usage.html can
>> be
>> used with attach-artifact?
>>
>> Regards,
>> Cedric,
>>
>> On Thu, Nov 6, 2008 at 7:19 PM, Brett Porter <[hidden email]> wrote:
>>
>>  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
>>> [hidden email]
>>> http://blogs.exist.com/bporter/
>>>
>>>
>>>
> Sincerely,
> James Carpenter
> cell: 832-677-7247
> email: [hidden email]
>
>
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to make manual artifacts using classifiers

Mimil
Hi,

so what do we do about nmaven artifacts in central repository as regards the
ASF dissolution? Should we wait and see?

Regards,
Cedric,

On Tue, Nov 11, 2008 at 4:54 PM, Mimil Mimil <[hidden email]> wrote:

> Hello everybody,
>
> I think I will upload to maven central repository the log4net artifacts I
> have created. They are only based on binaries and do not define any
> dependencies because I haven't yet succeed to make work classifiers and
> dependencies in the same time.
>
> Concerning the sources classifier, do we have the jar file format or there
> is a format for dotnet tools?
> Concerning the pdb files, it sounds that there is no much support so I will
> wait until I understand how to make them and how to use them in
> nmaven/dotnet tools.
>
> Concerning the help of log4net team to support this artifact, I think it is
> better to wait for the full support of all previous questions.
> I hope there will be no problem on the central repository team to let me
> upload these artifacts. Brett, I think it is the same case for you and
> nunit, so could I had you in copy if I have troubles?
>
> The following files will be uploaded:
>
>> log4net-1.2.10.0-cli-1.0.dll
>> log4net-1.2.10.0-mono-1.0.dll
>> log4net-1.2.10.0-mono-2.0.dll
>> log4net-1.2.10.0-net-1.0.dll
>> log4net-1.2.10.0-net-1.1.dll
>> log4net-1.2.10.0-net-2.0.dll
>> log4net-1.2.10.0-netcf-1.0.dll
>> log4net-1.2.10.0.pom
>> log4net-1.2.10.0-sscli-1.0.dll
>>
>
> They have been generated using this script:
>
>> #!/bin/sh
>>
>> LOG4NETVERSION=1.2.10.0
>> export LOG4NETVERSION
>>
>> mvn install:install-file  -DpomFile=pom.xml
>> -Dfile=lib/log4net-$LOG4NETVERSION/bin/net/2.0/release/log4net.dll
>> -Dclassifier=net-2.0
>> mvn install:install-file  -DpomFile=pom.xml
>> -Dfile=lib/log4net-$LOG4NETVERSION/bin/net/1.0/release/log4net.dll
>> -Dclassifier=net-1.0
>> mvn install:install-file  -DpomFile=pom.xml
>> -Dfile=lib/log4net-$LOG4NETVERSION/bin/net/1.1/release/log4net.dll
>> -Dclassifier=net-1.1
>> mvn install:install-file  -DpomFile=pom.xml
>> -Dfile=lib/log4net-$LOG4NETVERSION/bin/mono/2.0/release/log4net.dll
>> -Dclassifier=mono-2.0
>> mvn install:install-file  -DpomFile=pom.xml
>> -Dfile=lib/log4net-$LOG4NETVERSION/bin/mono/1.0/release/log4net.dll
>> -Dclassifier=mono-1.0
>> mvn install:install-file  -DpomFile=pom.xml
>> -Dfile=lib/log4net-$LOG4NETVERSION/bin/netcf/1.0/release/log4net.dll
>> -Dclassifier=netcf-1.0
>> mvn install:install-file  -DpomFile=pom.xml
>> -Dfile=lib/log4net-$LOG4NETVERSION/bin/cli/1.0/release/log4net.dll
>> -Dclassifier=cli-1.0
>> mvn install:install-file  -DpomFile=pom.xml
>> -Dfile=lib/log4net-$LOG4NETVERSION/bin/sscli/1.0/release/log4net.dll
>> -Dclassifier=sscli-1.0
>>
>> cd ~/.m2/repository/log4net/log4net/$LOG4NETVERSION/
>> echo "Bundling local repository files"
>> jar -cf log4net-bundle.jar *.dll *.pom
>>
>
> And my pom is:
>
>> <?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>
>>     <!-- the last version number will be used for nmaven artifact
>> packaging -->
>>     <version>1.2.10.0</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://logging.apache.org/log4net/</url>
>>     <packaging>dotnet:library</packaging>
>>     <developers>
>>         <developer>
>>             <id>mimil</id>
>>             <email>[hidden email]</email>
>>             <roles>
>>                 <role>artifact creator</role>
>>             </roles>
>>         </developer>
>>     </developers>
>>     <licenses>
>>         <license>
>>             <name>The Apache2 License</name>
>>             <url>
>>                 http://logging.apache.org/log4net/license.html
>>             </url>
>>         </license>
>>     </licenses>
>>     <build>
>>         <finalName>log4net</finalName>
>>         <plugins>
>>             <!-- dotnet compiler plugin is needed to be aware of
>> dot:library packaging -->
>>             <plugin>
>>                 <groupId>org.apache.maven.dotnet.plugins</groupId>
>>                 <artifactId>maven-dotnet-compiler-plugin</artifactId>
>>                 <!--version>0.16-incubating-SNAPSHOT</version-->
>>                 <extensions>true</extensions>
>>             </plugin>
>>         </plugins>
>>     </build>
>> </project>
>>
>
> Any comments are welcome before I upload them.
>
> Regards,
> Cedric,
>
>
> On Fri, Nov 7, 2008 at 5:03 AM, James Carpenter <[hidden email]>wrote:
>
>> You might want to consider adding the pdb and source archives with
>> appropriate classifiers along with the assemblies/dlls.  Even if you don't
>> index the pdb files (see below) it will be easy to go back and do so later.
>>
>>
>> =======================================
>> If you want to go way out of the way you can even add source server
>> information to the pdb files.
>>
>> Lets say you create a maven plugin with the following goal/arguments:
>>
>> prompt>mvn source-server:resolve -DgroupId="com.acme.mortar"
>> -DartifactId="tools" -Dversion="1.3.2" -DrelativeFile="tooling/trowel.cs"
>> -DoutputPath="C:\mysrc\"
>>
>> The result of this goal would be to resolve the
>> com.acme.mortar:tools:sources:1.3.2:jar artifact and extract the
>> tooling/trowel.cs file and copy it to
>> C:\mysrc\com\acme\mortar\tools\1.3.2\tooling\trowel.cs
>>
>> You then process the pdb files to inject the magic srcsrv stream (see an
>> earlier post) which will tell the MS debugging tools for windows how to form
>> the above command for any of the files used to build the assembly/pdb.
>>
>> The result of this dance will be the ability for the Visual Studio
>> debugger to magically step down into the source code of any of the
>> assemblies you have placed into the maven repository.
>>
>> I wrote a post on this mailing list a few weeks ago which gives a lot more
>> of the details.
>>
>>
>> On Nov 6, 2008, at 3:52 PM, Mimil Mimil wrote:
>>
>>  Hi,
>>>
>>> As you advised I am making artifacts from binaries because I do not
>>> belong
>>> to the projects I am doing artifacts - I just want to add more nmaven
>>> artifacts for the community.
>>>
>>> Dependencies will be differents are they are I think related to the
>>> environments so I think the only way to manage this is classifier.
>>>
>>> How the lib differs between environments? I don't have any knowledge of
>>> .net
>>> but the clearest exemple is for compact framework. As it targets mobiles,
>>> pda, ... it is certainly a lot different from the conventional framework.
>>> As yes did different DLLs for the different frameworks I think it is
>>> because
>>> they need it, that's all I can say =)
>>>
>>> An easy way would be for now to not set dependencies (if we have problem
>>> on
>>> this point) but is the classifier stuff supported out of the box to
>>> deploy
>>> manual artifacts? I mean is the namming convention
>>> <artifactId>-<version>-<everything else after version is considered as a
>>> classifier> ?
>>>
>>> Do we have to develop a little plugin in order to specify the classifier
>>> of
>>> artifacts? I say that because the only things I saw through the web as or
>>> based on the maven-jar-plugin or on war plugin which I don't remember the
>>> name.
>>> Maybe http://mojo.codehaus.org/build-helper-maven-plugin/usage.html can
>>> be
>>> used with attach-artifact?
>>>
>>> Regards,
>>> Cedric,
>>>
>>> On Thu, Nov 6, 2008 at 7:19 PM, Brett Porter <[hidden email]> wrote:
>>>
>>>  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
>>>> [hidden email]
>>>> http://blogs.exist.com/bporter/
>>>>
>>>>
>>>>
>> Sincerely,
>> James Carpenter
>> cell: 832-677-7247
>> email: [hidden email]
>>
>>
>>
>>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to make manual artifacts using classifiers

Christian Raschka-4
I'm against a wait and see tactic. Anyone who is willing to do
something should be motivated instead of limited.

Maybe we could upload the artifacts to a neutral server?

Christian

On Tue, Nov 25, 2008 at 3:48 PM, Mimil Mimil <[hidden email]> wrote:

> Hi,
>
> so what do we do about nmaven artifacts in central repository as regards the
> ASF dissolution? Should we wait and see?
>
> Regards,
> Cedric,
>
> On Tue, Nov 11, 2008 at 4:54 PM, Mimil Mimil <[hidden email]> wrote:
>
>> Hello everybody,
>>
>> I think I will upload to maven central repository the log4net artifacts I
>> have created. They are only based on binaries and do not define any
>> dependencies because I haven't yet succeed to make work classifiers and
>> dependencies in the same time.
>>
>> Concerning the sources classifier, do we have the jar file format or there
>> is a format for dotnet tools?
>> Concerning the pdb files, it sounds that there is no much support so I will
>> wait until I understand how to make them and how to use them in
>> nmaven/dotnet tools.
>>
>> Concerning the help of log4net team to support this artifact, I think it is
>> better to wait for the full support of all previous questions.
>> I hope there will be no problem on the central repository team to let me
>> upload these artifacts. Brett, I think it is the same case for you and
>> nunit, so could I had you in copy if I have troubles?
>>
>> The following files will be uploaded:
>>
>>> log4net-1.2.10.0-cli-1.0.dll
>>> log4net-1.2.10.0-mono-1.0.dll
>>> log4net-1.2.10.0-mono-2.0.dll
>>> log4net-1.2.10.0-net-1.0.dll
>>> log4net-1.2.10.0-net-1.1.dll
>>> log4net-1.2.10.0-net-2.0.dll
>>> log4net-1.2.10.0-netcf-1.0.dll
>>> log4net-1.2.10.0.pom
>>> log4net-1.2.10.0-sscli-1.0.dll
>>>
>>
>> They have been generated using this script:
>>
>>> #!/bin/sh
>>>
>>> LOG4NETVERSION=1.2.10.0
>>> export LOG4NETVERSION
>>>
>>> mvn install:install-file  -DpomFile=pom.xml
>>> -Dfile=lib/log4net-$LOG4NETVERSION/bin/net/2.0/release/log4net.dll
>>> -Dclassifier=net-2.0
>>> mvn install:install-file  -DpomFile=pom.xml
>>> -Dfile=lib/log4net-$LOG4NETVERSION/bin/net/1.0/release/log4net.dll
>>> -Dclassifier=net-1.0
>>> mvn install:install-file  -DpomFile=pom.xml
>>> -Dfile=lib/log4net-$LOG4NETVERSION/bin/net/1.1/release/log4net.dll
>>> -Dclassifier=net-1.1
>>> mvn install:install-file  -DpomFile=pom.xml
>>> -Dfile=lib/log4net-$LOG4NETVERSION/bin/mono/2.0/release/log4net.dll
>>> -Dclassifier=mono-2.0
>>> mvn install:install-file  -DpomFile=pom.xml
>>> -Dfile=lib/log4net-$LOG4NETVERSION/bin/mono/1.0/release/log4net.dll
>>> -Dclassifier=mono-1.0
>>> mvn install:install-file  -DpomFile=pom.xml
>>> -Dfile=lib/log4net-$LOG4NETVERSION/bin/netcf/1.0/release/log4net.dll
>>> -Dclassifier=netcf-1.0
>>> mvn install:install-file  -DpomFile=pom.xml
>>> -Dfile=lib/log4net-$LOG4NETVERSION/bin/cli/1.0/release/log4net.dll
>>> -Dclassifier=cli-1.0
>>> mvn install:install-file  -DpomFile=pom.xml
>>> -Dfile=lib/log4net-$LOG4NETVERSION/bin/sscli/1.0/release/log4net.dll
>>> -Dclassifier=sscli-1.0
>>>
>>> cd ~/.m2/repository/log4net/log4net/$LOG4NETVERSION/
>>> echo "Bundling local repository files"
>>> jar -cf log4net-bundle.jar *.dll *.pom
>>>
>>
>> And my pom is:
>>
>>> <?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>
>>>     <!-- the last version number will be used for nmaven artifact
>>> packaging -->
>>>     <version>1.2.10.0</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://logging.apache.org/log4net/</url>
>>>     <packaging>dotnet:library</packaging>
>>>     <developers>
>>>         <developer>
>>>             <id>mimil</id>
>>>             <email>[hidden email]</email>
>>>             <roles>
>>>                 <role>artifact creator</role>
>>>             </roles>
>>>         </developer>
>>>     </developers>
>>>     <licenses>
>>>         <license>
>>>             <name>The Apache2 License</name>
>>>             <url>
>>>                 http://logging.apache.org/log4net/license.html
>>>             </url>
>>>         </license>
>>>     </licenses>
>>>     <build>
>>>         <finalName>log4net</finalName>
>>>         <plugins>
>>>             <!-- dotnet compiler plugin is needed to be aware of
>>> dot:library packaging -->
>>>             <plugin>
>>>                 <groupId>org.apache.maven.dotnet.plugins</groupId>
>>>                 <artifactId>maven-dotnet-compiler-plugin</artifactId>
>>>                 <!--version>0.16-incubating-SNAPSHOT</version-->
>>>                 <extensions>true</extensions>
>>>             </plugin>
>>>         </plugins>
>>>     </build>
>>> </project>
>>>
>>
>> Any comments are welcome before I upload them.
>>
>> Regards,
>> Cedric,
>>
>>
>> On Fri, Nov 7, 2008 at 5:03 AM, James Carpenter <[hidden email]>wrote:
>>
>>> You might want to consider adding the pdb and source archives with
>>> appropriate classifiers along with the assemblies/dlls.  Even if you don't
>>> index the pdb files (see below) it will be easy to go back and do so later.
>>>
>>>
>>> =======================================
>>> If you want to go way out of the way you can even add source server
>>> information to the pdb files.
>>>
>>> Lets say you create a maven plugin with the following goal/arguments:
>>>
>>> prompt>mvn source-server:resolve -DgroupId="com.acme.mortar"
>>> -DartifactId="tools" -Dversion="1.3.2" -DrelativeFile="tooling/trowel.cs"
>>> -DoutputPath="C:\mysrc\"
>>>
>>> The result of this goal would be to resolve the
>>> com.acme.mortar:tools:sources:1.3.2:jar artifact and extract the
>>> tooling/trowel.cs file and copy it to
>>> C:\mysrc\com\acme\mortar\tools\1.3.2\tooling\trowel.cs
>>>
>>> You then process the pdb files to inject the magic srcsrv stream (see an
>>> earlier post) which will tell the MS debugging tools for windows how to form
>>> the above command for any of the files used to build the assembly/pdb.
>>>
>>> The result of this dance will be the ability for the Visual Studio
>>> debugger to magically step down into the source code of any of the
>>> assemblies you have placed into the maven repository.
>>>
>>> I wrote a post on this mailing list a few weeks ago which gives a lot more
>>> of the details.
>>>
>>>
>>> On Nov 6, 2008, at 3:52 PM, Mimil Mimil wrote:
>>>
>>>  Hi,
>>>>
>>>> As you advised I am making artifacts from binaries because I do not
>>>> belong
>>>> to the projects I am doing artifacts - I just want to add more nmaven
>>>> artifacts for the community.
>>>>
>>>> Dependencies will be differents are they are I think related to the
>>>> environments so I think the only way to manage this is classifier.
>>>>
>>>> How the lib differs between environments? I don't have any knowledge of
>>>> .net
>>>> but the clearest exemple is for compact framework. As it targets mobiles,
>>>> pda, ... it is certainly a lot different from the conventional framework.
>>>> As yes did different DLLs for the different frameworks I think it is
>>>> because
>>>> they need it, that's all I can say =)
>>>>
>>>> An easy way would be for now to not set dependencies (if we have problem
>>>> on
>>>> this point) but is the classifier stuff supported out of the box to
>>>> deploy
>>>> manual artifacts? I mean is the namming convention
>>>> <artifactId>-<version>-<everything else after version is considered as a
>>>> classifier> ?
>>>>
>>>> Do we have to develop a little plugin in order to specify the classifier
>>>> of
>>>> artifacts? I say that because the only things I saw through the web as or
>>>> based on the maven-jar-plugin or on war plugin which I don't remember the
>>>> name.
>>>> Maybe http://mojo.codehaus.org/build-helper-maven-plugin/usage.html can
>>>> be
>>>> used with attach-artifact?
>>>>
>>>> Regards,
>>>> Cedric,
>>>>
>>>> On Thu, Nov 6, 2008 at 7:19 PM, Brett Porter <[hidden email]> wrote:
>>>>
>>>>  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
>>>>> [hidden email]
>>>>> http://blogs.exist.com/bporter/
>>>>>
>>>>>
>>>>>
>>> Sincerely,
>>> James Carpenter
>>> cell: 832-677-7247
>>> email: [hidden email]
>>>
>>>
>>>
>>>
>>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to make manual artifacts using classifiers

brettporter
Administrator
I think regardless of what happens next to the code, the same set up  
will be required for the NMaven central repository so we should push  
forward as planned.

Cheers,
Brett

On 26/11/2008, at 2:15 AM, Christian Raschka wrote:

> I'm against a wait and see tactic. Anyone who is willing to do
> something should be motivated instead of limited.
>
> Maybe we could upload the artifacts to a neutral server?
>
> Christian
>
> On Tue, Nov 25, 2008 at 3:48 PM, Mimil Mimil <[hidden email]>  
> wrote:
>> Hi,
>>
>> so what do we do about nmaven artifacts in central repository as  
>> regards the
>> ASF dissolution? Should we wait and see?
>>
>> Regards,
>> Cedric,
>>
>> On Tue, Nov 11, 2008 at 4:54 PM, Mimil Mimil <[hidden email]>  
>> wrote:
>>
>>> Hello everybody,
>>>
>>> I think I will upload to maven central repository the log4net  
>>> artifacts I
>>> have created. They are only based on binaries and do not define any
>>> dependencies because I haven't yet succeed to make work  
>>> classifiers and
>>> dependencies in the same time.
>>>
>>> Concerning the sources classifier, do we have the jar file format  
>>> or there
>>> is a format for dotnet tools?
>>> Concerning the pdb files, it sounds that there is no much support  
>>> so I will
>>> wait until I understand how to make them and how to use them in
>>> nmaven/dotnet tools.
>>>
>>> Concerning the help of log4net team to support this artifact, I  
>>> think it is
>>> better to wait for the full support of all previous questions.
>>> I hope there will be no problem on the central repository team to  
>>> let me
>>> upload these artifacts. Brett, I think it is the same case for you  
>>> and
>>> nunit, so could I had you in copy if I have troubles?
>>>
>>> The following files will be uploaded:
>>>
>>>> log4net-1.2.10.0-cli-1.0.dll
>>>> log4net-1.2.10.0-mono-1.0.dll
>>>> log4net-1.2.10.0-mono-2.0.dll
>>>> log4net-1.2.10.0-net-1.0.dll
>>>> log4net-1.2.10.0-net-1.1.dll
>>>> log4net-1.2.10.0-net-2.0.dll
>>>> log4net-1.2.10.0-netcf-1.0.dll
>>>> log4net-1.2.10.0.pom
>>>> log4net-1.2.10.0-sscli-1.0.dll
>>>>
>>>
>>> They have been generated using this script:
>>>
>>>> #!/bin/sh
>>>>
>>>> LOG4NETVERSION=1.2.10.0
>>>> export LOG4NETVERSION
>>>>
>>>> mvn install:install-file  -DpomFile=pom.xml
>>>> -Dfile=lib/log4net-$LOG4NETVERSION/bin/net/2.0/release/log4net.dll
>>>> -Dclassifier=net-2.0
>>>> mvn install:install-file  -DpomFile=pom.xml
>>>> -Dfile=lib/log4net-$LOG4NETVERSION/bin/net/1.0/release/log4net.dll
>>>> -Dclassifier=net-1.0
>>>> mvn install:install-file  -DpomFile=pom.xml
>>>> -Dfile=lib/log4net-$LOG4NETVERSION/bin/net/1.1/release/log4net.dll
>>>> -Dclassifier=net-1.1
>>>> mvn install:install-file  -DpomFile=pom.xml
>>>> -Dfile=lib/log4net-$LOG4NETVERSION/bin/mono/2.0/release/log4net.dll
>>>> -Dclassifier=mono-2.0
>>>> mvn install:install-file  -DpomFile=pom.xml
>>>> -Dfile=lib/log4net-$LOG4NETVERSION/bin/mono/1.0/release/log4net.dll
>>>> -Dclassifier=mono-1.0
>>>> mvn install:install-file  -DpomFile=pom.xml
>>>> -Dfile=lib/log4net-$LOG4NETVERSION/bin/netcf/1.0/release/
>>>> log4net.dll
>>>> -Dclassifier=netcf-1.0
>>>> mvn install:install-file  -DpomFile=pom.xml
>>>> -Dfile=lib/log4net-$LOG4NETVERSION/bin/cli/1.0/release/log4net.dll
>>>> -Dclassifier=cli-1.0
>>>> mvn install:install-file  -DpomFile=pom.xml
>>>> -Dfile=lib/log4net-$LOG4NETVERSION/bin/sscli/1.0/release/
>>>> log4net.dll
>>>> -Dclassifier=sscli-1.0
>>>>
>>>> cd ~/.m2/repository/log4net/log4net/$LOG4NETVERSION/
>>>> echo "Bundling local repository files"
>>>> jar -cf log4net-bundle.jar *.dll *.pom
>>>>
>>>
>>> And my pom is:
>>>
>>>> <?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>
>>>>    <!-- the last version number will be used for nmaven artifact
>>>> packaging -->
>>>>    <version>1.2.10.0</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://logging.apache.org/log4net/</url>
>>>>    <packaging>dotnet:library</packaging>
>>>>    <developers>
>>>>        <developer>
>>>>            <id>mimil</id>
>>>>            <email>[hidden email]</email>
>>>>            <roles>
>>>>                <role>artifact creator</role>
>>>>            </roles>
>>>>        </developer>
>>>>    </developers>
>>>>    <licenses>
>>>>        <license>
>>>>            <name>The Apache2 License</name>
>>>>            <url>
>>>>                http://logging.apache.org/log4net/license.html
>>>>            </url>
>>>>        </license>
>>>>    </licenses>
>>>>    <build>
>>>>        <finalName>log4net</finalName>
>>>>        <plugins>
>>>>            <!-- dotnet compiler plugin is needed to be aware of
>>>> dot:library packaging -->
>>>>            <plugin>
>>>>                <groupId>org.apache.maven.dotnet.plugins</groupId>
>>>>                <artifactId>maven-dotnet-compiler-plugin</
>>>> artifactId>
>>>>                <!--version>0.16-incubating-SNAPSHOT</version-->
>>>>                <extensions>true</extensions>
>>>>            </plugin>
>>>>        </plugins>
>>>>    </build>
>>>> </project>
>>>>
>>>
>>> Any comments are welcome before I upload them.
>>>
>>> Regards,
>>> Cedric,
>>>
>>>
>>> On Fri, Nov 7, 2008 at 5:03 AM, James Carpenter <[hidden email]
>>> >wrote:
>>>
>>>> You might want to consider adding the pdb and source archives with
>>>> appropriate classifiers along with the assemblies/dlls.  Even if  
>>>> you don't
>>>> index the pdb files (see below) it will be easy to go back and do  
>>>> so later.
>>>>
>>>>
>>>> =======================================
>>>> If you want to go way out of the way you can even add source server
>>>> information to the pdb files.
>>>>
>>>> Lets say you create a maven plugin with the following goal/
>>>> arguments:
>>>>
>>>> prompt>mvn source-server:resolve -DgroupId="com.acme.mortar"
>>>> -DartifactId="tools" -Dversion="1.3.2" -DrelativeFile="tooling/
>>>> trowel.cs"
>>>> -DoutputPath="C:\mysrc\"
>>>>
>>>> The result of this goal would be to resolve the
>>>> com.acme.mortar:tools:sources:1.3.2:jar artifact and extract the
>>>> tooling/trowel.cs file and copy it to
>>>> C:\mysrc\com\acme\mortar\tools\1.3.2\tooling\trowel.cs
>>>>
>>>> You then process the pdb files to inject the magic srcsrv stream  
>>>> (see an
>>>> earlier post) which will tell the MS debugging tools for windows  
>>>> how to form
>>>> the above command for any of the files used to build the assembly/
>>>> pdb.
>>>>
>>>> The result of this dance will be the ability for the Visual Studio
>>>> debugger to magically step down into the source code of any of the
>>>> assemblies you have placed into the maven repository.
>>>>
>>>> I wrote a post on this mailing list a few weeks ago which gives a  
>>>> lot more
>>>> of the details.
>>>>
>>>>
>>>> On Nov 6, 2008, at 3:52 PM, Mimil Mimil wrote:
>>>>
>>>> Hi,
>>>>>
>>>>> As you advised I am making artifacts from binaries because I do  
>>>>> not
>>>>> belong
>>>>> to the projects I am doing artifacts - I just want to add more  
>>>>> nmaven
>>>>> artifacts for the community.
>>>>>
>>>>> Dependencies will be differents are they are I think related to  
>>>>> the
>>>>> environments so I think the only way to manage this is classifier.
>>>>>
>>>>> How the lib differs between environments? I don't have any  
>>>>> knowledge of
>>>>> .net
>>>>> but the clearest exemple is for compact framework. As it targets  
>>>>> mobiles,
>>>>> pda, ... it is certainly a lot different from the conventional  
>>>>> framework.
>>>>> As yes did different DLLs for the different frameworks I think  
>>>>> it is
>>>>> because
>>>>> they need it, that's all I can say =)
>>>>>
>>>>> An easy way would be for now to not set dependencies (if we have  
>>>>> problem
>>>>> on
>>>>> this point) but is the classifier stuff supported out of the box  
>>>>> to
>>>>> deploy
>>>>> manual artifacts? I mean is the namming convention
>>>>> <artifactId>-<version>-<everything else after version is  
>>>>> considered as a
>>>>> classifier> ?
>>>>>
>>>>> Do we have to develop a little plugin in order to specify the  
>>>>> classifier
>>>>> of
>>>>> artifacts? I say that because the only things I saw through the  
>>>>> web as or
>>>>> based on the maven-jar-plugin or on war plugin which I don't  
>>>>> remember the
>>>>> name.
>>>>> Maybe http://mojo.codehaus.org/build-helper-maven-plugin/usage.html 
>>>>>  can
>>>>> be
>>>>> used with attach-artifact?
>>>>>
>>>>> Regards,
>>>>> Cedric,
>>>>>
>>>>> On Thu, Nov 6, 2008 at 7:19 PM, Brett Porter <[hidden email]>  
>>>>> wrote:
>>>>>
>>>>> 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
>>>>>> [hidden email]
>>>>>> http://blogs.exist.com/bporter/
>>>>>>
>>>>>>
>>>>>>
>>>> Sincerely,
>>>> James Carpenter
>>>> cell: 832-677-7247
>>>> email: [hidden email]
>>>>
>>>>
>>>>
>>>>
>>>
>>

--
Brett Porter
[hidden email]
http://blogs.exist.com/bporter/

Loading...