code: protected void addCompileSourceArtifacts(JavaCommand cmd)
              throws MojoExecutionException
      {
          if ( compileSourcesArtifacts == null )
          {
              return;
          }
          for ( String include : compileSourcesArtifacts )
          {
              List<String> parts = new ArrayList<String>();
              parts.addAll( Arrays.asList(include.split(":")) );
              if ( parts.size() == 2 )
              {
                  // type is optional as it will mostly be "jar"
                  parts.add( "jar" );
              }
              String dependencyId = StringUtils.join( parts.iterator(), ":" );
              boolean found = false;
  
              for ( Artifact artifact : getProjectArtifacts() )
              {
                  getLog().debug( "compare " + dependencyId + " with " + artifact.getDependencyConflictId() );
                  if ( artifact.getDependencyConflictId().equals( dependencyId ) )
                  {
                      getLog().debug( "Add " + dependencyId + " sources.jar artifact to compile classpath" );
                      Artifact sources =
                              resolve( artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(),
                                      "jar", "sources" );
                      cmd.addToClasspath( sources.getFile() );
                      found = true;
                      break;
                  }
              }
              if ( !found )
                  getLog().warn(
                          "Declared compileSourcesArtifact was not found in project dependencies " + dependencyId );
          }
      }
docs: Add sources.jar artifacts for project dependencies listed as compileSourcesArtifacts. This is a GWT hack to avoid
  packaging java source files into JAR when sharing code between server and client. Typically, some domain model
  classes or business rules may be packaged as a separate Maven module. With GWT packaging this requires to
  distribute such classes with code, that may not be desirable.
  <p>
  The hack can also be used to include utility code from external librariries that may not have been designed for
  GWT.