forked from DevBoost/BuildBoost
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
https://github.com/FunThomas424242/BuildBoost.git Conflicts: Core/de.devboost.buildboost/src/de/devboost/buildboost/artifacts/RepositoriesFile.java
- Loading branch information
Showing
158 changed files
with
12,182 additions
and
12,180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> | ||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> | ||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> |
24 changes: 12 additions & 12 deletions
24
Core/de.devboost.buildboost/.settings/org.eclipse.jdt.core.prefs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
#Thu Nov 10 23:39:13 CET 2011 | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 | ||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve | ||
org.eclipse.jdt.core.compiler.compliance=1.6 | ||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate | ||
org.eclipse.jdt.core.compiler.debug.localVariable=generate | ||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate | ||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
org.eclipse.jdt.core.compiler.source=1.6 | ||
#Thu Nov 10 23:39:13 CET 2011 | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 | ||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve | ||
org.eclipse.jdt.core.compiler.compliance=1.6 | ||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate | ||
org.eclipse.jdt.core.compiler.debug.localVariable=generate | ||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate | ||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
org.eclipse.jdt.core.compiler.source=1.6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
source.. = src/ | ||
bin.includes = META-INF/,\ | ||
. | ||
source.. = src/ | ||
bin.includes = META-INF/,\ | ||
. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,39 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project basedir="." default="buildboost-bootstrap" name="Bootstrap buildboost"> | ||
<!-- This script must be called at the beginning of any buildboost process. | ||
It compiles all available buildboost plug-ins. --> | ||
|
||
<property name="buildboost_core_src" value="${basedir}"/> | ||
|
||
<property name="buildboost_core_plugin_id" value="de.devboost.buildboost"/> | ||
<property name="buildboost_core_bin" value="${build_dir}/artifacts/projects/${buildboost_core_plugin_id}"/> | ||
|
||
<target name="buildboost-bootstrap"> | ||
<mkdir dir="${build_dir}"/> | ||
<mkdir dir="${buildboost_core_bin}"/> | ||
|
||
<echo message="Compile buildboost core plug-in to bootstrap build process" /> | ||
<javac srcdir="${buildboost_core_src}/src" destdir="${buildboost_core_bin}" includeantruntime="false" debug="true" /> | ||
|
||
<echo message="Compile buildboost generator extensions" /> | ||
<copy file="${buildboost_core_src}/buildboost_compile_extensions.xml" tofile="${buildboost_core_bin}/buildboost_compile_extensions.xml" /> | ||
<ant antfile="buildboost_compile_extensions.xml" dir="${buildboost_core_bin}"> | ||
<property name="build_plugin_id" value="${buildboost_core_plugin_id}" /> | ||
<property name="workspace" value="${workspace}"/> | ||
<property name="build_dir" value="${build_dir}"/> | ||
</ant> | ||
|
||
<copy file="${buildboost_core_src}/buildboost_generate.xml" tofile="${buildboost_core_bin}/buildboost_generate.xml" /> | ||
<ant antfile="buildboost_generate.xml" dir="${buildboost_core_bin}"> | ||
<property name="buildboost_core_plugin_id" value="${buildboost_core_plugin_id}" /> | ||
<property name="workspace" value="${workspace}"/> | ||
<property name="build_dir" value="${build_dir}"/> | ||
</ant> | ||
|
||
<echo message="Call master script" /> | ||
<ant antfile="${build_dir}/buildboost_master.xml" dir="${build_dir}"> | ||
<property name="build_plugin_id" value="${build_plugin_id}" /> | ||
<property name="workspace" value="${workspace}"/> | ||
</ant> | ||
</target> | ||
</project> | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project basedir="." default="buildboost-bootstrap" name="Bootstrap buildboost"> | ||
<!-- This script must be called at the beginning of any buildboost process. | ||
It compiles all available buildboost plug-ins. --> | ||
|
||
<property name="buildboost_core_src" value="${basedir}"/> | ||
|
||
<property name="buildboost_core_plugin_id" value="de.devboost.buildboost"/> | ||
<property name="buildboost_core_bin" value="${build_dir}/artifacts/projects/${buildboost_core_plugin_id}"/> | ||
|
||
<target name="buildboost-bootstrap"> | ||
<mkdir dir="${build_dir}"/> | ||
<mkdir dir="${buildboost_core_bin}"/> | ||
|
||
<echo message="Compile buildboost core plug-in to bootstrap build process" /> | ||
<javac srcdir="${buildboost_core_src}/src" destdir="${buildboost_core_bin}" includeantruntime="false" debug="true" /> | ||
|
||
<echo message="Compile buildboost generator extensions" /> | ||
<copy file="${buildboost_core_src}/buildboost_compile_extensions.xml" tofile="${buildboost_core_bin}/buildboost_compile_extensions.xml" /> | ||
<ant antfile="buildboost_compile_extensions.xml" dir="${buildboost_core_bin}"> | ||
<property name="build_plugin_id" value="${buildboost_core_plugin_id}" /> | ||
<property name="workspace" value="${workspace}"/> | ||
<property name="build_dir" value="${build_dir}"/> | ||
</ant> | ||
|
||
<copy file="${buildboost_core_src}/buildboost_generate.xml" tofile="${buildboost_core_bin}/buildboost_generate.xml" /> | ||
<ant antfile="buildboost_generate.xml" dir="${buildboost_core_bin}"> | ||
<property name="buildboost_core_plugin_id" value="${buildboost_core_plugin_id}" /> | ||
<property name="workspace" value="${workspace}"/> | ||
<property name="build_dir" value="${build_dir}"/> | ||
</ant> | ||
|
||
<echo message="Call master script" /> | ||
<ant antfile="${build_dir}/buildboost_master.xml" dir="${build_dir}"> | ||
<property name="build_plugin_id" value="${build_plugin_id}" /> | ||
<property name="workspace" value="${workspace}"/> | ||
</ant> | ||
</target> | ||
</project> |
40 changes: 20 additions & 20 deletions
40
Core/de.devboost.buildboost/buildboost_compile_extensions.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project basedir="." default="buildboost-bootstrap-generate" name="Generate Bootstrap Scripts for buildboost"> | ||
<target name="buildboost-bootstrap-generate"> | ||
<echo message="Run buildboost bootstrap generator to obtain script that compiles all additional buildboost plug-ins (including the custom build script generator)" /> | ||
<java classname="de.devboost.buildboost.BuildScriptGeneratorRunner" failonerror="true"> | ||
<arg value="${workspace}" /> | ||
<arg value="de.devboost.buildboost.BuildScriptGenerator" /> | ||
|
||
<classpath> | ||
<pathelement path="${buildboost_core_bin}"/> | ||
</classpath> | ||
</java> | ||
|
||
<!-- Call generated script --> | ||
<ant antfile="${build_dir}/buildboost_master.xml" dir="${build_dir}"> | ||
<property name="build_plugin_id" value="${buildboost_core_plugin_id}" /> | ||
<property name="workspace" value="${workspace}"/> | ||
</ant> | ||
</target> | ||
</project> | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project basedir="." default="buildboost-bootstrap-generate" name="Generate Bootstrap Scripts for buildboost"> | ||
<target name="buildboost-bootstrap-generate"> | ||
<echo message="Run buildboost bootstrap generator to obtain script that compiles all additional buildboost plug-ins (including the custom build script generator)" /> | ||
<java classname="de.devboost.buildboost.BuildScriptGeneratorRunner" failonerror="true"> | ||
<arg value="${workspace}" /> | ||
<arg value="de.devboost.buildboost.BuildScriptGenerator" /> | ||
|
||
<classpath> | ||
<pathelement path="${buildboost_core_bin}"/> | ||
</classpath> | ||
</java> | ||
|
||
<!-- Call generated script --> | ||
<ant antfile="${build_dir}/buildboost_master.xml" dir="${build_dir}"> | ||
<property name="build_plugin_id" value="${buildboost_core_plugin_id}" /> | ||
<property name="workspace" value="${workspace}"/> | ||
</ant> | ||
</target> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project basedir="." default="buildboost-generate" name="Generate Scripts using buildboost"> | ||
<target name="buildboost-generate"> | ||
<echo message="Run custom script generator via delegate" /> | ||
<java classname="de.devboost.buildboost.BuildScriptGeneratorRunner" failonerror="true"> | ||
<arg value="${workspace}" /> | ||
<arg value="${build_plugin_id}.BuildScriptGenerator" /> | ||
|
||
<classpath> | ||
<pathelement path="${build_dir}/build-boost-bin"/> | ||
<pathelement path="${java.class.path}"/> | ||
</classpath> | ||
</java> | ||
</target> | ||
</project> | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project basedir="." default="buildboost-generate" name="Generate Scripts using buildboost"> | ||
<target name="buildboost-generate"> | ||
<echo message="Run custom script generator via delegate" /> | ||
<java classname="de.devboost.buildboost.BuildScriptGeneratorRunner" failonerror="true"> | ||
<arg value="${workspace}" /> | ||
<arg value="${build_plugin_id}.BuildScriptGenerator" /> | ||
|
||
<classpath> | ||
<pathelement path="${build_dir}/build-boost-bin"/> | ||
<pathelement path="${java.class.path}"/> | ||
</classpath> | ||
</java> | ||
</target> | ||
</project> |
160 changes: 80 additions & 80 deletions
160
Core/de.devboost.buildboost/src/de/devboost/buildboost/ArtifactSorter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,80 +1,80 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2006-2012 | ||
* Software Technology Group, Dresden University of Technology | ||
* DevBoost GmbH, Berlin, Amtsgericht Charlottenburg, HRB 140026 | ||
* | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Software Technology Group - TU Dresden, Germany; | ||
* DevBoost GmbH - Berlin, Germany | ||
* - initial API and implementation | ||
******************************************************************************/ | ||
package de.devboost.buildboost; | ||
|
||
import java.util.ArrayList; | ||
import java.util.Collection; | ||
import java.util.List; | ||
import java.util.Set; | ||
|
||
import de.devboost.buildboost.model.AbstractBuildParticipant; | ||
import de.devboost.buildboost.model.BuildEventType; | ||
import de.devboost.buildboost.model.IArtifact; | ||
import de.devboost.buildboost.model.IArtifactDiscoverer; | ||
import de.devboost.buildboost.model.IArtifactFilter; | ||
import de.devboost.buildboost.model.IBuildContext; | ||
import de.devboost.buildboost.model.IBuildListener; | ||
import de.devboost.buildboost.model.IBuildParticipant; | ||
import de.devboost.buildboost.model.IDependable; | ||
import de.devboost.buildboost.util.ArtifactUtil; | ||
import de.devboost.buildboost.util.Sorter; | ||
|
||
public class ArtifactSorter extends AbstractBuildParticipant { | ||
|
||
@Override | ||
public boolean dependsOn(IBuildParticipant otherParticipant) { | ||
if (otherParticipant instanceof DependencyResolver) { | ||
return true; | ||
} | ||
if (otherParticipant instanceof UnresolvedDependencyChecker) { | ||
return true; | ||
} | ||
if (otherParticipant instanceof IArtifactDiscoverer) { | ||
return true; | ||
} | ||
if (otherParticipant instanceof IArtifactFilter) { | ||
return true; | ||
} | ||
return false; | ||
} | ||
|
||
@Override | ||
public void execute(IBuildContext context) throws BuildException { | ||
Collection<IArtifact> discoveredArtifacts = context.getDiscoveredArtifacts(); | ||
IBuildListener buildListener = context.getBuildListener(); | ||
Sorter pluginSorter = new Sorter(); | ||
|
||
// exclude dependencies that cannot be included while sorting | ||
Set<IDependable> discoveredDependables = new ArtifactUtil().getSetOfDependables(discoveredArtifacts); | ||
Set<IDependable> transientHull = pluginSorter.getTransientHull(discoveredDependables); | ||
transientHull.removeAll(discoveredArtifacts); | ||
for (IDependable artifact : transientHull) { | ||
buildListener.handleBuildEvent( | ||
BuildEventType.INFO, | ||
"Artifact " + artifact + " is excluded from topological sorting (artifact is a transitive dependency, but was not selected for build)." | ||
); | ||
} | ||
|
||
// sort artifacts topologically | ||
List<IDependable> sortedArtifacts = pluginSorter.topologicalSort( | ||
new ArrayList<IDependable>(discoveredArtifacts), | ||
transientHull); | ||
|
||
// replace artifacts | ||
context.removeDiscoveredArtifacts(discoveredArtifacts); | ||
context.addDiscoveredArtifacts(new ArtifactUtil().getConcreteList(sortedArtifacts, IArtifact.class)); | ||
} | ||
} | ||
/******************************************************************************* | ||
* Copyright (c) 2006-2012 | ||
* Software Technology Group, Dresden University of Technology | ||
* DevBoost GmbH, Berlin, Amtsgericht Charlottenburg, HRB 140026 | ||
* | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Software Technology Group - TU Dresden, Germany; | ||
* DevBoost GmbH - Berlin, Germany | ||
* - initial API and implementation | ||
******************************************************************************/ | ||
package de.devboost.buildboost; | ||
|
||
import java.util.ArrayList; | ||
import java.util.Collection; | ||
import java.util.List; | ||
import java.util.Set; | ||
|
||
import de.devboost.buildboost.model.AbstractBuildParticipant; | ||
import de.devboost.buildboost.model.BuildEventType; | ||
import de.devboost.buildboost.model.IArtifact; | ||
import de.devboost.buildboost.model.IArtifactDiscoverer; | ||
import de.devboost.buildboost.model.IArtifactFilter; | ||
import de.devboost.buildboost.model.IBuildContext; | ||
import de.devboost.buildboost.model.IBuildListener; | ||
import de.devboost.buildboost.model.IBuildParticipant; | ||
import de.devboost.buildboost.model.IDependable; | ||
import de.devboost.buildboost.util.ArtifactUtil; | ||
import de.devboost.buildboost.util.Sorter; | ||
|
||
public class ArtifactSorter extends AbstractBuildParticipant { | ||
|
||
@Override | ||
public boolean dependsOn(IBuildParticipant otherParticipant) { | ||
if (otherParticipant instanceof DependencyResolver) { | ||
return true; | ||
} | ||
if (otherParticipant instanceof UnresolvedDependencyChecker) { | ||
return true; | ||
} | ||
if (otherParticipant instanceof IArtifactDiscoverer) { | ||
return true; | ||
} | ||
if (otherParticipant instanceof IArtifactFilter) { | ||
return true; | ||
} | ||
return false; | ||
} | ||
|
||
@Override | ||
public void execute(IBuildContext context) throws BuildException { | ||
Collection<IArtifact> discoveredArtifacts = context.getDiscoveredArtifacts(); | ||
IBuildListener buildListener = context.getBuildListener(); | ||
Sorter pluginSorter = new Sorter(); | ||
|
||
// exclude dependencies that cannot be included while sorting | ||
Set<IDependable> discoveredDependables = new ArtifactUtil().getSetOfDependables(discoveredArtifacts); | ||
Set<IDependable> transientHull = pluginSorter.getTransientHull(discoveredDependables); | ||
transientHull.removeAll(discoveredArtifacts); | ||
for (IDependable artifact : transientHull) { | ||
buildListener.handleBuildEvent( | ||
BuildEventType.INFO, | ||
"Artifact " + artifact + " is excluded from topological sorting (artifact is a transitive dependency, but was not selected for build)." | ||
); | ||
} | ||
|
||
// sort artifacts topologically | ||
List<IDependable> sortedArtifacts = pluginSorter.topologicalSort( | ||
new ArrayList<IDependable>(discoveredArtifacts), | ||
transientHull); | ||
|
||
// replace artifacts | ||
context.removeDiscoveredArtifacts(discoveredArtifacts); | ||
context.addDiscoveredArtifacts(new ArtifactUtil().getConcreteList(sortedArtifacts, IArtifact.class)); | ||
} | ||
} |
Oops, something went wrong.