History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-25383
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Normal Normal
Assignee: Anton Makeev
Reporter: Sean Kleinjung
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

Modules with no source that are dependencies of WAR modules generate error when building project

Created: 18 Jan 08 02:55   Updated: 21 Mar 08 14:48
Component/s: Maven Integration
Fix Version/s: Selena 7.0.4

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: 1. Zip Archive EmptyModuleMavenTest.zip (3 kb)

Issue Links:
Relates
This issue relates to:
IDEADEV-25382 Compiling a maven module without 'src... Normal Resolved
 

Build: 7,648
Fixed in build: 8,244
Severity: Medium


 Description  « Hide
I have imported a multi-module Maven project that includes one or more child modules that do not have source code. These modules are either sourceless POMs used as parents, or could simply declare dependency sets referenced by other modules. If any war modules depend on these empty modules, then attempting to build this project results in the following error:

Error: Directory '<path\to\module>\target\classes' not found. Please recompile module '<SourcelessModule>'.

Recompiling the specific module does not resolve the error.

Expected behavior would be one of the following, in order of decreasing desirability:
1) When importing a project, configure sourceless modules to allow compiles to succeed. (Not exactly sure what IDEA is looking for, so I cannot say more specifically what this is.)
2) Have the build for a sourceless project create the expected directory to suppress the error
3) Have the import create the src/main/java folder to prevent the error from happening

Note that, if a plain jar module depends on an empty module, everything works fine. The problem only occurs when the dependency is from a war module.

I have attached a sample project that illustrates this issue. Import the parent POM and attempt to build the project. The error is in the messages window.

Presently, I am working around this by creating empty src/main/java folders in all projects that do not have source, and committing those to Subversion. This works, but ideally the IDE wouldn't require this.



 All   Comments   Work Log   Change History      Sort Order:
Anton Makeev - 21 Jan 08 14:54
Do you have explicit dependency on such modules?

The better way to share dependencies is to use inheritance and set packaging method to 'pom'.
http://maven.apache.org/guides/introduction/introduction-to-the-pom.html#Project_Inheritance

Will that resolve your problem?


Anton Makeev - 20 Mar 08 19:19
IDEA-17110