You are viewing a plain text version of this content. The canonical link for it is here.
Posted to npanday-users@incubator.apache.org by Octavian <h....@gmail.com> on 2014/11/25 10:34:26 UTC

NPanday compile plugin doesn't get dll dependencies

Hello,
The maven-compile-plugin with the version "1.4.0-incubating" works if I put
a dependency as the one below:

       <dependency>
            <groupId>org.apache.logging</groupId>
            <artifactId>log4net</artifactId>
            <version>1.2</version>
            <type>dll</type>
        </dependency>

The pom file of this library is with packaging "dll".

The version "1.5.0-incubating-SNAPSHOT" doesn't bring this dll and the
install phase fails with:
The type or namespace name 'log4net' could not be found (are you missing a
using directive or an assembly reference?)

Interesting is that if I use "<type>library</type>" for the above
dependency it builds with success.

So why the behaviour changed between 1.4.0-incubating and
1.5.0-incubating-SNAPSHOT?
Now I have to change the dependencies from type "dll" to type "library"?

Thanks,
Octavian

PS: I need to use 1.5.0-incubating-SNAPSHOT because of a fix on
maven-resgen-plugin

Re: NPanday compile plugin doesn't get dll dependencies

Posted by Octavian <h....@gmail.com>.
Hello,
The artifact is resolved, but it is not passed to the compiler.
I have created a pull request on NPanday project from GitHub (see
https://github.com/apache/npanday/pull/1)

The helper method (isDotnetAssembly) won't recognize "dll" type
dependencies and so the library is not added in the list of modules that is
passed to the compiler.

Octavian

2014-12-08 10:55 GMT+02:00 Lars Corneliussen // Zen <me...@lcorneliussen.de>:

> Hi Octavian,
>
> sorry for not replying earlier.
>
> In 1.5 we changed the artifact types to start with a "dotnet-".
>
> http://incubator.apache.org/npanday/docs/1.5.0-incubating-SNAPSHOT/guide/advanced/project-types.html
>
> I'm not sure if we ever supported "dll" explicitly. The thing is, that
> maven would usually try to resolve the artifact by using the type as a file
> extension if the no plugin kicks in with a custom resolve logic or type to
> file extension mapping.
>
> But it might be that in 1.5.0 we still "sort out" dependencies we don't
> explicitly know the type of.
>
> What does the error look like? Is the artifact resolved, but then not
> passed to the compiler, or is the error at resolve time?
>
> _
> Lars
>
> -----Ursprüngliche Nachricht-----
> Von: Octavian [mailto:h.octavian@gmail.com]
> Gesendet: Dienstag, 25. November 2014 11:34
> An: npanday-users@incubator.apache.org
> Betreff: NPanday compile plugin doesn't get dll dependencies
>
> Hello,
> The maven-compile-plugin with the version "1.4.0-incubating" works if I
> put a dependency as the one below:
>
>        <dependency>
>             <groupId>org.apache.logging</groupId>
>             <artifactId>log4net</artifactId>
>             <version>1.2</version>
>             <type>dll</type>
>         </dependency>
>
> The pom file of this library is with packaging "dll".
>
> The version "1.5.0-incubating-SNAPSHOT" doesn't bring this dll and the
> install phase fails with:
> The type or namespace name 'log4net' could not be found (are you missing a
> using directive or an assembly reference?)
>
> Interesting is that if I use "<type>library</type>" for the above
> dependency it builds with success.
>
> So why the behaviour changed between 1.4.0-incubating and
> 1.5.0-incubating-SNAPSHOT?
> Now I have to change the dependencies from type "dll" to type "library"?
>
> Thanks,
> Octavian
>
> PS: I need to use 1.5.0-incubating-SNAPSHOT because of a fix on
> maven-resgen-plugin
>
>

AW: NPanday compile plugin doesn't get dll dependencies

Posted by Lars Corneliussen // Zen <me...@lcorneliussen.de>.
Hi Octavian,

sorry for not replying earlier.

In 1.5 we changed the artifact types to start with a "dotnet-".
http://incubator.apache.org/npanday/docs/1.5.0-incubating-SNAPSHOT/guide/advanced/project-types.html

I'm not sure if we ever supported "dll" explicitly. The thing is, that maven would usually try to resolve the artifact by using the type as a file extension if the no plugin kicks in with a custom resolve logic or type to file extension mapping.

But it might be that in 1.5.0 we still "sort out" dependencies we don't explicitly know the type of.

What does the error look like? Is the artifact resolved, but then not passed to the compiler, or is the error at resolve time?

_
Lars

-----Ursprüngliche Nachricht-----
Von: Octavian [mailto:h.octavian@gmail.com] 
Gesendet: Dienstag, 25. November 2014 11:34
An: npanday-users@incubator.apache.org
Betreff: NPanday compile plugin doesn't get dll dependencies

Hello,
The maven-compile-plugin with the version "1.4.0-incubating" works if I put a dependency as the one below:

       <dependency>
            <groupId>org.apache.logging</groupId>
            <artifactId>log4net</artifactId>
            <version>1.2</version>
            <type>dll</type>
        </dependency>

The pom file of this library is with packaging "dll".

The version "1.5.0-incubating-SNAPSHOT" doesn't bring this dll and the install phase fails with:
The type or namespace name 'log4net' could not be found (are you missing a using directive or an assembly reference?)

Interesting is that if I use "<type>library</type>" for the above dependency it builds with success.

So why the behaviour changed between 1.4.0-incubating and 1.5.0-incubating-SNAPSHOT?
Now I have to change the dependencies from type "dll" to type "library"?

Thanks,
Octavian

PS: I need to use 1.5.0-incubating-SNAPSHOT because of a fix on maven-resgen-plugin