public List<Artifact> getDirectModuleDependencies() { List<Artifact> artifacts; try { artifacts = artifactContext.getNetModulesFor( project.getArtifact() ); } catch ( ArtifactException e ) { logger.error( "NPANDAY-061-000: Improper Initialization of the Net Modules", e ); return new ArrayList<Artifact>(); //TODO: How to handle this: usually implies improper init of ArtifactContext } if ( config.isTestCompile() && ArtifactTypeHelper.isDotnetModule( config.getArtifactType() ) ) { artifacts.add( project.getArtifact() ); } if ( config.isTestCompile() && ArtifactTypeHelper.isDotnetModule( project.getArtifact().getType() ) && project.getArtifact().getFile() != null && project.getArtifact().getFile().exists() ) { artifacts.add( project.getArtifact() ); } return artifacts; }