private File ensureThatArtifactFileIsSet ( MavenProject project ) { Artifact artifact = project . getArtifact ( ) ; if ( artifact == null ) { return null ; } File oldFile = artifact . getFile ( ) ; if ( oldFile != null ) { return oldFile ; } Build build = project . getBuild ( ) ; if ( build == null ) { return null ; } String finalName = build . getFinalName ( ) ; String target = build . getDirectory ( ) ; if ( finalName == null || target == null ) { return null ; } File artifactFile = new File ( target , finalName + "." + project . getPackaging ( ) ) ; if ( artifactFile . exists ( ) && artifactFile . isFile ( ) ) { setArtifactFile ( project , artifactFile ) ; } return null ; }
warning with an error following .