Skip to content

Commit

Permalink
#9 Repackaged org.dtangler to org.hjug.dtangler
Browse files Browse the repository at this point in the history
  • Loading branch information
jimbethancourt committed Mar 16, 2018
1 parent e999791 commit e018004
Show file tree
Hide file tree
Showing 389 changed files with 1,204 additions and 1,204 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
TravisCI: [![Build Status](https://travis-ci.org/jimbethancourt/dtangler.svg?branch=master)](https://travis-ci.org/jimbethancourt/dtangler)

SonarCloud: [![Quality Gate](https://sonarcloud.io/api/badges/gate?key=org.dtangler%3Adtangler)](https://sonarcloud.io/dashboard?id=org.dtangler%3Adtangler)
SonarCloud: [![Quality Gate](https://sonarcloud.io/api/badges/gate?key=org.hjug.dtangler%3Adtangler)](https://sonarcloud.io/dashboard?id=org.hjug.dtangler%3Adtangler)

[![CodeFactor](https://www.codefactor.io/repository/github/jimbethancourt/dtangler/badge)](https://www.codefactor.io/repository/github/jimbethancourt/dtangler)

Expand Down
56 changes: 28 additions & 28 deletions Rake_incremental_java_build.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@
# An incremental java build systme using Rake.
# See dtangler Rakefile for usage example.
#####################################################################################################

require "ftools"

def env_or_default(env_var, default_value)

require "ftools"

def env_or_default(env_var, default_value)
result = ENV[env_var]
result = default_value if result.nil?
raise "#{env_var} not set" if result.nil?
puts "#{env_var} = #{result}"
puts "#{env_var} = #{result}"
return result
end

# no default, JAVA_HOME must be set
JAVA_HOME = env_or_default("JAVA_HOME", nil)
JAVABIN = "#{JAVA_HOME}/bin"

BUILD_FOLDER = env_or_default("BUILDDIR", "_build")
end

# no default, JAVA_HOME must be set
JAVA_HOME = env_or_default("JAVA_HOME", nil)
JAVABIN = "#{JAVA_HOME}/bin"

BUILD_FOLDER = env_or_default("BUILDDIR", "_build")

# Windowland uses ';' Unixland uses ':', workaround:
PATH_SEPARATOR = (File.exist?('C:\\') ? ';' : ':');
Expand Down Expand Up @@ -46,8 +46,8 @@ def compile_java(src_folder, classes_folder, class_path)
compile_class_path = class_path.join(PATH_SEPARATOR)
cp_arg = ''
cp_arg = "-cp #{compile_class_path}" if(class_path.size > 0)

options = '-Xlint:-unchecked'

options = '-Xlint:-unchecked'

FileList["#{src_folder}/**/*"].exclude("#{src_folder}/**/*.java").each {|source|
dest = source.sub(src_folder,classes_folder)
Expand Down Expand Up @@ -92,7 +92,7 @@ def run_junit(project_name, classpath, successfile, junit_cmd)
test_class_path = classpath.join(PATH_SEPARATOR)

puts "Running junit tests for #{project_name}"


java_cmd_line = "#{JAVABIN}/java -cp #{test_class_path} #{junit_cmd}"
sh java_cmd_line do |ok, res|
if(ok)
Expand Down Expand Up @@ -200,24 +200,24 @@ def create_rake_tasks
# tests compilation unit: 'test' <-- 'classes-test'
#
class Project < Buildable

attr_accessor :prod, :testutil, :test

attr_accessor :prod, :testutil, :test
attr_writer :junit_cmd


def initialize(name)
super(name)
@prod = CompilationUnit.new(@name, 'src')
@testutil = CompilationUnit.new(@name, 'testutil')
@test = CompilationUnit.new(@name, 'test')
@testutil.depends_on(@prod)
@test.depends_on(@testutil)
@test.depends_on(@testutil)
@junit_cmd = build_default_junit_cmd(name)
end

def build_default_junit_cmd(name)
end

def build_default_junit_cmd(name)
project_id = name.split('-')[1]
testclassprefix = "org.dtangler.#{project_id}"
return "-DclasspathSuitePrefix=#{testclassprefix} org.junit.runner.JUnitCore org.dtangler.testcollectorrunner.ClassPathTestSuite"
testclassprefix = "org.hjug.dtangler.#{project_id}"
return "-DclasspathSuitePrefix=#{testclassprefix} org.junit.runner.JUnitCore org.hjug.dtangler.testcollectorrunner.ClassPathTestSuite"
end

def depends_on(other_project)
Expand All @@ -227,7 +227,7 @@ def depends_on(other_project)

def tests_depend_on(other_project)
@test.depends_on(other_project.test)
@testutil.depends_on(other_project.testutil) # utils may build upon others utils
@testutil.depends_on(other_project.testutil) # utils may build upon others utils
end

def jar
Expand All @@ -241,14 +241,14 @@ def test_success
def create_rake_tasks
puts "Creating rake tasks for JavaProject #{@name}"

file test_success => @test.classes_folder do
file test_success => @test.classes_folder do
run_junit(@name, @test.classpath, test_success, @junit_cmd)
end
end

@prod.create_rake_tasks
@testutil.create_rake_tasks
@test.create_rake_tasks
end

end

56 changes: 28 additions & 28 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,24 @@
#####################################################################################################

require "Rake_incremental_java_build.rb"

RELEASE_FOLDER = env_or_default("RELEASEDIR", "_release")




RELEASE_FOLDER = env_or_default("RELEASEDIR", "_release")



#####################################################################################################
# Create a DSM text file with dtangler
#####################################################################################################
def create_dsm(core_jar, input, outputFile)
def create_dsm(core_jar, input, outputFile)
puts "Running dtangler on #{input}"
java_cmd_line = "#{JAVABIN}/java -jar #{core_jar} -input=#{input} > #{outputFile}"
sh java_cmd_line do |ok, res|
if(!ok)
raise "DEPENDENCY CHECK FAILED: There are cycles or illegal dependencies. See #{outputFile}."
end
end
end

end


#####################################################################################################
# Define subprojects and their dependencies
Expand All @@ -61,24 +61,24 @@ end
swingui.depends_on forms
swingui.tests_depend_on uispec4j
swingui.tests_depend_on junit
swingui.tests_depend_on bumblebee
swingui.tests_depend_on bumblebee
swingui.tests_depend_on bumblebee
swingui.tests_depend_on bumblebee

testsuites = Project.new "dtangler-testsuites"
testsuites.test.depends_on core.test
testsuites.test.depends_on ui.test
testsuites.test.depends_on swingui.test
testsuites.tests_depend_on bumblebee
testsuites.junit_cmd = "-Ddtangler-root=. org.junit.runner.JUnitCore org.dtangler.testsuites.docsuites.Dtangler"
testsuites.junit_cmd = "-Ddtangler-root=. org.junit.runner.JUnitCore org.hjug.dtangler.testsuites.docsuites.Dtangler"



# Define the files for release
core_jar = "#{RELEASE_FOLDER}/dtangler-core.jar"
gui_jar = "#{RELEASE_FOLDER}/dtangler-gui.jar"
core_dsm = "#{RELEASE_FOLDER}/dtangler-core-dsm.txt"
gui_dsm = "#{RELEASE_FOLDER}/dtangler-gui-dsm.txt"

documentation_success = "#{BUILD_FOLDER}/documentation_success"
# Define the files for release
core_jar = "#{RELEASE_FOLDER}/dtangler-core.jar"
gui_jar = "#{RELEASE_FOLDER}/dtangler-gui.jar"
core_dsm = "#{RELEASE_FOLDER}/dtangler-core-dsm.txt"
gui_dsm = "#{RELEASE_FOLDER}/dtangler-gui-dsm.txt"

documentation_success = "#{BUILD_FOLDER}/documentation_success"

# Publish rake targets
Buildable.init_rake_tasks
Expand All @@ -90,18 +90,18 @@ end
file gui_jar => [core.test_success, ui.test_success, swingui.test_success] do
create_jar(gui_jar, "dtangler-swingui/MANIFEST.MF", [core.prod.classes_folder, ui.prod.classes_folder, swingui.prod.classes_folder])
end


# Documentation is generated while running the tests in the testsuites-project
task :documentation => [testsuites.test_success]

file core_dsm => [core_jar] do
create_dsm(core_jar, core_jar, core_dsm)
task :documentation => [testsuites.test_success]

file core_dsm => [core_jar] do
create_dsm(core_jar, core_jar, core_dsm)
end

file gui_dsm => [core_jar, gui_jar] do
create_dsm(core_jar, gui_jar, gui_dsm)

file gui_dsm => [core_jar, gui_jar] do
create_dsm(core_jar, gui_jar, gui_dsm)
end

task :default => [core_jar, gui_jar, core_dsm, gui_dsm, :documentation]


2 changes: 1 addition & 1 deletion dtangler-core/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Manifest-Version: 1.0
Main-Class: org.dtangler.core.Main
Main-Class: org.hjug.dtangler.core.Main

Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
//
//The full license text can be read from: http://www.eclipse.org/org/documents/epl-v10.php

package org.dtangler.core;
package org.hjug.dtangler.core;

import org.dtangler.core.analysis.configurableanalyzer.ConfigurableDependencyAnalyzer;
import org.dtangler.core.analysisresult.AnalysisResult;
import org.dtangler.core.configuration.Arguments;
import org.dtangler.core.dependencies.Dependencies;
import org.dtangler.core.dependencies.DependencyGraph;
import org.dtangler.core.dependencyengine.DependencyEngine;
import org.dtangler.core.dependencyengine.DependencyEngineFactory;
import org.dtangler.core.dsmengine.DsmEngine;
import org.dtangler.core.input.ArgumentBuilder;
import org.dtangler.core.textui.DSMWriter;
import org.dtangler.core.textui.ViolationWriter;
import org.dtangler.core.textui.Writer;
import org.hjug.dtangler.core.analysis.configurableanalyzer.ConfigurableDependencyAnalyzer;
import org.hjug.dtangler.core.analysisresult.AnalysisResult;
import org.hjug.dtangler.core.configuration.Arguments;
import org.hjug.dtangler.core.dependencies.Dependencies;
import org.hjug.dtangler.core.dependencies.DependencyGraph;
import org.hjug.dtangler.core.dependencyengine.DependencyEngine;
import org.hjug.dtangler.core.dependencyengine.DependencyEngineFactory;
import org.hjug.dtangler.core.dsmengine.DsmEngine;
import org.hjug.dtangler.core.input.ArgumentBuilder;
import org.hjug.dtangler.core.textui.DSMWriter;
import org.hjug.dtangler.core.textui.ViolationWriter;
import org.hjug.dtangler.core.textui.Writer;

public class CommandLineApp {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
//
//The full license text can be read from: http://www.eclipse.org/org/documents/epl-v10.php

package org.dtangler.core;
package org.hjug.dtangler.core;

import org.dtangler.core.configuration.ParserConstants;
import org.dtangler.core.input.CommandLineParser;
import org.hjug.dtangler.core.configuration.ParserConstants;
import org.hjug.dtangler.core.input.CommandLineParser;

public class HelpText {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
//
//The full license text can be read from: http://www.eclipse.org/org/documents/epl-v10.php

package org.dtangler.core;
package org.hjug.dtangler.core;

import java.io.PrintStream;

import org.dtangler.core.exception.DtException;
import org.dtangler.core.textui.SysoutWriter;
import org.dtangler.core.versioninfo.VersionInfo;
import org.hjug.dtangler.core.exception.DtException;
import org.hjug.dtangler.core.textui.SysoutWriter;
import org.hjug.dtangler.core.versioninfo.VersionInfo;

public class Main {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.dtangler.core;
package org.hjug.dtangler.core;

public class MissingArgumentsException extends RuntimeException {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
//
//The full license text can be read from: http://www.eclipse.org/org/documents/epl-v10.php

package org.dtangler.core.analysis;
package org.hjug.dtangler.core.analysis;

import java.util.Set;

import org.dtangler.core.analysisresult.Violation;
import org.dtangler.core.dependencies.Dependable;
import org.hjug.dtangler.core.analysisresult.Violation;
import org.hjug.dtangler.core.dependencies.Dependable;

public class ChildViolation implements Violation {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
//
//The full license text can be read from: http://www.eclipse.org/org/documents/epl-v10.php

package org.dtangler.core.analysis;
package org.hjug.dtangler.core.analysis;

import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

import org.dtangler.core.analysisresult.Violation;
import org.dtangler.core.dependencies.Dependable;
import org.dtangler.core.dependencies.Dependencies;
import org.dtangler.core.dependencies.Dependency;
import org.hjug.dtangler.core.analysisresult.Violation;
import org.hjug.dtangler.core.dependencies.Dependable;
import org.hjug.dtangler.core.dependencies.Dependencies;
import org.hjug.dtangler.core.dependencies.Dependency;

public class ChildViolationFinder {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
//
//The full license text can be read from: http://www.eclipse.org/org/documents/epl-v10.php

package org.dtangler.core.analysis;
package org.hjug.dtangler.core.analysis;

import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.Map.Entry;

import org.dtangler.core.analysisresult.Violation;
import org.dtangler.core.dependencies.Dependencies;
import org.dtangler.core.dependencies.Dependency;
import org.hjug.dtangler.core.analysisresult.Violation;
import org.hjug.dtangler.core.dependencies.Dependencies;
import org.hjug.dtangler.core.dependencies.Dependency;

public class CompositeAnalyzer extends DependencyAnalyzer {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
//
//The full license text can be read from: http://www.eclipse.org/org/documents/epl-v10.php

package org.dtangler.core.analysis;
package org.hjug.dtangler.core.analysis;

import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

import org.dtangler.core.analysisresult.Violation;
import org.dtangler.core.dependencies.Dependable;
import org.dtangler.core.dependencies.Dependencies;
import org.dtangler.core.dependencies.Dependency;
import org.hjug.dtangler.core.analysisresult.Violation;
import org.hjug.dtangler.core.dependencies.Dependable;
import org.hjug.dtangler.core.dependencies.Dependencies;
import org.hjug.dtangler.core.dependencies.Dependency;

public abstract class DependencyAnalyzer {

Expand Down
Loading

0 comments on commit e018004

Please sign in to comment.