This Question is Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
3 Replies Last post: Oct 17, 2013 11:52 PM by Yevgen Bushuyev  
Yevgen Bushuyev Newbie 56 posts since
Jul 11, 2012
Currently Being Moderated

Oct 16, 2013 10:49 AM

Add class from maven module

Hi,

 

I want to use some class from module A in module B in a maven project. Module B has yet no dependency on module A. After typing classname and pressing Alt-Enter on it Idea offers

 

1. Add dependency on module A

2...

N. Add Maven Dependency...

 

when selecting 1 - the dependency is added to project config in Idea but pom is not altered and thus doesn't compile from command line and dependency is lost after reimport.

when selecting N - it just can't find any dependencies.

 

Is it a bug or intended behaviour?

 

Best regards, Eugene.

Alexander Chernikov JetBrains 1,009 posts since
Jan 11, 2007
Currently Being Moderated
Oct 16, 2013 6:48 PM in response to: Yevgen Bushuyev
Re: Add class from maven module

Hello.

 

On the choice 1 the issue exists: http://youtrack.jetbrains.com/issue/IDEA-101675

 

I will check the choice N soon.

 

Regards,

Alexander.

Alexander Chernikov JetBrains 1,009 posts since
Jan 11, 2007
Currently Being Moderated
Oct 17, 2013 8:54 PM in response to: Alexander Chernikov
Re: Add class from maven module

Sorry for delay, regarding choice N. Since "Add Maven dependency" searches the Maven repository, it really can't find anything in the project.

 

I think a fix of http://youtrack.jetbrains.com/issue/IDEA-101675 could be the proper place to resolve the issue, since "Add dependency to module A" is clearly suggested by that action.

 

Thanks,

Alexander.

More Like This

  • Retrieving data ...