/** * Extract the source dependencies. * * @throws MojoExecutionException if it fails. */ protected void extractSourceDependencies() throws MojoExecutionException { for ( Artifact artifact : getDirectDependencyArtifacts() ) { String type = artifact.getType(); if ( type.equals( APKSOURCES ) ) { getLog().debug( "Detected apksources dependency " + artifact + " with file " + artifact.getFile() + ". Will resolve and extract..." ); final File apksourcesFile = resolveArtifactToFile( artifact ); getLog().debug( "Extracting " + apksourcesFile + "..." ); extractApksources( apksourcesFile ); } } if ( extractedDependenciesJavaResources.exists() ) { projectHelper.addResource( project, extractedDependenciesJavaResources.getAbsolutePath(), null, null ); project.addCompileSourceRoot( extractedDependenciesJavaSources.getAbsolutePath() ); } }
/** * Extracts ApkLib and adds the assets and apklib sources and resources to the build. */ private void extractApklib( Artifact apklibArtifact ) throws MojoExecutionException { getUnpackedLibHelper().extractApklib( apklibArtifact ); // Copy the assets to the the combinedAssets folder. // Add the apklib source and resource to the compile. // NB apklib sources are added to compileSourceRoot because we may need to compile against them. // This means the apklib classes will be compiled into target/classes and packaged with this build. copyFolder( getUnpackedLibAssetsFolder( apklibArtifact ), combinedAssets ); final File apklibSourceFolder = getUnpackedApkLibSourceFolder( apklibArtifact ); final List<String> resourceExclusions = Arrays.asList( "**/*.java", "**/*.aidl" ); projectHelper.addResource( project, apklibSourceFolder.getAbsolutePath(), null, resourceExclusions ); project.addCompileSourceRoot( apklibSourceFolder.getAbsolutePath() ); }
public void execute() throws MojoExecutionException, MojoFailureException { projectHelper.addResource(project, ceciliaDirectory.getPath(), Arrays.asList(includes), Arrays.asList(excludes)); } }
@Override protected void attachFiles() { project.addCompileSourceRoot(outputDirectory.getAbsolutePath()); projectHelper.addResource(project, thriftSourceRoot.getAbsolutePath(), ImmutableList.of("**/*.thrift"), ImmutableList.of()); } }
projectHelper.addResource(project, componentOutDir.getPath(), Collections.singletonList("**/component.properties"), Collections.emptyList());
List excludes = null; projectHelper.addResource(mavenProject, directory, includes, excludes);
projectHelper.addResource(project, dataFormatOutDir.getPath(), Collections.singletonList("**/dataformat.properties"), Collections.emptyList());
projectHelper.addResource(project, outDir.getPath(), includes, new ArrayList<String>()); projectHelper.attachArtifact(project, "xml", "archetype-catalog", out);
projectHelper.addResource(project, otherOutDir.getPath(), Collections.singletonList("**/other.properties"), Collections.emptyList());
List<String> incs = Arrays.asList("**/*" + extension); List<String> excs = new ArrayList<String>(); projectHelper.addResource(project, input.getAbsolutePath(), incs, excs); List<String> incs = Arrays.asList("**/*" + extension); List<String> excs = new ArrayList<String>(); projectHelper.addResource(project, include.getAbsolutePath(), incs, excs);
projectHelper.addResource(project, languageOutDir.getPath(), Collections.singletonList("**/language.properties"), Collections.emptyList());
projectHelper.addResource(project, libDirectory.getCanonicalPath(), null, null);
List excludes = null; projectHelper.addResource(mavenProject, directory, includes, excludes);