You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Neil C Smith <ne...@apache.org> on 2020/08/19 15:10:07 UTC

Maven - ignore dependency is project?

Hi,

Anyone know if we have a feature somewhere to ignore that a Maven
dependency is a project and force use of the repository JARs?  Either
that or feature to not ignore automatic module names would be great -
error badges are frustrating me.  Not sure if I'm missing something
obvious.

Best wishes,

Neil

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: Maven - ignore dependency is project?

Posted by Neil C Smith <ne...@apache.org>.
On Wed, 19 Aug 2020, 22:11 Will Hartung, <wi...@gmail.com> wrote:

> On Wed, Aug 19, 2020 at 8:10 AM Neil C Smith <ne...@apache.org>
> wrote:
> > Anyone know if we have a feature somewhere to ignore that a Maven
> > dependency is a project and force use of the repository JARs?  Either
> > that or feature to not ignore automatic module names would be great -
> > error badges are frustrating me.  Not sure if I'm missing something
> > obvious.
> >
>
> I imagine if he dependency is not actually a part of your project, then
> maven will do the right thing. But then I question doesn't it do the right
> thing anyway if the version is correctly specified as the dependency? If
> your project is XYZ-SNAPSHOT, and you depend on JAR-1.2.3, it should ignore
> what's in the project and use the absolute versioned one from the repo.
>

Yes. To be clear, this is about the editor module path resolution, not
Maven itself. When a dependency has the same version as the dependency
project. NetBeans then uses the sources rather than jar to resolve against,
but this doesn't pick up eg. automatic module name.

Best wishes,

Neil

>

Re: Maven - ignore dependency is project?

Posted by Will Hartung <wi...@gmail.com>.
On Wed, Aug 19, 2020 at 8:10 AM Neil C Smith <ne...@apache.org> wrote:

> Hi,
>
> Anyone know if we have a feature somewhere to ignore that a Maven
> dependency is a project and force use of the repository JARs?  Either
> that or feature to not ignore automatic module names would be great -
> error badges are frustrating me.  Not sure if I'm missing something
> obvious.
>

I imagine if he dependency is not actually a part of your project, then
maven will do the right thing. But then I question doesn't it do the right
thing anyway if the version is correctly specified as the dependency? If
your project is XYZ-SNAPSHOT, and you depend on JAR-1.2.3, it should ignore
what's in the project and use the absolute versioned one from the repo.

Because in the end, maven just copies everything to the repo anyway, I
didn't think it did any actual short circuiting. Rather it simply copied to
the repo then immediately pulls it back out.

But I'm not positive.