use of org.eclipse.tycho.core.osgitools.project.BuildOutputJar in project tycho by eclipse.
the class OsgiBundleProject method addPDESourceRoots.
private void addPDESourceRoots(MavenProject project) {
EclipsePluginProjectImpl eclipsePluginProject = getEclipsePluginProject(DefaultReactorProject.adapt(project));
for (BuildOutputJar outputJar : eclipsePluginProject.getOutputJars()) {
for (File sourceFolder : outputJar.getSourceFolders()) {
removeDuplicateTestCompileRoot(sourceFolder, project.getTestCompileSourceRoots());
project.addCompileSourceRoot(sourceFolder.getAbsolutePath());
}
}
}
use of org.eclipse.tycho.core.osgitools.project.BuildOutputJar in project tycho by eclipse.
the class AbstractOsgiCompilerMojo method getSourcepath.
@Override
public List<SourcepathEntry> getSourcepath() throws MojoExecutionException {
ArrayList<SourcepathEntry> entries = new ArrayList<>();
for (BuildOutputJar jar : getEclipsePluginProject().getOutputJars()) {
final File outputDirectory = jar.getOutputDirectory();
for (final File sourcesRoot : jar.getSourceFolders()) {
SourcepathEntry entry = new SourcepathEntry() {
@Override
public File getSourcesRoot() {
return sourcesRoot;
}
@Override
public File getOutputDirectory() {
return outputDirectory;
}
@Override
public List<String> getIncludes() {
return null;
}
@Override
public List<String> getExcludes() {
return null;
}
};
entries.add(entry);
}
}
return entries;
}
use of org.eclipse.tycho.core.osgitools.project.BuildOutputJar in project tycho by eclipse.
the class AbstractOsgiCompilerMojo method execute.
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
StandardExecutionEnvironment[] manifestBREEs = bundleReader.loadManifest(project.getBasedir()).getExecutionEnvironments();
getLog().debug("Manifest BREEs: " + Arrays.toString(manifestBREEs));
getLog().debug("Effective EE: " + getTargetExecutionEnvironment());
String effectiveTargetLevel = getTargetLevel();
getLog().debug("Effective source/target: " + getSourceLevel() + "/" + effectiveTargetLevel);
checkTargetLevelCompatibleWithManifestBREEs(effectiveTargetLevel, manifestBREEs);
for (BuildOutputJar jar : getEclipsePluginProject().getOutputJars()) {
this.outputJar = jar;
this.outputJar.getOutputDirectory().mkdirs();
super.execute();
doCopyResources();
}
// this does not include classes from nested jars
BuildOutputJar dotOutputJar = getEclipsePluginProject().getDotOutputJar();
if (dotOutputJar != null) {
project.getArtifact().setFile(dotOutputJar.getOutputDirectory());
}
}
Aggregations