├── .ci-scripts ├── .gitignore ├── test-antenna-documentation-site-tests.sh ├── test-run-all-static-code-analysis.sh ├── test-p2-end2end.sh ├── test-sw360-integration-test.sh ├── test-ExampleTestProject-with-CLI.sh ├── test-ExampleTestProject-with-maven.sh ├── runCLI.sh └── test-ExampleTestProject-with-gradle.sh ├── core ├── runtime │ └── src │ │ ├── test │ │ ├── resources │ │ │ ├── AntennaUtilsTest_testfile.arc │ │ │ ├── test.properties │ │ │ └── workflow.xml │ │ └── java │ │ │ └── org │ │ │ └── eclipse │ │ │ └── sw360 │ │ │ └── antenna │ │ │ └── xml │ │ │ ├── XMLResolverTest.java │ │ │ └── XMLValidatorTest.java │ │ └── main │ │ └── java │ │ └── org │ │ └── eclipse │ │ └── sw360 │ │ └── antenna │ │ └── frontend │ │ ├── AntennaFrontend.java │ │ └── MetaDataStoringProject.java ├── core-workflow-steps │ └── src │ │ ├── test │ │ └── resources │ │ │ ├── CsvAnalyzerTest │ │ │ ├── clearing.json │ │ │ ├── dependencyWithSource.csv │ │ │ ├── dependencyWithMissingSource.csv │ │ │ ├── dependencyWithMultipleHashes.csv │ │ │ ├── test_source.txt │ │ │ ├── dependencyWithMultipleCopyrights.csv │ │ │ └── dependencies.csv │ │ │ ├── SourceZipWriterTest │ │ │ ├── empty.txt │ │ │ └── c3p0-0.9.5.3-sources.jar │ │ │ ├── licenses │ │ │ └── AFL-1.1.txt │ │ │ └── Licenses.csv │ │ └── main │ │ ├── resources │ │ └── styles.css │ │ └── java │ │ └── org │ │ └── eclipse │ │ └── sw360 │ │ └── antenna │ │ ├── analysis │ │ └── filter │ │ │ ├── ProprietaryArtifactFilter.java │ │ │ └── AllowAllArtifactsFilter.java │ │ └── workflow │ │ └── generators │ │ └── HTMLReportUtils.java ├── model │ ├── .gitignore │ └── src │ │ ├── test │ │ ├── resources │ │ │ ├── testPerson.json │ │ │ └── spotbugs-exclude.xml │ │ └── java │ │ │ └── org │ │ │ └── eclipse │ │ │ └── sw360 │ │ │ └── antenna │ │ │ └── model │ │ │ ├── test │ │ │ └── ReportTest.java │ │ │ └── license │ │ │ ├── LicenseComparatorTest.java │ │ │ └── LicenseOperatorTest.java │ │ └── main │ │ └── java │ │ └── org │ │ └── eclipse │ │ └── sw360 │ │ └── antenna │ │ ├── model │ │ ├── artifact │ │ │ ├── IArtifactBuilder.java │ │ │ ├── ArtifactSelector.java │ │ │ ├── facts │ │ │ │ ├── ArtifactUrl.java │ │ │ │ ├── ArtifactCPE.java │ │ │ │ ├── java │ │ │ │ │ ├── ArtifactJar.java │ │ │ │ │ └── ArtifactSourceJar.java │ │ │ │ ├── ArtifactModificationStatus.java │ │ │ │ ├── DeclaredLicenseInformation.java │ │ │ │ ├── ObservedLicenseInformation.java │ │ │ │ ├── ConfiguredLicenseInformation.java │ │ │ │ ├── OverriddenLicenseInformation.java │ │ │ │ ├── ArtifactHomepage.java │ │ │ │ ├── ArtifactSourceUrl.java │ │ │ │ ├── ArtifactReleaseTagURL.java │ │ │ │ ├── ArtifactClearingDocument.java │ │ │ │ ├── ArtifactSourceFile.java │ │ │ │ ├── MissingLicenseReasons.java │ │ │ │ ├── ArtifactChangeStatus.java │ │ │ │ ├── ArtifactIdentifier.java │ │ │ │ └── ArtifactIssues.java │ │ │ ├── IPrettyPrintable.java │ │ │ └── ArtifactFact.java │ │ ├── license │ │ │ └── LicenseOperator.java │ │ ├── reporting │ │ │ ├── ProcessingMessageWithPayload.java │ │ │ └── Report.java │ │ └── util │ │ │ └── ClassCodeSourceLocation.java │ │ └── api │ │ ├── FrontendCommons.java │ │ ├── IAttachable.java │ │ ├── IRulesPackage.java │ │ ├── exceptions │ │ ├── FailCausingException.java │ │ ├── ExecutionException.java │ │ └── ConfigurationException.java │ │ ├── workflow │ │ ├── AbstractOutputHandler.java │ │ ├── AbstractAnalyzer.java │ │ ├── AbstractGenerator.java │ │ └── AbstractProcessor.java │ │ ├── IProject.java │ │ ├── IPolicyEvaluation.java │ │ ├── IArtifactFilter.java │ │ ├── IXMLResolver.java │ │ └── IConfigReader.java ├── frontend-stubs │ ├── cli-frontend-stub │ │ └── src │ │ │ └── test │ │ │ └── resources │ │ │ └── workflow.xml │ ├── gradle-frontend-stub │ │ └── src │ │ │ └── main │ │ │ └── java │ │ │ └── org │ │ │ └── eclipse │ │ │ └── sw360 │ │ │ └── antenna │ │ │ └── frontend │ │ │ └── stub │ │ │ └── gradle │ │ │ ├── AntennaGradlePlugin.java │ │ │ └── AntennaExtension.java │ └── pom.xml └── frontend-stubs-testing │ └── src │ └── main │ └── java │ └── org │ └── eclipse │ └── sw360 │ └── antenna │ └── frontend │ └── testing │ └── testProjects │ └── NonExecutableTestProject.java ├── modules ├── sw360 │ ├── src │ │ └── integrationtest │ │ │ ├── resources │ │ │ ├── postgres │ │ │ │ └── .gitignore │ │ │ └── couchdb │ │ │ │ └── data │ │ │ │ ├── _users.couch │ │ │ │ ├── sw360db.couch │ │ │ │ ├── sw360vm.couch │ │ │ │ ├── _replicator.couch │ │ │ │ ├── sw360users.couch │ │ │ │ ├── sw360attachments.couch │ │ │ │ ├── sw360fossologykeys.couch │ │ │ │ ├── .sw360db_design │ │ │ │ └── mrview │ │ │ │ │ ├── 129ec6bbb91373e3e947f79f55c34a07.view │ │ │ │ │ ├── 1c9257bd1f3a0f431dbeb02f05c14a9c.view │ │ │ │ │ └── bc879294dadcf39a2869674406496c9a.view │ │ │ │ └── .sw360users_design │ │ │ │ └── mrview │ │ │ │ └── 3aea2376b78a4aaf3e421ee9d2cf23b6.view │ │ │ └── java │ │ │ └── org │ │ │ └── eclipse │ │ │ └── sw360 │ │ │ └── antenna │ │ │ └── sw360 │ │ │ └── integrationtesting │ │ │ └── IntegrationTest.java │ ├── sw360-client │ │ └── src │ │ │ ├── test │ │ │ ├── resources │ │ │ │ ├── mockito-extensions │ │ │ │ │ └── org.mockito.plugins.MockMaker │ │ │ │ └── __files │ │ │ │ │ ├── multi_status_success.json │ │ │ │ │ ├── multi_status_failed.json │ │ │ │ │ ├── license.json │ │ │ │ │ ├── all_components.json │ │ │ │ │ └── release.json │ │ │ └── java │ │ │ │ └── org │ │ │ │ └── eclipse │ │ │ │ └── sw360 │ │ │ │ └── antenna │ │ │ │ └── sw360 │ │ │ │ └── client │ │ │ │ └── rest │ │ │ │ └── resource │ │ │ │ └── attachments │ │ │ │ ├── SW360AttachmentTypeTest.java │ │ │ │ └── SW360AttachmentTest.java │ │ │ └── main │ │ │ └── java │ │ │ └── org │ │ │ └── eclipse │ │ │ └── sw360 │ │ │ └── antenna │ │ │ └── sw360 │ │ │ └── client │ │ │ ├── rest │ │ │ └── resource │ │ │ │ ├── releases │ │ │ │ ├── SW360ClearingState.java │ │ │ │ └── SW360ReleaseList.java │ │ │ │ ├── Embedded.java │ │ │ │ ├── SW360SimpleHalResource.java │ │ │ │ ├── licenses │ │ │ │ └── SW360LicenseList.java │ │ │ │ ├── projects │ │ │ │ ├── SW360ProjectList.java │ │ │ │ └── SW360ProjectType.java │ │ │ │ ├── attachments │ │ │ │ └── SW360AttachmentCheckStatus.java │ │ │ │ ├── SW360Visibility.java │ │ │ │ └── Self.java │ │ │ ├── utils │ │ │ └── SW360ClientException.java │ │ │ └── adapter │ │ │ └── SW360ProjectAdapterUtils.java │ ├── README.md │ └── sw360-workflow │ │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── eclipse │ │ └── sw360 │ │ └── antenna │ │ └── sw360 │ │ └── utils │ │ └── ArtifactToAttachmentUtils.java ├── attribution-document │ ├── attribution-document-core │ │ └── src │ │ │ ├── test │ │ │ └── resources │ │ │ │ ├── META-INF │ │ │ │ └── services │ │ │ │ │ └── org.eclipse.sw360.antenna.attribution.document.core.TemplateBundle │ │ │ │ ├── templates │ │ │ │ ├── test.pdf │ │ │ │ ├── antenna-demo_template_back.pdf │ │ │ │ ├── antenna-demo_template_title.pdf │ │ │ │ ├── antenna-demo_template_content.pdf │ │ │ │ └── antenna-demo_template_copyright.pdf │ │ │ │ └── logback-test.xml │ │ │ └── main │ │ │ └── java │ │ │ └── org │ │ │ └── eclipse │ │ │ └── sw360 │ │ │ └── antenna │ │ │ └── attribution │ │ │ └── document │ │ │ └── core │ │ │ └── TextFlowInteraction.java │ ├── attribution-document-demo-bundle │ │ └── src │ │ │ └── main │ │ │ ├── odt │ │ │ └── 2019-template-source.odt │ │ │ └── resources │ │ │ └── templates │ │ │ ├── antenna-demo_template_back.pdf │ │ │ ├── antenna-demo_template_content.pdf │ │ │ ├── antenna-demo_template_title.pdf │ │ │ └── antenna-demo_template_copyright.pdf │ ├── attribution-document-basic-bundle │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ └── templates │ │ │ ├── basic_back.pdf │ │ │ ├── basic_content.pdf │ │ │ ├── basic_title.pdf │ │ │ ├── basic_copyright.pdf │ │ │ └── basic-pdf-template.odt │ ├── attribution-document-generator │ │ └── src │ │ │ └── test │ │ │ └── resources │ │ │ └── logback-test.xml │ └── pom.xml ├── ort │ └── src │ │ └── test │ │ └── resources │ │ └── spotbugs-exclude.xml ├── policy │ ├── engine │ │ └── src │ │ │ ├── main │ │ │ └── java │ │ │ │ └── org │ │ │ │ └── eclipse │ │ │ │ └── sw360 │ │ │ │ └── antenna │ │ │ │ └── policy │ │ │ │ └── engine │ │ │ │ ├── RuleSeverity.java │ │ │ │ ├── Ruleset.java │ │ │ │ ├── model │ │ │ │ ├── LicenseData.java │ │ │ │ └── LicenseState.java │ │ │ │ ├── SingleArtifactRule.java │ │ │ │ ├── RuleExecutor.java │ │ │ │ ├── CompareArtifactRule.java │ │ │ │ └── Rule.java │ │ │ └── test │ │ │ └── java │ │ │ └── org │ │ │ └── eclipse │ │ │ └── sw360 │ │ │ └── antenna │ │ │ └── policy │ │ │ ├── engine │ │ │ └── testdata │ │ │ │ ├── TestRuleset.java │ │ │ │ ├── FailingRuleset.java │ │ │ │ └── TestRule.java │ │ │ └── workflow │ │ │ └── processors │ │ │ └── testdata │ │ │ ├── TestCompareRuleset.java │ │ │ └── TestSingleRuleset.java │ ├── basic-policies │ │ └── src │ │ │ └── test │ │ │ ├── java │ │ │ └── org │ │ │ │ └── eclipse │ │ │ │ └── sw360 │ │ │ │ └── antenna │ │ │ │ └── policies │ │ │ │ └── RunCucumberTest.java │ │ │ └── resources │ │ │ └── features │ │ │ └── SWHSourceIdKnownRule.feature │ ├── engine-testing │ │ └── src │ │ │ ├── test │ │ │ ├── java │ │ │ │ └── org │ │ │ │ │ └── eclipse │ │ │ │ │ └── sw360 │ │ │ │ │ └── antenna │ │ │ │ │ └── policy │ │ │ │ │ └── testing │ │ │ │ │ ├── RunCucumberTest.java │ │ │ │ │ └── rules │ │ │ │ │ └── TestRuleset.java │ │ │ └── resources │ │ │ │ └── features │ │ │ │ └── T2_CheckDifferentCoordinates.feature │ │ │ └── main │ │ │ └── java │ │ │ └── org │ │ │ └── eclipse │ │ │ └── sw360 │ │ │ └── antenna │ │ │ └── policy │ │ │ └── testing │ │ │ └── ScenarioState.java │ └── pom.xml └── maven │ └── src │ └── main │ └── java │ └── org │ └── eclipse │ └── sw360 │ └── antenna │ └── maven │ ├── ClassifierInformation.java │ └── WrappedDependencyNodes.java ├── http-support └── src │ ├── test │ └── resources │ │ └── mockito-extensions │ │ └── org.mockito.plugins.MockMaker │ └── main │ └── java │ └── org │ └── eclipse │ └── sw360 │ └── antenna │ └── http │ └── HttpClientFactory.java ├── assembly ├── cli │ └── src │ │ ├── site │ │ └── markdown │ │ │ └── usage.md │ │ ├── test │ │ └── resources │ │ │ ├── dummy_antennaconf.xml │ │ │ └── dummy_workflow.xml │ │ └── main │ │ └── resources │ │ └── log4j2.xml ├── gradle-plugin │ ├── .gitignore │ └── src │ │ ├── test │ │ └── resources │ │ │ └── antennaTestVariable.properties │ │ └── main │ │ └── java │ │ └── org │ │ └── eclipse │ │ └── sw360 │ │ └── antenna │ │ └── frontend │ │ └── gradle │ │ ├── AntennaGradleTask.java │ │ └── GradlePlugin.java ├── compliance-tool │ └── src │ │ ├── test │ │ ├── resources │ │ │ ├── test-source.txt │ │ │ ├── compliancetool-exporter.properties │ │ │ ├── config-with-proxy.properties │ │ │ └── compliancetool-updater.properties │ │ └── java │ │ │ └── org │ │ │ └── eclipse │ │ │ └── sw360 │ │ │ └── antenna │ │ │ └── frontend │ │ │ └── compliancetool │ │ │ └── sw360 │ │ │ └── reporter │ │ │ └── ReporterOutputFactoryTest.java │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── eclipse │ │ │ │ └── sw360 │ │ │ │ └── antenna │ │ │ │ └── frontend │ │ │ │ └── compliancetool │ │ │ │ └── sw360 │ │ │ │ └── reporter │ │ │ │ ├── ReporterOutput.java │ │ │ │ └── ReporterOutputFactory.java │ │ └── resources │ │ │ └── log4j2.xml │ │ └── site │ │ └── markdown │ │ └── exporter.md ├── maven-plugin │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── eclipse │ │ │ └── sw360 │ │ │ └── antenna │ │ │ └── frontend │ │ │ └── mojo │ │ │ └── AntennaMojoFrontend.java │ │ └── resources │ │ └── log4j2.properties ├── README.md └── pom.xml ├── antenna-documentation ├── src │ └── site │ │ ├── resources │ │ └── images │ │ │ ├── logo.png │ │ │ └── antenna-process.png │ │ └── markdown │ │ ├── outputHandlers │ │ └── outputHandlers.md │ │ ├── how-to-use.md.vm │ │ ├── processors │ │ ├── license-resolver.md │ │ ├── ort-downloader.md │ │ ├── manifest-resolver.md │ │ ├── coordinates-validator.md │ │ ├── source-validator.md │ │ └── match-state-validator.md │ │ ├── generators │ │ ├── generators.md │ │ ├── source-zip-generator-step.md │ │ ├── cyclonedx-generator-step.md │ │ └── csv-generator-step.md │ │ ├── how-to-configure.md.vm │ │ └── analyzers │ │ ├── analyzers.md │ │ └── mvn-dep-tree-analyzer-step.md ├── README.md ├── scripts │ ├── execute_github_site_maven_plugin.sh │ └── main.sh └── Jenkinsfile.eclipse.documentation ├── example-projects ├── example-project │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── example.properties │ ├── src │ │ ├── example-policies │ │ │ ├── policies.properties │ │ │ └── policies.xml │ │ ├── dependencies.csv │ │ └── main │ │ │ └── java │ │ │ └── org │ │ │ └── eclipse │ │ │ └── sw360 │ │ │ └── antenna │ │ │ └── test │ │ │ └── example │ │ │ └── App.java │ └── build.gradle ├── p2-example-tycho-project │ ├── dependency_project │ │ ├── artifacts.jar │ │ ├── content.jar │ │ ├── content.xml.xz │ │ ├── artifacts.xml.xz │ │ ├── p2.index │ │ ├── plugins │ │ │ └── some_bundle_0.0.1.201904011221.jar │ │ └── features │ │ │ └── some_feature_0.0.1.201904011221.jar │ ├── dependencies.csv │ ├── bundles │ │ └── some_tycho_bundle │ │ │ ├── META-INF │ │ │ └── MANIFEST.MF │ │ │ ├── build.properties │ │ │ ├── src │ │ │ └── main │ │ │ │ └── java │ │ │ │ └── org │ │ │ │ └── eclipse │ │ │ │ └── sw360 │ │ │ │ └── antenna │ │ │ │ └── newpackage │ │ │ │ └── SomeClass.java │ │ │ └── pom.xml │ ├── feature │ │ ├── build.properties │ │ └── feature.properties │ ├── repository │ │ └── category.xml │ ├── documentation.md │ └── antennaconf.xml ├── p2-example-project │ ├── src │ │ ├── additional_p2_resources │ │ │ ├── content.jar │ │ │ ├── artifacts.jar │ │ │ ├── content.xml.xz │ │ │ ├── artifacts.xml.xz │ │ │ ├── p2.index │ │ │ ├── plugins │ │ │ │ └── some_bundle_0.0.1.201902181544.jar │ │ │ └── features │ │ │ │ └── some_feature_0.0.1.201902181544.jar │ │ ├── workflow.xml │ │ ├── main │ │ │ └── java │ │ │ │ └── org │ │ │ │ └── eclipse │ │ │ │ └── sw360 │ │ │ │ └── antenna │ │ │ │ └── test │ │ │ │ └── example │ │ │ │ └── App.java │ │ └── antennaconf.xml │ └── build.gradle ├── mvn-test-project │ ├── src │ │ ├── dependencies.csv │ │ └── main │ │ │ └── java │ │ │ └── org │ │ │ └── eclipse │ │ │ └── sw360 │ │ │ └── antenna │ │ │ └── test │ │ │ └── mvn │ │ │ └── App.java │ ├── local-test-repo │ │ └── org │ │ │ └── eclipse │ │ │ └── sw360 │ │ │ └── antenna │ │ │ └── example-dependency │ │ │ └── 1.0 │ │ │ ├── example-dependency-1.0.jar │ │ │ └── example-dependency-1.0.pom │ └── build.gradle ├── minimal-test-project │ └── src │ │ └── workflow.xml └── basic-test-project │ └── src │ └── antennaconf2.xml ├── .gitignore ├── .dockerignore ├── .github ├── ISSUE_TEMPLATE │ ├── feature_template.md │ ├── bug_template.md │ └── infrastructure_template.md └── pull_request_template.md ├── NOTICE ├── commit_version.sh ├── antenna-license-provider └── licenses.xml └── Dockerfile /.ci-scripts/.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | .vagrant -------------------------------------------------------------------------------- /core/runtime/src/test/resources/AntennaUtilsTest_testfile.arc: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/core-workflow-steps/src/test/resources/CsvAnalyzerTest/clearing.json: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/core-workflow-steps/src/test/resources/SourceZipWriterTest/empty.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modules/sw360/src/integrationtest/resources/postgres/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | -------------------------------------------------------------------------------- /core/core-workflow-steps/src/test/resources/licenses/AFL-1.1.txt: -------------------------------------------------------------------------------- 1 | Should be license text of AFL-1.1. -------------------------------------------------------------------------------- /core/model/.gitignore: -------------------------------------------------------------------------------- 1 | /.checkstyle 2 | /.classpath 3 | /.project 4 | /.settings 5 | /target 6 | -------------------------------------------------------------------------------- /http-support/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker: -------------------------------------------------------------------------------- 1 | mock-maker-inline -------------------------------------------------------------------------------- /modules/sw360/sw360-client/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker: -------------------------------------------------------------------------------- 1 | mock-maker-inline -------------------------------------------------------------------------------- /core/model/src/test/resources/testPerson.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "test", 3 | "age": 42, 4 | "additional": false 5 | } -------------------------------------------------------------------------------- /assembly/cli/src/site/markdown/usage.md: -------------------------------------------------------------------------------- 1 | # Usage 2 | 3 | A run script is provided for ease of use. You need to fill in a few parameters before using it. -------------------------------------------------------------------------------- /antenna-documentation/src/site/resources/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/antenna-documentation/src/site/resources/images/logo.png -------------------------------------------------------------------------------- /example-projects/example-project/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/example-projects/example-project/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /antenna-documentation/src/site/resources/images/antenna-process.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/antenna-documentation/src/site/resources/images/antenna-process.png -------------------------------------------------------------------------------- /modules/sw360/src/integrationtest/resources/couchdb/data/_users.couch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/modules/sw360/src/integrationtest/resources/couchdb/data/_users.couch -------------------------------------------------------------------------------- /core/core-workflow-steps/src/test/resources/CsvAnalyzerTest/dependencyWithSource.csv: -------------------------------------------------------------------------------- 1 | Artifact Id,Group Id,Version,Coordinate Type,File Name 2 | test,test,1.4,maven,CsvAnalyzerTest/test_source.txt 3 | -------------------------------------------------------------------------------- /modules/sw360/src/integrationtest/resources/couchdb/data/sw360db.couch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/modules/sw360/src/integrationtest/resources/couchdb/data/sw360db.couch -------------------------------------------------------------------------------- /modules/sw360/src/integrationtest/resources/couchdb/data/sw360vm.couch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/modules/sw360/src/integrationtest/resources/couchdb/data/sw360vm.couch -------------------------------------------------------------------------------- /example-projects/p2-example-tycho-project/dependency_project/artifacts.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/example-projects/p2-example-tycho-project/dependency_project/artifacts.jar -------------------------------------------------------------------------------- /example-projects/p2-example-tycho-project/dependency_project/content.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/example-projects/p2-example-tycho-project/dependency_project/content.jar -------------------------------------------------------------------------------- /modules/sw360/src/integrationtest/resources/couchdb/data/_replicator.couch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/modules/sw360/src/integrationtest/resources/couchdb/data/_replicator.couch -------------------------------------------------------------------------------- /modules/sw360/src/integrationtest/resources/couchdb/data/sw360users.couch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/modules/sw360/src/integrationtest/resources/couchdb/data/sw360users.couch -------------------------------------------------------------------------------- /example-projects/p2-example-project/src/additional_p2_resources/content.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/example-projects/p2-example-project/src/additional_p2_resources/content.jar -------------------------------------------------------------------------------- /example-projects/p2-example-tycho-project/dependency_project/content.xml.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/example-projects/p2-example-tycho-project/dependency_project/content.xml.xz -------------------------------------------------------------------------------- /core/core-workflow-steps/src/test/resources/CsvAnalyzerTest/dependencyWithMissingSource.csv: -------------------------------------------------------------------------------- 1 | Artifact Id,Group Id,Version,Coordinate Type,File Name 2 | test,test,1.4,maven,CsvAnalyzerTest/test_source_missing.txt 3 | -------------------------------------------------------------------------------- /example-projects/p2-example-project/src/additional_p2_resources/artifacts.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/example-projects/p2-example-project/src/additional_p2_resources/artifacts.jar -------------------------------------------------------------------------------- /example-projects/p2-example-project/src/additional_p2_resources/content.xml.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/example-projects/p2-example-project/src/additional_p2_resources/content.xml.xz -------------------------------------------------------------------------------- /example-projects/p2-example-tycho-project/dependency_project/artifacts.xml.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/example-projects/p2-example-tycho-project/dependency_project/artifacts.xml.xz -------------------------------------------------------------------------------- /modules/sw360/src/integrationtest/resources/couchdb/data/sw360attachments.couch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/modules/sw360/src/integrationtest/resources/couchdb/data/sw360attachments.couch -------------------------------------------------------------------------------- /example-projects/p2-example-project/src/additional_p2_resources/artifacts.xml.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/example-projects/p2-example-project/src/additional_p2_resources/artifacts.xml.xz -------------------------------------------------------------------------------- /modules/sw360/src/integrationtest/resources/couchdb/data/sw360fossologykeys.couch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/modules/sw360/src/integrationtest/resources/couchdb/data/sw360fossologykeys.couch -------------------------------------------------------------------------------- /example-projects/mvn-test-project/src/dependencies.csv: -------------------------------------------------------------------------------- 1 | Artifact Id,Group Id,Version,License Short Name,License Long Name,File Name 2 | commons-csv,org.apache.commons,1.4,Apache-2.0,Apache Software License 2.0,commons-csv.jar 3 | -------------------------------------------------------------------------------- /modules/attribution-document/attribution-document-core/src/test/resources/META-INF/services/org.eclipse.sw360.antenna.attribution.document.core.TemplateBundle: -------------------------------------------------------------------------------- 1 | org.eclipse.sw360.antenna.attribution.document.core.MockTemplateBundle -------------------------------------------------------------------------------- /example-projects/p2-example-tycho-project/dependencies.csv: -------------------------------------------------------------------------------- 1 | Artifact Id,Group Id,Version,License Short Name,License Long Name,File Name 2 | commons-csv,org.apache.commons,1.4,Apache-2.0,Apache Software License 2.0,commons-csv.jar 3 | -------------------------------------------------------------------------------- /core/core-workflow-steps/src/test/resources/SourceZipWriterTest/c3p0-0.9.5.3-sources.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/core/core-workflow-steps/src/test/resources/SourceZipWriterTest/c3p0-0.9.5.3-sources.jar -------------------------------------------------------------------------------- /modules/sw360/sw360-client/src/test/resources/__files/multi_status_success.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "resourceId": "res-1", 4 | "status": 200 5 | }, 6 | { 7 | "resourceId": "res-2", 8 | "status": 200 9 | } 10 | ] 11 | -------------------------------------------------------------------------------- /modules/attribution-document/attribution-document-core/src/test/resources/templates/test.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/modules/attribution-document/attribution-document-core/src/test/resources/templates/test.pdf -------------------------------------------------------------------------------- /example-projects/p2-example-tycho-project/dependency_project/p2.index: -------------------------------------------------------------------------------- 1 | #Mon Apr 01 14:21:47 CEST 2019 2 | version=1 3 | metadata.repository.factory.order=content.xml.xz,content.xml,\! 4 | artifact.repository.factory.order=artifacts.xml.xz,artifacts.xml,\! 5 | -------------------------------------------------------------------------------- /modules/attribution-document/attribution-document-demo-bundle/src/main/odt/2019-template-source.odt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/modules/attribution-document/attribution-document-demo-bundle/src/main/odt/2019-template-source.odt -------------------------------------------------------------------------------- /example-projects/p2-example-project/src/additional_p2_resources/p2.index: -------------------------------------------------------------------------------- 1 | #Mon Feb 18 16:44:51 CET 2019 2 | version=1 3 | metadata.repository.factory.order=content.xml.xz,content.xml,\! 4 | artifact.repository.factory.order=artifacts.xml.xz,artifacts.xml,\! 5 | -------------------------------------------------------------------------------- /example-projects/p2-example-tycho-project/dependency_project/plugins/some_bundle_0.0.1.201904011221.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/example-projects/p2-example-tycho-project/dependency_project/plugins/some_bundle_0.0.1.201904011221.jar -------------------------------------------------------------------------------- /example-projects/p2-example-project/src/additional_p2_resources/plugins/some_bundle_0.0.1.201902181544.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/example-projects/p2-example-project/src/additional_p2_resources/plugins/some_bundle_0.0.1.201902181544.jar -------------------------------------------------------------------------------- /example-projects/p2-example-tycho-project/dependency_project/features/some_feature_0.0.1.201904011221.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/example-projects/p2-example-tycho-project/dependency_project/features/some_feature_0.0.1.201904011221.jar -------------------------------------------------------------------------------- /modules/attribution-document/attribution-document-basic-bundle/src/main/resources/templates/basic_back.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/modules/attribution-document/attribution-document-basic-bundle/src/main/resources/templates/basic_back.pdf -------------------------------------------------------------------------------- /example-projects/p2-example-project/src/additional_p2_resources/features/some_feature_0.0.1.201902181544.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/example-projects/p2-example-project/src/additional_p2_resources/features/some_feature_0.0.1.201902181544.jar -------------------------------------------------------------------------------- /modules/attribution-document/attribution-document-basic-bundle/src/main/resources/templates/basic_content.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/modules/attribution-document/attribution-document-basic-bundle/src/main/resources/templates/basic_content.pdf -------------------------------------------------------------------------------- /modules/attribution-document/attribution-document-basic-bundle/src/main/resources/templates/basic_title.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/modules/attribution-document/attribution-document-basic-bundle/src/main/resources/templates/basic_title.pdf -------------------------------------------------------------------------------- /modules/attribution-document/attribution-document-basic-bundle/src/main/resources/templates/basic_copyright.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/modules/attribution-document/attribution-document-basic-bundle/src/main/resources/templates/basic_copyright.pdf -------------------------------------------------------------------------------- /modules/attribution-document/attribution-document-basic-bundle/src/main/resources/templates/basic-pdf-template.odt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/modules/attribution-document/attribution-document-basic-bundle/src/main/resources/templates/basic-pdf-template.odt -------------------------------------------------------------------------------- /modules/attribution-document/attribution-document-core/src/test/resources/templates/antenna-demo_template_back.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/modules/attribution-document/attribution-document-core/src/test/resources/templates/antenna-demo_template_back.pdf -------------------------------------------------------------------------------- /modules/attribution-document/attribution-document-core/src/test/resources/templates/antenna-demo_template_title.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/modules/attribution-document/attribution-document-core/src/test/resources/templates/antenna-demo_template_title.pdf -------------------------------------------------------------------------------- /example-projects/example-project/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /modules/attribution-document/attribution-document-core/src/test/resources/templates/antenna-demo_template_content.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/modules/attribution-document/attribution-document-core/src/test/resources/templates/antenna-demo_template_content.pdf -------------------------------------------------------------------------------- /modules/attribution-document/attribution-document-core/src/test/resources/templates/antenna-demo_template_copyright.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/modules/attribution-document/attribution-document-core/src/test/resources/templates/antenna-demo_template_copyright.pdf -------------------------------------------------------------------------------- /modules/sw360/src/integrationtest/resources/couchdb/data/.sw360db_design/mrview/129ec6bbb91373e3e947f79f55c34a07.view: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/modules/sw360/src/integrationtest/resources/couchdb/data/.sw360db_design/mrview/129ec6bbb91373e3e947f79f55c34a07.view -------------------------------------------------------------------------------- /modules/sw360/src/integrationtest/resources/couchdb/data/.sw360db_design/mrview/1c9257bd1f3a0f431dbeb02f05c14a9c.view: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/modules/sw360/src/integrationtest/resources/couchdb/data/.sw360db_design/mrview/1c9257bd1f3a0f431dbeb02f05c14a9c.view -------------------------------------------------------------------------------- /modules/sw360/src/integrationtest/resources/couchdb/data/.sw360db_design/mrview/bc879294dadcf39a2869674406496c9a.view: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/modules/sw360/src/integrationtest/resources/couchdb/data/.sw360db_design/mrview/bc879294dadcf39a2869674406496c9a.view -------------------------------------------------------------------------------- /modules/attribution-document/attribution-document-demo-bundle/src/main/resources/templates/antenna-demo_template_back.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/modules/attribution-document/attribution-document-demo-bundle/src/main/resources/templates/antenna-demo_template_back.pdf -------------------------------------------------------------------------------- /modules/sw360/src/integrationtest/resources/couchdb/data/.sw360users_design/mrview/3aea2376b78a4aaf3e421ee9d2cf23b6.view: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/modules/sw360/src/integrationtest/resources/couchdb/data/.sw360users_design/mrview/3aea2376b78a4aaf3e421ee9d2cf23b6.view -------------------------------------------------------------------------------- /modules/attribution-document/attribution-document-demo-bundle/src/main/resources/templates/antenna-demo_template_content.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/modules/attribution-document/attribution-document-demo-bundle/src/main/resources/templates/antenna-demo_template_content.pdf -------------------------------------------------------------------------------- /modules/attribution-document/attribution-document-demo-bundle/src/main/resources/templates/antenna-demo_template_title.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/modules/attribution-document/attribution-document-demo-bundle/src/main/resources/templates/antenna-demo_template_title.pdf -------------------------------------------------------------------------------- /example-projects/mvn-test-project/local-test-repo/org/eclipse/sw360/antenna/example-dependency/1.0/example-dependency-1.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/example-projects/mvn-test-project/local-test-repo/org/eclipse/sw360/antenna/example-dependency/1.0/example-dependency-1.0.jar -------------------------------------------------------------------------------- /modules/attribution-document/attribution-document-demo-bundle/src/main/resources/templates/antenna-demo_template_copyright.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-archived/antenna/HEAD/modules/attribution-document/attribution-document-demo-bundle/src/main/resources/templates/antenna-demo_template_copyright.pdf -------------------------------------------------------------------------------- /core/core-workflow-steps/src/test/resources/CsvAnalyzerTest/dependencyWithMultipleHashes.csv: -------------------------------------------------------------------------------- 1 | Artifact Id,Group Id,Version,Coordinate Type,Hash 2 | commons-csv,org.apache.commons,1.4,mvn,620580a88953cbcf4528459e485054e7c27c0889 3 | commons-csv,org.apache.commons,1.4,mvn,b0060ed8397bfec39b397807f63e778618f324ce 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .classpath 2 | .project 3 | .settings/ 4 | /eclipse 5 | target 6 | target-checkstyle/ 7 | .checkstyle 8 | .idea/ 9 | *.iml 10 | .gitreview 11 | velocity.log 12 | antenna-testing/antenna-sw360-integration-testing/src/test/resources/postgres/sw360pgdb.sql 13 | .gradle 14 | build 15 | *.orig 16 | .attach_pid* -------------------------------------------------------------------------------- /modules/sw360/sw360-client/src/test/resources/__files/multi_status_failed.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "resourceId": "res-err-1", 4 | "status": 400 5 | }, 6 | { 7 | "resourceId": "res-success", 8 | "status": 200 9 | }, 10 | { 11 | "resourceId": "res-err-2", 12 | "status": 500 13 | } 14 | ] 15 | -------------------------------------------------------------------------------- /antenna-documentation/README.md: -------------------------------------------------------------------------------- 1 | # Antenna Documentation 2 | 3 | The Antenna documentation is generated with the maven site plugin. 4 | 5 | ## Build and Test 6 | To build the site execute inside this directory: 7 | 8 | ~~~bash 9 | mvn clean site site:run 10 | ~~~ 11 | 12 | You can then access the documentation at -------------------------------------------------------------------------------- /antenna-documentation/src/site/markdown/outputHandlers/outputHandlers.md: -------------------------------------------------------------------------------- 1 | ## Output Handlers 2 | 3 | The fourth phase of the workflow pipeline continues with output handlers. 4 | Those can perform additional tasks on the output generated by the generators. 5 | Antenna already provides the following output handler: 6 | 7 | - [Add To Archive Handler](./add-to-archive-handler.html) 8 | -------------------------------------------------------------------------------- /assembly/gradle-plugin/.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | /build/ 3 | /out/ 4 | 5 | # Ignore Gradle GUI config 6 | gradle-app.setting 7 | 8 | # Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) 9 | !gradle-wrapper.jar 10 | 11 | # Cache of project 12 | .gradletasknamecache 13 | 14 | # # Work around https://youtrack.jetbrains.com/issue/IDEA-116898 15 | # gradle/wrapper/gradle-wrapper.properties -------------------------------------------------------------------------------- /assembly/compliance-tool/src/test/resources/test-source.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) Bosch.IO GmbH 2020. 2 | # 3 | # All rights reserved. This program and the accompanying materials 4 | # are made available under the terms of the Eclipse Public License v2.0 5 | # which accompanies this distribution, and is available at 6 | # http://www.eclipse.org/legal/epl-v20.html 7 | # 8 | # SPDX-License-Identifier: EPL-2.0 9 | This is a test file -------------------------------------------------------------------------------- /core/core-workflow-steps/src/test/resources/CsvAnalyzerTest/test_source.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) Bosch.IO GmbH 2020. 2 | # 3 | # All rights reserved. This program and the accompanying materials 4 | # are made available under the terms of the Eclipse Public License v2.0 5 | # which accompanies this distribution, and is available at 6 | # http://www.eclipse.org/legal/epl-v20.html 7 | # 8 | # SPDX-License-Identifier: EPL-2.0 9 | This is a test file. -------------------------------------------------------------------------------- /example-projects/p2-example-tycho-project/bundles/some_tycho_bundle/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: Some Bundle 4 | Bundle-SymbolicName: some_tycho_bundle;singleton:=true 5 | Bundle-Version: 0.0.1.qualifier 6 | Bundle-Vendor: Some Company 7 | Bundle-RequiredExecutionEnvironment: JavaSE-1.8 8 | Require-Bundle: some_bundle 9 | Export-Package: org.eclipse.sw360.antenna.newpackage 10 | -------------------------------------------------------------------------------- /modules/sw360/sw360-client/src/test/resources/__files/license.json: -------------------------------------------------------------------------------- 1 | { 2 | "externalIds": { 3 | "SPDX-License-Identifier": "0TST" 4 | }, 5 | "text": "Copyright (C) 2020 Bosch.IO GmbH \nThis is a demo license text.", 6 | "checked": true, 7 | "shortName": "0TST", 8 | "fullName": "Test License", 9 | "_links": { 10 | "self": { 11 | "href": "https://sw360.test.com/resource/api/licenses/0TST" 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | # Copyright (c) Bosch.IO GmbH 2020. 2 | # 3 | # All rights reserved. This program and the accompanying materials 4 | # are made available under the terms of the Eclipse Public License v2.0 5 | # which accompanies this distribution, and is available at 6 | # http://www.eclipse.org/legal/epl-v20.html 7 | # 8 | # SPDX-License-Identifier: EPL-2.0 9 | 10 | # ignore folders 11 | **/target 12 | .idea 13 | .github 14 | .ci-scripts 15 | -------------------------------------------------------------------------------- /core/runtime/src/test/resources/test.properties: -------------------------------------------------------------------------------- 1 | # Copyright (c) Bosch Software Innovations GmbH 2016. 2 | # 3 | # All rights reserved. This program and the accompanying materials 4 | # are made available under the terms of the Eclipse Public License v2.0 5 | # which accompanies this distribution, and is available at 6 | # http://www.eclipse.org/legal/epl-v20.html 7 | # 8 | # SPDX-License-Identifier: EPL-2.0 9 | testResourcesDir=${project.build.testOutputDirectory}. -------------------------------------------------------------------------------- /antenna-documentation/src/site/markdown/how-to-use.md.vm: -------------------------------------------------------------------------------- 1 | # How to use ${docNameCap} 2 | 3 | ${docNameCap} provides several different front-ends, each of which allows you to 4 | use ${docNameCap} in a different way. 5 | 6 | Documentation on how to use each front-end can be found here: 7 | 8 | - [Command Line Interface](./${docName}-cli/index.html) 9 | - [Gradle Plugin](./${docName}-gradle-plugin/index.html) 10 | - [Maven Plugin](./${docName}-maven-plugin/index.html) 11 | -------------------------------------------------------------------------------- /example-projects/example-project/example.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) Bosch Software Innovations GmbH 2020. 3 | # 4 | # All rights reserved. This program and the accompanying materials 5 | # are made available under the terms of the Eclipse Public License v1.0 6 | # which accompanies this distribution, and is available at 7 | # http://www.eclipse.org/legal/epl-v20.html 8 | # 9 | # SPDX-License-Identifier: EPL-2.0 10 | # 11 | dummy_name=Mustermann 12 | dummy_passwort=password12345 -------------------------------------------------------------------------------- /antenna-documentation/src/site/markdown/processors/license-resolver.md: -------------------------------------------------------------------------------- 1 | ## License resolver 2 | The License resolver adds for each artifact the `ConfiguredLicenseInformation`, 3 | if this is configured in the config.xml. 4 | 5 | 6 | ## HowTo use 7 | Add the following step into the `` section of your workflow.xml 8 | 9 | ```xml 10 | 11 | License Resolver 12 | org.eclipse.sw360.antenna.workflow.processors.LicenseResolver 13 | 14 | ``` -------------------------------------------------------------------------------- /core/core-workflow-steps/src/test/resources/CsvAnalyzerTest/dependencyWithMultipleCopyrights.csv: -------------------------------------------------------------------------------- 1 | "Artifact Id","Group Id","Version","Coordinate Type","Copyrights","File Name" 2 | commons-csv,org.apache.commons,1.4,mvn,"Copyright 2005-2016 The Apache Software Foundation", 3 | commons-csv,org.apache.commons,1.4,mvn,"Copyright 2020 Fake Company", 4 | commons-csv,org.apache.commons,1.4,mvn,"Copyright 2020 Fake the 2nd", 5 | commons-cli,org.apache.commons,1.4,mvn,"Copyright 2005-2016 The Apache Software Foundation", 6 | -------------------------------------------------------------------------------- /example-projects/example-project/src/example-policies/policies.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) Bosch Software Innovations GmbH 2019. 3 | # 4 | # All rights reserved. This program and the accompanying materials 5 | # are made available under the terms of the Eclipse Public License v1.0 6 | # which accompanies this distribution, and is available at 7 | # http://www.eclipse.org/legal/epl-v20.html 8 | # 9 | # SPDX-License-Identifier: EPL-2.0 10 | # 11 | 12 | policies.name=Test policies 13 | policies.version=0.0.0 -------------------------------------------------------------------------------- /example-projects/p2-example-tycho-project/feature/build.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) Bosch Software Innovations GmbH 2019. 3 | # 4 | # All rights reserved. This program and the accompanying materials 5 | # are made available under the terms of the Eclipse Public License v1.0 6 | # which accompanies this distribution, and is available at 7 | # http://www.eclipse.org/legal/epl-v20.html 8 | # 9 | # SPDX-License-Identifier: EPL-2.0 10 | # 11 | 12 | source.. = src/ 13 | output.. = bin/ 14 | bin.includes = . 15 | -------------------------------------------------------------------------------- /assembly/gradle-plugin/src/test/resources/antennaTestVariable.properties: -------------------------------------------------------------------------------- 1 | # Copyright (c) Bosch Software Innovations GmbH 2019. 2 | # 3 | # All rights reserved. This program and the accompanying materials 4 | # are made available under the terms of the Eclipse Public License v2.0 5 | # which accompanies this distribution, and is available at 6 | # http://www.eclipse.org/legal/epl-v20.html 7 | # 8 | # SPDX-License-Identifier: EPL-2.0 9 | # 10 | ANTENNATESTVARIABLE=org.eclipse.sw360.antenna.workflow.generators.HTMLReportGenerator -------------------------------------------------------------------------------- /core/frontend-stubs/cli-frontend-stub/src/test/resources/workflow.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | -------------------------------------------------------------------------------- /example-projects/p2-example-tycho-project/bundles/some_tycho_bundle/build.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) Bosch Software Innovations GmbH 2019. 3 | # 4 | # All rights reserved. This program and the accompanying materials 5 | # are made available under the terms of the Eclipse Public License v1.0 6 | # which accompanies this distribution, and is available at 7 | # http://www.eclipse.org/legal/epl-v20.html 8 | # 9 | # SPDX-License-Identifier: EPL-2.0 10 | # 11 | 12 | source.. = src/ 13 | output.. = bin/ 14 | bin.includes = . 15 | -------------------------------------------------------------------------------- /antenna-documentation/src/site/markdown/generators/generators.md: -------------------------------------------------------------------------------- 1 | ## Generators 2 | The third phase of the workflow pipeline continues with the generators. 3 | Antenna already provides the five following generators: 4 | 5 | - [Attribution Document generator](./attribution-document-generator-step.html) 6 | - [HTML generator](./HTML-report-generator-step.html) 7 | - [CSV generator](./csv-generator-step.html) 8 | - [Source Zip Generator](./source-zip-generator-step.html) 9 | - [SW360 update generator](./sw360-update-generator-step.html) 10 | -------------------------------------------------------------------------------- /antenna-documentation/src/site/markdown/how-to-configure.md.vm: -------------------------------------------------------------------------------- 1 | # How to configure ${docNameCap} 2 | 3 | Before you use ${docNameCap}, you need to set some configuration settings. 4 | There are actually three levels to configure the tool behavior: 5 | 6 | 1. On a build system integration level. This is done in the [Tool Configuration](tool-configuration.html). 7 | 2. On a tool behavior level. This is done in the [Workflow Configuration](workflow-configuration.html). 8 | 3. On a data level. This is done in the [config.xml](config-configuration.html). 9 | -------------------------------------------------------------------------------- /.ci-scripts/test-antenna-documentation-site-tests.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) Bosch Software Innovations GmbH 2019. 3 | # 4 | # All rights reserved. This program and the accompanying materials 5 | # are made available under the terms of the Eclipse Public License v2.0 6 | # which accompanies this distribution, and is available at 7 | # http://www.eclipse.org/legal/epl-v20.html 8 | # 9 | # SPDX-License-Identifier: EPL-2.0 10 | 11 | set -ex 12 | 13 | cd "$(dirname "$0")/../antenna-documentation" 14 | mvn --batch-mode $MAVEN_OPTS site -Psite-tests 15 | -------------------------------------------------------------------------------- /core/core-workflow-steps/src/test/resources/Licenses.csv: -------------------------------------------------------------------------------- 1 | Identifier;Aliases;Name;LicenseURL;OpenSource;DeliverSources;DeliverLicense;Classification;ThreatGroup 2 | AFL-1.1;AFL1;Academic Free License v1.1;;;;;; 3 | AFL-1.2;AFL2;Academic Free License v1.2;;;;;; 4 | JDL;;Java Advanced Imaging Distribution License;http://java.net/projects/jai/sources/svn/content/trunk/www/jdl-jai.pdf;;;;; 5 | EPL-1.0;;Eclipse Public License 1.0;http://spdx.org/licenses/EPL-1.0#licenseText;;;;; 6 | AGPL-1.0;;GNU Affero General Public License v1.0;http://spdx.org/licenses/AGPL-1.0#licenseText;;;;; 7 | -------------------------------------------------------------------------------- /example-projects/p2-example-project/src/workflow.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /modules/sw360/src/integrationtest/java/org/eclipse/sw360/antenna/sw360/integrationtesting/IntegrationTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2019. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.sw360.integrationtesting; 12 | 13 | public class IntegrationTest { 14 | } 15 | -------------------------------------------------------------------------------- /antenna-documentation/src/site/markdown/processors/ort-downloader.md: -------------------------------------------------------------------------------- 1 | ## ORT Downloader 2 | The ORT Downloader processor downloads the sources of each artifact if no `ArtifactSourceFile` fact is present. 3 | For a source to be downloaded the artifact requires either a source url or version control information. 4 | 5 | ### HowTo Use 6 | Add the following step into the `` section of your workflow.xml 7 | 8 | ```xml 9 | 10 | ORT Downloader 11 | org.eclipse.sw360.antenna.ort.workflow.processors.enricher.OrtDownloaderProcessor 12 | 13 | ``` 14 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/model/artifact/IArtifactBuilder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2018. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | 12 | package org.eclipse.sw360.antenna.model.artifact; 13 | 14 | public interface IArtifactBuilder { 15 | Artifact build(); 16 | } 17 | -------------------------------------------------------------------------------- /assembly/cli/src/test/resources/dummy_antennaconf.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/api/FrontendCommons.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2016-2017. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.api; 12 | 13 | public class FrontendCommons { 14 | public static final String ANTENNA_DIR = "antenna"; 15 | } 16 | -------------------------------------------------------------------------------- /.ci-scripts/test-run-all-static-code-analysis.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) Bosch Software Innovations GmbH 2019. 3 | # 4 | # All rights reserved. This program and the accompanying materials 5 | # are made available under the terms of the Eclipse Public License v2.0 6 | # which accompanies this distribution, and is available at 7 | # http://www.eclipse.org/legal/epl-v20.html 8 | # 9 | # SPDX-License-Identifier: EPL-2.0 10 | 11 | set -ex 12 | 13 | cd "$(dirname "$0")/.." 14 | mvn --batch-mode \ 15 | clean install -DskipTests \ 16 | pmd:pmd \ 17 | checkstyle:checkstyle-aggregate \ 18 | spotbugs:check 19 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_template.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: New Feature 3 | about: A new feature of the software 4 | --- 5 | ### Summary of the Feature 6 | 7 | ### Acceptance Criteria 8 | - [ ] ... 9 | - [ ] ... 10 | - [ ] ... 11 | 12 | ### Definition of Done 13 | - Acceptance criteria fulfilled 14 | - A PR is created, the CI infrastructure reports green 15 | - The PR is reviewed and approved 16 | - No TODOs left in the code unless explained in the ticket, if something else is still open, this is summarized in a comment in the issue 17 | - Test cases are created to prove the functionality of the feature 18 | - Documentation is updated 19 | -------------------------------------------------------------------------------- /antenna-documentation/src/site/markdown/analyzers/analyzers.md: -------------------------------------------------------------------------------- 1 | ## Analyzers 2 | The first phase of the workflow pipeline begins with the analyzers. 3 | They all provide a list of artifact information, which is consolidated into a big list and passed to the next phase of the workflow pipeline. 4 | Antenna already provides the three following analyzers aside from an analyzer adding artifacts from the `antennaconf.xml`: 5 | 6 | - [CSV analyzer](./csv-analyzer-step.html) 7 | - [JSON analyzer](./json-analyzer-step.html) 8 | - [Maven Dependency Tree analyzer](./mvn-dep-tree-analyzer-step.html) 9 | - [ORT Result analyzer](./ort-result-analyzer-step.html) -------------------------------------------------------------------------------- /modules/ort/src/test/resources/spotbugs-exclude.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /core/frontend-stubs-testing/src/main/java/org/eclipse/sw360/antenna/frontend/testing/testProjects/NonExecutableTestProject.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2018. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.frontend.testing.testProjects; 12 | 13 | public interface NonExecutableTestProject { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /example-projects/example-project/src/example-policies/policies.xml: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | Dummy 14 | Dummy A1 Policy 15 | FAIL 16 | 17 | -------------------------------------------------------------------------------- /example-projects/minimal-test-project/src/workflow.xml: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/api/IAttachable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2018. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.api; 12 | 13 | import java.io.File; 14 | 15 | public interface IAttachable { 16 | String getType(); 17 | String getClassifier(); 18 | File getFile(); 19 | } 20 | -------------------------------------------------------------------------------- /example-projects/example-project/src/dependencies.csv: -------------------------------------------------------------------------------- 1 | Artifact Id,Group Id,Version,Coordinate Type,Effective License,Declared License,Observed License,Copyrights,Hash,Source URL,Release Tag URL,Software Heritage ID,Clearing State,Change Status,CPE,File Name 2 | commons-csv,org.apache.commons,1.4,mvn,Apache-2.0,Apache-2.0,Apache-2.0 OR MIT,Copyright 2005-2016 The Apache Software Foundation,620580a88953cbcf4528459e485054e7c27c0889,http://archive.apache.org/dist/commons/csv/source/commons-csv-1.4-src.zip,https://github.com/apache/commons-csv/tree/csv-1.4,swh:1:cnt:60dbac0aafd98c9ca461256a0cefd8a7aaea8bda,OSM_APPROVED,AS_IS,cpe:2.3:a:apache:commons-csv:1.4,commons-csv.jar 3 | -------------------------------------------------------------------------------- /example-projects/mvn-test-project/src/main/java/org/eclipse/sw360/antenna/test/mvn/App.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2018. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.test.mvn; 12 | 13 | public class App { 14 | public static void main( String[] args ) { 15 | System.out.println("Hello World!"); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /example-projects/p2-example-tycho-project/bundles/some_tycho_bundle/src/main/java/org/eclipse/sw360/antenna/newpackage/SomeClass.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2019. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | 12 | public class SomeClass { 13 | 14 | public static void main(String[] args) { 15 | System.out.println("Hello World"); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /example-projects/example-project/src/main/java/org/eclipse/sw360/antenna/test/example/App.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2018. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.test.example; 12 | 13 | public class App { 14 | public static void main( String[] args ) { 15 | System.out.println("Hello World!"); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /example-projects/p2-example-tycho-project/feature/feature.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) Bosch Software Innovations GmbH 2019. 3 | # 4 | # All rights reserved. This program and the accompanying materials 5 | # are made available under the terms of the Eclipse Public License v1.0 6 | # which accompanies this distribution, and is available at 7 | # http://www.eclipse.org/legal/epl-v20.html 8 | # 9 | # SPDX-License-Identifier: EPL-2.0 10 | # 11 | 12 | featureName=Some Plugin 13 | 14 | providerName=Some Vendor 15 | 16 | description=Some Plugin 17 | 18 | # text of the "Feature Update Copyright" 19 | copyright=Copyright (c) 2019 Some Vendor, GmbH All rights reserved. 20 | 21 | -------------------------------------------------------------------------------- /core/model/src/test/resources/spotbugs-exclude.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /example-projects/p2-example-project/src/main/java/org/eclipse/sw360/antenna/test/example/App.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2018. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.test.example; 12 | 13 | public class App { 14 | public static void main( String[] args ) { 15 | System.out.println("Hello World!"); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /.ci-scripts/test-p2-end2end.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) Bosch Software Innovations GmbH 2018. 3 | # 4 | # All rights reserved. This program and the accompanying materials 5 | # are made available under the terms of the Eclipse Public License v2.0 6 | # which accompanies this distribution, and is available at 7 | # http://www.eclipse.org/legal/epl-v20.html 8 | # 9 | # SPDX-License-Identifier: EPL-2.0 10 | 11 | set -e 12 | 13 | echo "starting p2 e2e test" 14 | folder="$(readlink -f "$(dirname $0)/../example-projects/p2-example-tycho-project/")" 15 | echo "working directory [$folder]" 16 | 17 | cd "$folder/" 18 | mvn clean package 19 | echo "Done. Test passed" 20 | exit 0 21 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/api/IRulesPackage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2019. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | 12 | package org.eclipse.sw360.antenna.api; 13 | 14 | import java.net.URISyntaxException; 15 | 16 | public interface IRulesPackage { 17 | String getRulesPackageName(); 18 | 19 | String getRulesetFolder() throws URISyntaxException; 20 | } 21 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | This content is produced and maintained in the context of the Eclipse SW360antenna project 2 | 3 | * Project home: http://projects.eclipse.org/projects/technology.sw360.antenna 4 | 5 | == Declared Project Licenses 6 | 7 | All rights reserved. This program and the accompanying materials are made available under the terms 8 | of the Eclipse Public License 2.0 which is available at 9 | 10 | https://www.eclipse.org/legal/epl-2.0/. 11 | 12 | == Source Code 13 | 14 | https://github.com/eclipse/antenna 15 | 16 | == Copyright Holders 17 | 18 | Copyright (c) 2013-2019 Bosch Software Innovations GmbH 19 | Copyright (c) 2020 Bosch.IO GmbH 20 | Copyright (c) 2019-2020 Robert Bosch Manufacturing Solutions GmbH 21 | -------------------------------------------------------------------------------- /antenna-documentation/src/site/markdown/analyzers/mvn-dep-tree-analyzer-step.md: -------------------------------------------------------------------------------- 1 | ## Maven Dependency Tree Analyzer 2 | This analyzer investigates the dependency tree derived from the maven [POM](https://maven.apache.org/pom.html) of the project. 3 | 4 | This analyzer collects the maven coordinates for each dependent artifact. Collecting license information will be done in a future implementation. 5 | 6 | ### How to use 7 | Add the following step into the `` section of your workflow.xml 8 | 9 | ```xml 10 | 11 | Maven dependency analyzer 12 | org.eclipse.sw360.antenna.maven.workflow.analyzers.MvnDependencyTreeAnalyzer 13 | 14 | ``` -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_template.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug Report 3 | about: If something is not working as expected 4 | labels: bug 5 | --- 6 | ### Summary of the Bug 7 | 8 | ### Steps to reproduce 9 | - ... 10 | - ... 11 | - ... 12 | 13 | ### Acceptance Criteria 14 | - [ ] ... 15 | - [ ] ... 16 | - [ ] ... 17 | 18 | ### Definition of Done 19 | - Acceptance criteria fulfilled 20 | - A test case is created to reproduce the bug 21 | - A PR is created, the CI infrastructure reports green, the bug test case proves that bug is fixed 22 | - The PR is reviewed and approved 23 | - No TODOs left in the code unless explained in the ticket, if something else is still open, this is summarized in a comment in the issue 24 | - Documentation is updated 25 | -------------------------------------------------------------------------------- /assembly/cli/src/test/resources/dummy_workflow.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 15 | Dummy Analyzer 16 | org.eclipse.sw360.antenna.frontend.cli.teststeps.DummyLoggingAnalyzer 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /antenna-documentation/scripts/execute_github_site_maven_plugin.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) Bosch Software Innovations GmbH 2019. 3 | # 4 | # All rights reserved. This program and the accompanying materials 5 | # are made available under the terms of the Eclipse Public License v2.0 6 | # which accompanies this distribution, and is available at 7 | # http://www.eclipse.org/legal/epl-v20.html 8 | # 9 | # SPDX-License-Identifier: EPL-2.0 10 | 11 | set -e 12 | 13 | mvn -q -B clean install -DskipTests -P ci 14 | 15 | GITHUB_USERNAME="${GITHUB_CREDENTIALS_USR}" \ 16 | GITHUB_PASSWORD="${GITHUB_CREDENTIALS_PSW}" \ 17 | ANTENNA_DOCUMENTATION_VERSION=$1 \ 18 | mvn -f ./antenna-documentation/pom.xml \ 19 | site-deploy -Psite-deploy 20 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/api/exceptions/FailCausingException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2019. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.api.exceptions; 12 | 13 | /** 14 | * Used in case that a processor detects a build breaking activity. 15 | */ 16 | public class FailCausingException extends Exception { 17 | public FailCausingException(String message) { super(message); } 18 | } 19 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/model/artifact/ArtifactSelector.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2018. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | 12 | package org.eclipse.sw360.antenna.model.artifact; 13 | 14 | import org.eclipse.sw360.antenna.model.artifact.facts.ArtifactIdentifier; 15 | 16 | public interface ArtifactSelector { 17 | boolean matches(Artifact artifact); 18 | boolean matches(ArtifactIdentifier artifactIdentifier); 19 | } 20 | -------------------------------------------------------------------------------- /modules/policy/engine/src/main/java/org/eclipse/sw360/antenna/policy/engine/RuleSeverity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2019. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.policy.engine; 12 | 13 | /** 14 | * The severity levels of policy violations, this enables the user of the engine to react 15 | * appropriately on a policy violation. 16 | */ 17 | public enum RuleSeverity { 18 | WARN, 19 | SEVERE, 20 | CRITICAL; 21 | } 22 | -------------------------------------------------------------------------------- /.ci-scripts/test-sw360-integration-test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) Bosch Software Innovations GmbH 2019. 3 | # 4 | # All rights reserved. This program and the accompanying materials 5 | # are made available under the terms of the Eclipse Public License v2.0 6 | # which accompanies this distribution, and is available at 7 | # http://www.eclipse.org/legal/epl-v20.html 8 | # 9 | # SPDX-License-Identifier: EPL-2.0 10 | 11 | set -e 12 | 13 | cd "$(dirname "$0")/.." 14 | 15 | if [[ ! -f modules/sw360/src/test/resources/postgres/sw360pgdb.sql ]]; then 16 | echo "The postgres dump is necessary at 'modules/sw360/src/test/resources/postgres/sw360pgdb.sql'" 17 | exit 1 18 | fi 19 | 20 | set -x 21 | 22 | cd modules/sw360 23 | mvn clean verify -DskipTests -P integration-test 24 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/model/artifact/facts/ArtifactUrl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2018-2019. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.model.artifact.facts; 12 | 13 | import org.eclipse.sw360.antenna.model.artifact.ArtifactFactWithPayload; 14 | 15 | public abstract class ArtifactUrl extends ArtifactFactWithPayload { 16 | public ArtifactUrl(String payload) { 17 | super(payload); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /modules/sw360/sw360-client/src/main/java/org/eclipse/sw360/antenna/sw360/client/rest/resource/releases/SW360ClearingState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch.IO GmbH 2020. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.sw360.client.rest.resource.releases; 12 | 13 | /** 14 | * This enumeration class mimics the clearing states available in SW360. 15 | */ 16 | public enum SW360ClearingState { 17 | NEW_CLEARING, 18 | SENT_TO_CLEARING_TOOL, 19 | REPORT_AVAILABLE, 20 | APPROVED; 21 | } 22 | -------------------------------------------------------------------------------- /modules/sw360/sw360-client/src/main/java/org/eclipse/sw360/antenna/sw360/client/utils/SW360ClientException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch.IO GmbH 2020. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.sw360.client.utils; 12 | 13 | public class SW360ClientException extends RuntimeException { 14 | public SW360ClientException(String s) { 15 | super(s); 16 | } 17 | 18 | public SW360ClientException(String s, Throwable throwable) { 19 | super(s, throwable); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /antenna-documentation/src/site/markdown/processors/manifest-resolver.md: -------------------------------------------------------------------------------- 1 | ## Manifest resolver 2 | The Manifest resolver checks for each artifact if a JAR file is found as fact 3 | and the jar file contains a MANIFEST.MF file with the properties `Bundle-SymbolicName` and `Bundle-Version`. 4 | In this case it will add a `BundleCoordinates` fact to the artifact. 5 | 6 | It's deactivated in the default antenna workflow configuration, i.e. it has to be activated in the workflow.xml. 7 | 8 | ## HowTo use 9 | Add the following step into the `` section of your workflow.xml 10 | 11 | ``` 12 | 13 | Manifest Resolver 14 | org.eclipse.sw360.antenna.maven.workflow.processors.enricher.ManifestResolver 15 | false 16 | 17 | ``` 18 | -------------------------------------------------------------------------------- /commit_version.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) Bosch Software Innovations GmbH 2018. 3 | # Copyright (c) Bosch.IO GmbH 2020. 4 | # 5 | # All rights reserved. This program and the accompanying materials 6 | # are made available under the terms of the Eclipse Public License v2.0 7 | # which accompanies this distribution, and is available at 8 | # http://www.eclipse.org/legal/epl-v20.html 9 | # 10 | # SPDX-License-Identifier: EPL-2.0 11 | 12 | # Usage: 13 | # Use ./commit_version.sh 14 | # If you want to build the current head directly, use 15 | # "./commit_version.sh $(git rev-parse HEAD) 16 | 17 | set -e 18 | 19 | cd "$(dirname "${BASH_SOURCE[0]}")" 20 | 21 | git checkout $1 22 | 23 | mvn clean install -DskipTests -Dqualifier=-$(git describe --tags --abbrev=7 | cut -d"-" -f2-) 24 | -------------------------------------------------------------------------------- /example-projects/p2-example-tycho-project/repository/category.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | Some Plugin 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /antenna-documentation/src/site/markdown/generators/source-zip-generator-step.md: -------------------------------------------------------------------------------- 1 | ## Source ZIP generator 2 | The `SourceZipWriter` generates a ZIP file in the directory specified in the configuration. 3 | The ZIP file contains all source JARs of the artifacts identified by the analyzers. 4 | 5 | ### How to use 6 | Add the following step into the `` section of your workflow.xml 7 | 8 | ```xml 9 | 10 | Source Zip Writer 11 | org.eclipse.sw360.antenna.workflow.generators.SourceZipWriter 12 | 13 | 14 | 15 | 16 | ``` 17 | 18 | #### Explanation of parameters 19 | * `source.zip.path`: Destination of the ZIP file containing all source JARs. -------------------------------------------------------------------------------- /.ci-scripts/test-ExampleTestProject-with-CLI.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) Bosch Software Innovations GmbH 2019. 3 | # 4 | # All rights reserved. This program and the accompanying materials 5 | # are made available under the terms of the Eclipse Public License v2.0 6 | # which accompanies this distribution, and is available at 7 | # http://www.eclipse.org/legal/epl-v20.html 8 | # 9 | # SPDX-License-Identifier: EPL-2.0 10 | 11 | set -ex 12 | 13 | cd "$(dirname "$0")/.." 14 | 15 | tmpdir=$(mktemp -d) 16 | trap 'rm -rf $tmpdir' EXIT 17 | cp -r example-projects/example-project/ $tmpdir/example-project/ 18 | rm -rf $tmpdir/example-project/target 19 | .ci-scripts/runCLI.sh $tmpdir/example-project 20 | java -jar core/frontend-stubs-testing/target/antenna-test-project-asserter.jar ExampleTestProject $tmpdir/example-project/target 21 | -------------------------------------------------------------------------------- /assembly/maven-plugin/src/main/java/org/eclipse/sw360/antenna/frontend/mojo/AntennaMojoFrontend.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2016-2017. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | 12 | package org.eclipse.sw360.antenna.frontend.mojo; 13 | 14 | import org.apache.maven.plugins.annotations.Mojo; 15 | import org.eclipse.sw360.antenna.frontend.stub.mojo.AbstractAntennaMojoFrontend; 16 | 17 | @Mojo(name = "analyze", requiresProject = true) 18 | public final class AntennaMojoFrontend extends AbstractAntennaMojoFrontend { 19 | } 20 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/model/artifact/IPrettyPrintable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2018. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | 12 | package org.eclipse.sw360.antenna.model.artifact; 13 | 14 | public interface IPrettyPrintable { 15 | /* 16 | * Should generate a pretty representation of the object, which can be printed to the console. 17 | * This can be thought of as a more verbose toString, which might go over multiple lines. 18 | */ 19 | String prettyPrint(); 20 | } 21 | -------------------------------------------------------------------------------- /core/runtime/src/main/java/org/eclipse/sw360/antenna/frontend/AntennaFrontend.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2018. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.frontend; 12 | 13 | import org.eclipse.sw360.antenna.api.IAttachable; 14 | import org.eclipse.sw360.antenna.api.IProject; 15 | 16 | import java.util.Map; 17 | 18 | public interface AntennaFrontend { 19 | AntennaFrontendHelper init(); 20 | Map getOutputs(); 21 | T getProject(); 22 | } 23 | -------------------------------------------------------------------------------- /modules/sw360/sw360-client/src/main/java/org/eclipse/sw360/antenna/sw360/client/rest/resource/Embedded.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2017-2018. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | 12 | package org.eclipse.sw360.antenna.sw360.client.rest.resource; 13 | 14 | import com.fasterxml.jackson.databind.annotation.JsonDeserialize; 15 | import org.eclipse.sw360.antenna.sw360.client.rest.deserializer.SW360ResourceDeserializer; 16 | 17 | @JsonDeserialize(using = SW360ResourceDeserializer.class) 18 | public interface Embedded { 19 | } 20 | -------------------------------------------------------------------------------- /assembly/gradle-plugin/src/main/java/org/eclipse/sw360/antenna/frontend/gradle/AntennaGradleTask.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2019. 3 | * Copyright (c) Bosch.IO GmbH 2020. 4 | * 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the Eclipse Public License v2.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.eclipse.org/legal/epl-v20.html 9 | * 10 | * SPDX-License-Identifier: EPL-2.0 11 | */ 12 | package org.eclipse.sw360.antenna.frontend.gradle; 13 | 14 | import org.eclipse.sw360.antenna.frontend.stub.gradle.AnalyzeTask; 15 | 16 | public class AntennaGradleTask extends AnalyzeTask { 17 | protected String getPluginDescendantArtifactIdName() { 18 | return "antenna-gradle-plugin"; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /assembly/gradle-plugin/src/main/java/org/eclipse/sw360/antenna/frontend/gradle/GradlePlugin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2018. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | 12 | package org.eclipse.sw360.antenna.frontend.gradle; 13 | 14 | import org.eclipse.sw360.antenna.frontend.stub.gradle.AntennaGradlePlugin; 15 | import org.gradle.api.DefaultTask; 16 | 17 | public class GradlePlugin extends AntennaGradlePlugin { 18 | public Class getTaskClass() { 19 | return AntennaGradleTask.class; 20 | } 21 | } -------------------------------------------------------------------------------- /.ci-scripts/test-ExampleTestProject-with-maven.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) Bosch Software Innovations GmbH 2019. 3 | # 4 | # All rights reserved. This program and the accompanying materials 5 | # are made available under the terms of the Eclipse Public License v2.0 6 | # which accompanies this distribution, and is available at 7 | # http://www.eclipse.org/legal/epl-v20.html 8 | # 9 | # SPDX-License-Identifier: EPL-2.0 10 | 11 | set -ex 12 | 13 | cd "$(dirname "$0")/.." 14 | 15 | tmpdir=$(mktemp -d) 16 | trap 'rm -rf $tmpdir' EXIT 17 | cp -r example-projects/example-project/ $tmpdir/example-project/ 18 | mvn --batch-mode $MAVEN_OPTS \ 19 | -f $tmpdir/example-project/pom.xml \ 20 | clean package 21 | java -jar core/frontend-stubs-testing/target/antenna-test-project-asserter.jar ExampleTestProject $tmpdir/example-project/target 22 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/infrastructure_template.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Infrastructure Improvement 3 | about: An improvement in the infrastructure or some structural improvement that does not change functionality 4 | labels: infrastructure 5 | --- 6 | ### Summary of the Improvement 7 | 8 | ### Acceptance Criteria 9 | - [ ] ... 10 | - [ ] ... 11 | - [ ] ... 12 | 13 | ### Definition of Done 14 | - Acceptance criteria fulfilled 15 | - The ticket describes what has been done and describes how the results can be verified (e.g. new Jenkins step is inserted, the report can be viewed at X) 16 | - All known limitations are listed and it is described how they will be addressed (e.g., a ticket for the remaining stuff) 17 | - Documentation is updated 18 | - The result has been reviewed: Everything works as described and can be verified reading only the documentation 19 | -------------------------------------------------------------------------------- /antenna-documentation/scripts/main.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) Bosch Software Innovations GmbH 2019. 3 | # 4 | # All rights reserved. This program and the accompanying materials 5 | # are made available under the terms of the Eclipse Public License v2.0 6 | # which accompanies this distribution, and is available at 7 | # http://www.eclipse.org/legal/epl-v20.html 8 | # 9 | # SPDX-License-Identifier: EPL-2.0 10 | 11 | set -e 12 | 13 | BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 14 | 15 | PROJECT_VERSION="$(mvn -q\ 16 | -Dexec.executable=echo \ 17 | -Dexec.args='${project.version}' \ 18 | --non-recursive \ 19 | exec:exec)" 20 | 21 | if [[ "$PROJECT_VERSION" == *"SNAPSHOT" ]]; then 22 | "${BASEDIR}"/execute_github_site_maven_plugin.sh SNAPSHOT 23 | else 24 | "${BASEDIR}"/documentation_release.sh 25 | fi 26 | -------------------------------------------------------------------------------- /modules/attribution-document/attribution-document-core/src/main/java/org/eclipse/sw360/antenna/attribution/document/core/TextFlowInteraction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2019. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.attribution.document.core; 12 | 13 | import rst.pdfbox.layout.text.Position; 14 | import rst.pdfbox.layout.text.TextFlow; 15 | 16 | import java.io.IOException; 17 | 18 | public interface TextFlowInteraction { 19 | Position addYourText(TextFlow text, float pageHeight, float pageWidth) throws IOException; 20 | } 21 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/api/workflow/AbstractOutputHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2018. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.api.workflow; 12 | 13 | import org.eclipse.sw360.antenna.api.IAttachable; 14 | import org.eclipse.sw360.antenna.api.exceptions.ExecutionException; 15 | 16 | import java.util.Map; 17 | 18 | public abstract class AbstractOutputHandler extends ConfigurableWorkflowItem { 19 | public abstract void handle(Map generatedOutput) throws ExecutionException; 20 | } 21 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/model/artifact/facts/ArtifactCPE.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2018 3 | * . 4 | * 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the Eclipse Public License v2.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.eclipse.org/legal/epl-v20.html 9 | * 10 | * SPDX-License-Identifier: EPL-2.0 11 | */ 12 | package org.eclipse.sw360.antenna.model.artifact.facts; 13 | 14 | import org.eclipse.sw360.antenna.model.artifact.ArtifactFactWithPayload; 15 | 16 | public class ArtifactCPE extends ArtifactFactWithPayload { 17 | public ArtifactCPE(String payload) { 18 | super(payload); 19 | } 20 | 21 | @Override 22 | public String getFactContentName() { 23 | return "CPE"; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /example-projects/p2-example-project/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2018. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | buildscript{ 12 | repositories { 13 | mavenLocal() 14 | mavenCentral() 15 | } 16 | 17 | dependencies{ 18 | classpath 'org.eclipse.sw360.antenna:gradle-plugin:1.0.0-SNAPSHOT' 19 | } 20 | } 21 | 22 | apply plugin: org.eclipse.sw360.antenna.frontend.gradle.GradlePlugin 23 | 24 | repositories { 25 | mavenLocal() 26 | mavenCentral() 27 | } 28 | 29 | AntennaConfiguration{ 30 | toolConfigurationPath 'pom.xml' 31 | } 32 | -------------------------------------------------------------------------------- /modules/sw360/sw360-client/src/main/java/org/eclipse/sw360/antenna/sw360/client/rest/resource/SW360SimpleHalResource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch.IO GmbH 2020. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.sw360.client.rest.resource; 12 | 13 | public class SW360SimpleHalResource extends SW360HalResource { 14 | @Override 15 | public LinkObjects createEmptyLinks() { 16 | return new LinkObjects(); 17 | } 18 | 19 | @Override 20 | public Embedded createEmptyEmbedded() { 21 | return EmptyEmbedded.INSTANCE; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/api/IProject.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2018. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.api; 12 | 13 | import java.io.File; 14 | 15 | public interface IProject { 16 | 17 | default Object getRawProject() { 18 | return this; 19 | } 20 | 21 | String getProjectId(); 22 | String getVersion(); 23 | 24 | File getConfigFile(); 25 | default File getBasedir() { 26 | return getConfigFile().getParentFile(); 27 | } 28 | 29 | String getBuildDirectory(); 30 | } 31 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/api/IPolicyEvaluation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2016-2017. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | 12 | package org.eclipse.sw360.antenna.api; 13 | 14 | import java.util.Set; 15 | 16 | /** 17 | * Encapsulates the results of an evaluation by a rule engine. 18 | */ 19 | public interface IPolicyEvaluation { 20 | /** 21 | * @return A result set of the policy evaluation. Each result describes the 22 | * application of a rule and its result. 23 | */ 24 | Set getEvaluationResults(); 25 | } 26 | -------------------------------------------------------------------------------- /assembly/cli/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /core/core-workflow-steps/src/main/resources/styles.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch.IO GmbH 2020 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | * { font-family: Arial; font-size: 14px; } 12 | h1 { font-size: 18px;} 13 | h2 { font-size: 16px; } 14 | h3 { font-size: 14px; } 15 | p { font-weight: normal } 16 | body { background: #ffffff;} 17 | .top { text-decoration: none; color: blue; padding: 0px 1em;} 18 | .inset { 19 | margin: 0.7em; 20 | padding: 0.7em; 21 | background: white; 22 | border-top: 1px solid silver; 23 | xborder-right: 1px solid silver; 24 | } 25 | .inset p { 26 | white-space: pre-wrap; 27 | } 28 | -------------------------------------------------------------------------------- /assembly/compliance-tool/src/main/java/org/eclipse/sw360/antenna/frontend/compliancetool/sw360/reporter/ReporterOutput.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch.IO GmbH 2020. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.frontend.compliancetool.sw360.reporter; 12 | 13 | import java.nio.file.Path; 14 | import java.util.Collection; 15 | 16 | /** 17 | * Central interface for the report output of the status reporter 18 | */ 19 | public interface ReporterOutput { 20 | void setResultType(Class type); 21 | 22 | void setFilePath(Path filePath); 23 | 24 | void print(Collection result); 25 | } 26 | -------------------------------------------------------------------------------- /assembly/compliance-tool/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/model/artifact/facts/java/ArtifactJar.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2018. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | 12 | package org.eclipse.sw360.antenna.model.artifact.facts.java; 13 | 14 | import org.eclipse.sw360.antenna.model.artifact.facts.ArtifactFile; 15 | 16 | import java.nio.file.Path; 17 | 18 | public class ArtifactJar extends ArtifactFile { 19 | public ArtifactJar(Path path) { 20 | super(path); 21 | } 22 | 23 | @Override 24 | public String getFactContentName() { 25 | return "Artifact Jar"; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/model/artifact/ArtifactFact.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2018. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.model.artifact; 12 | 13 | public interface ArtifactFact 14 | extends IPrettyPrintable { 15 | String getFactContentName(); // used for pretty printing 16 | boolean isEmpty(); 17 | default T mergeWith(T resultWithPrecedence) { 18 | return resultWithPrecedence; 19 | } 20 | default Class getKey() { 21 | return this.getClass(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/model/license/LicenseOperator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch.IO GmbH 2020. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.model.license; 12 | 13 | /** 14 | * Simple operator for license expression according to the SPDX license expression standard. The WITH operator is 15 | * missing, because with expressions are handled by a special class {@link WithLicense} 16 | */ 17 | public enum LicenseOperator { 18 | AND, 19 | OR; 20 | 21 | public static LicenseOperator fromValue(String operator) { 22 | return valueOf(operator.toUpperCase()); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /assembly/compliance-tool/src/test/resources/compliancetool-exporter.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) Bosch.IO GmbH 2020. 3 | # 4 | # All rights reserved. This program and the accompanying materials 5 | # are made available under the terms of the Eclipse Public License v1.0 6 | # which accompanies this distribution, and is available at 7 | # http://www.eclipse.org/legal/epl-v20.html 8 | # 9 | # SPDX-License-Identifier: EPL-2.0 10 | # 11 | sourcesDirectory=sources 12 | basedir=./ 13 | csvFilePath=sample.csv 14 | encoding=UTF-8 15 | delimiter=; 16 | proxyHost= 17 | proxyPort=0 18 | proxyUse=false 19 | # sw360 common properties 20 | sw360restServerUrl=http://localhost:8880/resource/api 21 | sw360authServerUrl=http://localhost:8880/authorization/oauth/token 22 | # credentials name variables 23 | sw360user=admin@sw360.org 24 | sw360password=12345 25 | sw360clientId=trusted-sw360-client 26 | sw360clientPassword=sw360-secret 27 | sw360token=123token123 28 | -------------------------------------------------------------------------------- /modules/policy/engine/src/main/java/org/eclipse/sw360/antenna/policy/engine/Ruleset.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2019. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.policy.engine; 12 | 13 | import java.util.Collection; 14 | 15 | /** 16 | * This is a collection of {@link Rule} objects within a common context. The configuration of the {@link PolicyEngine} 17 | * in the {@link PolicyEngineConfigurator} allows to give several rule sets to set up the policies. 18 | */ 19 | public interface Ruleset { 20 | String getName(); 21 | String getVersion(); 22 | Collection getRules(); 23 | } 24 | -------------------------------------------------------------------------------- /antenna-license-provider/licenses.xml: -------------------------------------------------------------------------------- 1 | 11 | 12 | licenseinfo 13 | 14 | zip 15 | 16 | false 17 | 18 | 19 | .. 20 | 21 | LICENSE 22 | NOTICE 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/model/artifact/facts/ArtifactModificationStatus.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2018. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | 12 | package org.eclipse.sw360.antenna.model.artifact.facts; 13 | 14 | import org.eclipse.sw360.antenna.model.artifact.ArtifactFactWithPayload; 15 | 16 | public class ArtifactModificationStatus extends ArtifactFactWithPayload { 17 | public ArtifactModificationStatus(String payload) { 18 | super(payload); 19 | } 20 | 21 | @Override 22 | public String getFactContentName() { 23 | return "ModificationStatus"; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /modules/policy/basic-policies/src/test/java/org/eclipse/sw360/antenna/policies/RunCucumberTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2019. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.policies; 12 | 13 | import cucumber.api.CucumberOptions; 14 | import cucumber.api.junit.Cucumber; 15 | import org.junit.runner.RunWith; 16 | 17 | @RunWith(Cucumber.class) 18 | @CucumberOptions( 19 | features = "src/test/resources/features/", 20 | glue = "org.eclipse.sw360.antenna.policy.testing" 21 | ) 22 | public class RunCucumberTest { 23 | // nothing to do, this is just a wrapper to execute the tests 24 | } 25 | -------------------------------------------------------------------------------- /assembly/compliance-tool/src/test/resources/config-with-proxy.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) Bosch.IO GmbH 2020. 3 | # 4 | # All rights reserved. This program and the accompanying materials 5 | # are made available under the terms of the Eclipse Public License v1.0 6 | # which accompanies this distribution, and is available at 7 | # http://www.eclipse.org/legal/epl-v20.html 8 | # 9 | # SPDX-License-Identifier: EPL-2.0 10 | # 11 | targetDir=./ 12 | sourcesDirectory=./sources 13 | basedir= 14 | csvFilePath=sample.csv 15 | encoding=UTF-8 16 | delimiter=; 17 | proxyHost=proxy.net 18 | proxyPort=8080 19 | proxyUse=true 20 | # sw360 common properties 21 | sw360restServerUrl=http://localhost:8880/resource/api 22 | sw360authServerUrl=http://localhost:8880/authorization/oauth 23 | # credentials name variables 24 | sw360user=admin@sw360.org 25 | sw360password=12345 26 | sw360clientId=trusted-sw360-client 27 | sw360clientPassword=sw360-secret 28 | sw360token=123token123 29 | -------------------------------------------------------------------------------- /core/core-workflow-steps/src/main/java/org/eclipse/sw360/antenna/analysis/filter/ProprietaryArtifactFilter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2016-2017. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | 12 | package org.eclipse.sw360.antenna.analysis.filter; 13 | 14 | import org.eclipse.sw360.antenna.api.IArtifactFilter; 15 | import org.eclipse.sw360.antenna.model.artifact.Artifact; 16 | 17 | /** 18 | * Checks if artifact is proprietary. 19 | */ 20 | public class ProprietaryArtifactFilter implements IArtifactFilter { 21 | @Override 22 | public boolean passed(Artifact artifact) { 23 | return ! artifact.isProprietary(); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /modules/policy/engine-testing/src/test/java/org/eclipse/sw360/antenna/policy/testing/RunCucumberTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2019. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.policy.testing; 12 | 13 | import cucumber.api.CucumberOptions; 14 | import cucumber.api.junit.Cucumber; 15 | import org.junit.runner.RunWith; 16 | 17 | @RunWith(Cucumber.class) 18 | @CucumberOptions( 19 | features = "src/test/resources/features/", 20 | glue = "org.eclipse.sw360.antenna.policy.testing" 21 | ) 22 | public class RunCucumberTest { 23 | // nothing to do, this is just a wrapper to execute the tests 24 | } 25 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/model/artifact/facts/java/ArtifactSourceJar.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2018. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | 12 | package org.eclipse.sw360.antenna.model.artifact.facts.java; 13 | 14 | import org.eclipse.sw360.antenna.model.artifact.facts.ArtifactSourceFile; 15 | 16 | import java.nio.file.Path; 17 | 18 | public class ArtifactSourceJar extends ArtifactSourceFile { 19 | public ArtifactSourceJar(Path sourceFile) { 20 | super(sourceFile); 21 | } 22 | 23 | @Override 24 | public String getFactContentName() { 25 | return "Artifact Source Jar"; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /modules/sw360/README.md: -------------------------------------------------------------------------------- 1 | # SW360 Module 2 | 3 | This module contains the `SW360Updater` and the `SW360Enricher` workflow steps together with a library which implements REST for SW360. 4 | 5 | ## Integration testing 6 | 7 | For integration testing one can enable the profile `integration-test`, e.g. via `cd module/sw360; mvn install -Pintegration-test`, to run integration tests. 8 | As a prerequisite one needs the file `src/integrationtest/resources/postgres/sw360pgdb.sql`, which contains a dump of the postgres state of a provisioned SW360 Liferay. 9 | The dump can be done with the following one-liner: 10 | ```bash 11 | $ pg_dump -h $HOST -p $PORT -U $USER sw360pgdb > src/integrationtest/resources/postgres/sw360pgdb.sql 12 | ``` 13 | 14 | The source code for the integration tests is placed at `src/integrationtest/java/` and might not be found by the IDE by default. 15 | E.g. in IntelliJ IDEA one needs to mark the folder as `Test Sources Root` before it can handle the files. 16 | -------------------------------------------------------------------------------- /.ci-scripts/runCLI.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) Bosch Software Innovations GmbH 2018. 3 | # 4 | # All rights reserved. This program and the accompanying materials 5 | # are made available under the terms of the Eclipse Public License v2.0 6 | # which accompanies this distribution, and is available at 7 | # http://www.eclipse.org/legal/epl-v20.html 8 | # 9 | # SPDX-License-Identifier: EPL-2.0 10 | 11 | set -e 12 | 13 | jar="$(readlink -f "$(dirname $0)/../assembly/cli/target/antenna.jar")" 14 | echo "use the JAR=[$jar]" 15 | 16 | if [[ $# -eq 0 ]] ; then 17 | echo 'no argument was passed' 18 | exit 1 19 | fi 20 | dirToRunIn="$1" 21 | if [[ ! -d "$dirToRunIn" ]]; then 22 | echo "$dirToRunIn does not exist" 23 | exit 1 24 | fi 25 | 26 | java="java" 27 | if [[ $2 = "-debug" ]] ; then 28 | java="$java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005" 29 | fi 30 | 31 | set -x 32 | cd $dirToRunIn 33 | $java -jar $jar ./pom.xml 34 | -------------------------------------------------------------------------------- /modules/attribution-document/attribution-document-core/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 13 | 14 | 15 | 16 | 18 | 19 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/api/IArtifactFilter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2016-2017. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | 12 | package org.eclipse.sw360.antenna.api; 13 | 14 | import org.eclipse.sw360.antenna.model.artifact.Artifact; 15 | 16 | /** 17 | * An IArtifactFilter filters artifacts according to the Method implemented by a 18 | * class. 19 | */ 20 | public interface IArtifactFilter { 21 | 22 | /** 23 | * Returns true if the given artifact has passed the filter, false 24 | * otherwise. 25 | * 26 | * @param artifact 27 | * @return 28 | */ 29 | boolean passed(Artifact artifact); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/api/workflow/AbstractAnalyzer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2016-2017. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | 12 | package org.eclipse.sw360.antenna.api.workflow; 13 | 14 | import org.eclipse.sw360.antenna.api.exceptions.ExecutionException; 15 | 16 | /** 17 | * Executes an analysis of the source code artifacts in a project. 18 | */ 19 | public abstract class AbstractAnalyzer extends ConfigurableWorkflowItem { 20 | 21 | /** 22 | * @return Identifies this analyzer. 23 | */ 24 | public abstract String getName(); 25 | 26 | public abstract WorkflowStepResult yield() throws ExecutionException; 27 | } 28 | -------------------------------------------------------------------------------- /modules/attribution-document/attribution-document-generator/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 13 | 14 | 15 | 16 | 18 | 19 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/model/artifact/facts/DeclaredLicenseInformation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2018. 3 | * Copyright (c) Bosch.IO GmbH 2020. 4 | * 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the Eclipse Public License v2.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.eclipse.org/legal/epl-v20.html 9 | * 10 | * SPDX-License-Identifier: EPL-2.0 11 | */ 12 | 13 | package org.eclipse.sw360.antenna.model.artifact.facts; 14 | 15 | import org.eclipse.sw360.antenna.model.license.LicenseInformation; 16 | 17 | public class DeclaredLicenseInformation extends ArtifactLicenseInformation { 18 | public DeclaredLicenseInformation(LicenseInformation payload) { 19 | super(payload); 20 | } 21 | 22 | @Override 23 | public String getFactContentName() { 24 | return "Declared License"; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/model/artifact/facts/ObservedLicenseInformation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2018. 3 | * Copyright (c) Bosch.IO GmbH 2020. 4 | * 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the Eclipse Public License v2.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.eclipse.org/legal/epl-v20.html 9 | * 10 | * SPDX-License-Identifier: EPL-2.0 11 | */ 12 | 13 | package org.eclipse.sw360.antenna.model.artifact.facts; 14 | 15 | 16 | import org.eclipse.sw360.antenna.model.license.LicenseInformation; 17 | 18 | public class ObservedLicenseInformation extends ArtifactLicenseInformation { 19 | public ObservedLicenseInformation(LicenseInformation payload) { 20 | super(payload); 21 | } 22 | 23 | @Override 24 | public String getFactContentName() { 25 | return "Observed License"; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /example-projects/mvn-test-project/local-test-repo/org/eclipse/sw360/antenna/example-dependency/1.0/example-dependency-1.0.pom: -------------------------------------------------------------------------------- 1 | 2 | 12 | 15 | 4.0.0 16 | 17 | org.eclipse.sw360.antenna 18 | example-dependency 19 | 1.0 20 | 21 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/model/artifact/facts/ConfiguredLicenseInformation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2018. 3 | * Copyright (c) Bosch.IO GmbH 2020. 4 | * 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the Eclipse Public License v2.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.eclipse.org/legal/epl-v20.html 9 | * 10 | * SPDX-License-Identifier: EPL-2.0 11 | */ 12 | 13 | package org.eclipse.sw360.antenna.model.artifact.facts; 14 | 15 | 16 | import org.eclipse.sw360.antenna.model.license.LicenseInformation; 17 | 18 | public class ConfiguredLicenseInformation extends ArtifactLicenseInformation { 19 | public ConfiguredLicenseInformation(LicenseInformation payload) { 20 | super(payload); 21 | } 22 | 23 | @Override 24 | public String getFactContentName() { 25 | return "Configured License"; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/model/artifact/facts/OverriddenLicenseInformation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2018. 3 | * Copyright (c) Bosch.IO GmbH 2020. 4 | * 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the Eclipse Public License v2.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.eclipse.org/legal/epl-v20.html 9 | * 10 | * SPDX-License-Identifier: EPL-2.0 11 | */ 12 | 13 | package org.eclipse.sw360.antenna.model.artifact.facts; 14 | 15 | 16 | import org.eclipse.sw360.antenna.model.license.LicenseInformation; 17 | 18 | public class OverriddenLicenseInformation extends ArtifactLicenseInformation { 19 | public OverriddenLicenseInformation(LicenseInformation payload) { 20 | super(payload); 21 | } 22 | 23 | @Override 24 | public String getFactContentName() { 25 | return "Overridden License"; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /assembly/compliance-tool/src/test/java/org/eclipse/sw360/antenna/frontend/compliancetool/sw360/reporter/ReporterOutputFactoryTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch.IO GmbH 2020. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.frontend.compliancetool.sw360.reporter; 12 | 13 | import org.junit.Test; 14 | 15 | import static org.assertj.core.api.Assertions.assertThat; 16 | 17 | public class ReporterOutputFactoryTest { 18 | @Test 19 | public void defaultStringEqualsDefaultTest() { 20 | final ReporterOutput reporterOutput = ReporterOutputFactory.getReporterOutput(""); 21 | 22 | assertThat(reporterOutput).isEqualTo(ReporterOutputFactory.DEFAULT_REPORTER_OUTPUT); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/model/artifact/facts/ArtifactHomepage.java: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (c) Bosch Software Innovations GmbH 2018-2019. 4 | * 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the Eclipse Public License v2.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.eclipse.org/legal/epl-v20.html 9 | * 10 | * SPDX-License-Identifier: EPL-2.0 11 | */ 12 | package org.eclipse.sw360.antenna.model.artifact.facts; 13 | 14 | import org.eclipse.sw360.antenna.model.artifact.ArtifactFact; 15 | 16 | public class ArtifactHomepage extends ArtifactUrl { 17 | public ArtifactHomepage(String homepage) { 18 | super(homepage); 19 | } 20 | 21 | @Override 22 | public String getFactContentName() { 23 | return "Homepage"; 24 | } 25 | 26 | @Override 27 | public Class getKey() { 28 | return ArtifactHomepage.class; 29 | } 30 | } -------------------------------------------------------------------------------- /example-projects/mvn-test-project/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2018. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | buildscript{ 12 | repositories { 13 | mavenLocal() 14 | mavenCentral() 15 | } 16 | 17 | dependencies{ 18 | classpath 'org.eclipse.sw360.antenna:gradle-plugin:2.0.0-SNAPSHOT' 19 | } 20 | } 21 | 22 | apply plugin: org.eclipse.sw360.antenna.frontend.gradle.GradlePlugin 23 | //plugins { 24 | // id 'antenna-bosch-gradle-plugin' version '2.0.0-SNAPSHOT' 25 | //} 26 | 27 | repositories { 28 | mavenLocal() 29 | mavenCentral() 30 | } 31 | 32 | AntennaConfiguration{ 33 | toolConfigurationPath 'pom.xml' 34 | debugEnabled = false 35 | } 36 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/model/reporting/ProcessingMessageWithPayload.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2018. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | 12 | package org.eclipse.sw360.antenna.model.reporting; 13 | 14 | import java.util.List; 15 | 16 | public abstract class ProcessingMessageWithPayload extends ProcessingMessage { 17 | 18 | public ProcessingMessageWithPayload(MessageType type, String message) { 19 | super(type, message); 20 | } 21 | 22 | public ProcessingMessageWithPayload(MessageType type, String identifier, String message) { 23 | super(type, identifier, message); 24 | } 25 | 26 | public abstract List getPayload(); 27 | } 28 | -------------------------------------------------------------------------------- /.ci-scripts/test-ExampleTestProject-with-gradle.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright (c) Bosch Software Innovations GmbH 2019. 3 | # Copyright (c) Bosch.IO GmbH 2020. 4 | # 5 | # All rights reserved. This program and the accompanying materials 6 | # are made available under the terms of the Eclipse Public License v2.0 7 | # which accompanies this distribution, and is available at 8 | # http://www.eclipse.org/legal/epl-v20.html 9 | # 10 | # SPDX-License-Identifier: EPL-2.0 11 | 12 | set -ex 13 | 14 | cd "$(dirname "$0")/.." 15 | 16 | tmpdir=$(mktemp -d) 17 | trap 'rm -rf $tmpdir' EXIT 18 | cp -r example-projects/example-project/ $tmpdir/example-project/ 19 | if [[ $M2_REPOSITORY ]]; then 20 | sed -i.bak "s%mavenLocal()%maven {url '${M2_REPOSITORY}'}%" $tmpdir/example-project/build.gradle 21 | fi 22 | 23 | pushd $tmpdir/example-project 24 | ./gradlew cleanAnalyze analyze 25 | popd 26 | 27 | java -jar core/frontend-stubs-testing/target/antenna-test-project-asserter.jar ExampleTestProject $tmpdir/example-project/build 28 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/model/artifact/facts/ArtifactSourceUrl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2018-2019. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.model.artifact.facts; 12 | 13 | import org.eclipse.sw360.antenna.model.artifact.ArtifactFact; 14 | 15 | public class ArtifactSourceUrl extends ArtifactUrl { 16 | public ArtifactSourceUrl(String sourceUrl) { 17 | super(sourceUrl); 18 | } 19 | 20 | @Override 21 | public String getFactContentName() { 22 | return "Source URL"; 23 | } 24 | 25 | @Override 26 | public Class getKey() { 27 | return ArtifactSourceUrl.class; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /core/runtime/src/test/resources/workflow.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 15 | Source Validator 16 | org.eclipse.sw360.antenna.validators.workflow.processors.SourceValidator 17 | 18 | 19 | 20 | 21 | false 22 | 23 | 24 | -------------------------------------------------------------------------------- /core/core-workflow-steps/src/main/java/org/eclipse/sw360/antenna/analysis/filter/AllowAllArtifactsFilter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2016-2017. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | 12 | package org.eclipse.sw360.antenna.analysis.filter; 13 | 14 | import org.eclipse.sw360.antenna.api.IArtifactFilter; 15 | import org.eclipse.sw360.antenna.model.artifact.Artifact; 16 | 17 | /** 18 | * This class returns always true. 19 | */ 20 | public class AllowAllArtifactsFilter implements IArtifactFilter { 21 | 22 | /** 23 | * 24 | * @return returns true for all artifacts. 25 | */ 26 | 27 | @Override 28 | public boolean passed(Artifact artifact) { 29 | return true; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /modules/maven/src/main/java/org/eclipse/sw360/antenna/maven/ClassifierInformation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2019. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.maven; 12 | 13 | public class ClassifierInformation { 14 | public static final ClassifierInformation DEFAULT_JAR = new ClassifierInformation("", false); 15 | public static final ClassifierInformation DEFAULT_SOURCE_JAR = new ClassifierInformation("sources", true); 16 | public final String classifier; 17 | public final boolean isSource; 18 | 19 | public ClassifierInformation(String classifier, boolean isSource) { 20 | this.classifier = classifier; 21 | this.isSource = isSource; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /modules/maven/src/main/java/org/eclipse/sw360/antenna/maven/WrappedDependencyNodes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2018. 3 | * Copyright (c) Bosch.IO GmbH 2020. 4 | * 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the Eclipse Public License v2.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.eclipse.org/legal/epl-v20.html 9 | * 10 | * SPDX-License-Identifier: EPL-2.0 11 | */ 12 | package org.eclipse.sw360.antenna.maven; 13 | 14 | import org.apache.maven.shared.dependency.graph.DependencyNode; 15 | 16 | import java.util.List; 17 | 18 | public class WrappedDependencyNodes { 19 | 20 | private final List dependencyNodes; 21 | 22 | public WrappedDependencyNodes(List dependencyNodes) { 23 | this.dependencyNodes = dependencyNodes; 24 | } 25 | 26 | public List getDependencyNodes() { 27 | return dependencyNodes; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/model/artifact/facts/ArtifactReleaseTagURL.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2019. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.model.artifact.facts; 12 | 13 | import org.eclipse.sw360.antenna.model.artifact.ArtifactFact; 14 | 15 | public class ArtifactReleaseTagURL extends ArtifactUrl { 16 | public ArtifactReleaseTagURL(String releaseTagUrl) { 17 | super(releaseTagUrl); 18 | } 19 | 20 | @Override 21 | public String getFactContentName() { 22 | return "Original Repository"; 23 | } 24 | 25 | @Override 26 | public Class getKey() { 27 | return ArtifactReleaseTagURL.class; 28 | } 29 | } -------------------------------------------------------------------------------- /example-projects/example-project/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2018. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | buildscript{ 12 | repositories { 13 | mavenLocal() 14 | mavenCentral() 15 | } 16 | 17 | dependencies{ 18 | classpath 'org.eclipse.sw360.antenna:gradle-plugin:1.0.0-SNAPSHOT' 19 | } 20 | } 21 | 22 | plugins { 23 | id 'java' 24 | } 25 | apply plugin: org.eclipse.sw360.antenna.frontend.gradle.GradlePlugin 26 | 27 | tasks.withType(Jar) { 28 | destinationDir = file("$rootDir/build") 29 | } 30 | 31 | repositories { 32 | mavenLocal() 33 | mavenCentral() 34 | } 35 | 36 | version '1.0-SNAPSHOT' 37 | 38 | AntennaConfiguration{ 39 | toolConfigurationPath 'pom.xml' 40 | } 41 | -------------------------------------------------------------------------------- /modules/policy/engine/src/main/java/org/eclipse/sw360/antenna/policy/engine/model/LicenseData.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2019. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.policy.engine.model; 12 | 13 | import java.util.Optional; 14 | 15 | /** 16 | * This interface represents the meta information on a license 17 | */ 18 | public interface LicenseData { 19 | /** 20 | * @return The spdx license id of this license 21 | */ 22 | String getLicenseId(); 23 | 24 | /** 25 | * @return An optional name of the license 26 | */ 27 | Optional getLicenseName(); 28 | 29 | /** 30 | * @return The license text of the license 31 | */ 32 | Optional getLicenseText(); 33 | } 34 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/api/exceptions/ExecutionException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2016-2019. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.api.exceptions; 12 | 13 | /** 14 | * Used when a step of the Antenna execution workflow unexpectedly fails. 15 | */ 16 | public class ExecutionException extends RuntimeException { 17 | 18 | private static final long serialVersionUID = -2326543066347264518L; 19 | 20 | public ExecutionException() { 21 | super(); 22 | } 23 | 24 | public ExecutionException(String message) { 25 | super(message); 26 | } 27 | 28 | public ExecutionException(String message, Throwable cause) { 29 | super(message, cause); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /modules/sw360/sw360-client/src/test/resources/__files/all_components.json: -------------------------------------------------------------------------------- 1 | { 2 | "_embedded": { 3 | "sw360:components": [ 4 | { 5 | "name": "jackson-annotations", 6 | "_links": { 7 | "self": { 8 | "href": "https://sw360.test.com/resource/api/components/xxxxxxyyyyyzzzzz8c34" 9 | } 10 | } 11 | }, 12 | { 13 | "name": "jakarta.validation-api", 14 | "_links": { 15 | "self": { 16 | "href": "https://sw360.test.com/resource/api/components/xxxxxxyyyyyzzzzz9e53" 17 | } 18 | } 19 | }, 20 | { 21 | "name": "jsoup", 22 | "_links": { 23 | "self": { 24 | "href": "https://sw360.test.com/resource/api/components/xxxxxxyyyyyzzzzzb9ee" 25 | } 26 | } 27 | } 28 | ] 29 | }, 30 | "_links": { 31 | "curies": [ 32 | { 33 | "href": "https://sw360.test.com/resource/docs/{rel}.html", 34 | "name": "sw360", 35 | "templated": true 36 | } 37 | ] 38 | } 39 | } -------------------------------------------------------------------------------- /example-projects/p2-example-tycho-project/bundles/some_tycho_bundle/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 14 | 4.0.0 15 | 16 | org.eclipse.sw360.antenna.testproject 17 | bundles 18 | 0.0.1-SNAPSHOT 19 | 20 | some_tycho_bundle 21 | eclipse-plugin 22 | 23 | -------------------------------------------------------------------------------- /modules/sw360/sw360-workflow/src/main/java/org/eclipse/sw360/antenna/sw360/utils/ArtifactToAttachmentUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2019. 3 | * Copyright (c) Bosch.IO GmbH 2020. 4 | * 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the Eclipse Public License v2.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.eclipse.org/legal/epl-v20.html 9 | * 10 | * SPDX-License-Identifier: EPL-2.0 11 | */ 12 | package org.eclipse.sw360.antenna.sw360.utils; 13 | 14 | import org.eclipse.sw360.antenna.model.artifact.Artifact; 15 | import org.eclipse.sw360.antenna.model.artifact.facts.ArtifactSourceFile; 16 | 17 | import java.nio.file.Path; 18 | import java.util.Optional; 19 | 20 | public class ArtifactToAttachmentUtils { 21 | 22 | private ArtifactToAttachmentUtils() {} 23 | 24 | public static Optional getSourceAttachmentFromArtifact(Artifact artifact) { 25 | return artifact.askForGet(ArtifactSourceFile.class); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/api/exceptions/ConfigurationException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2017-2019. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.api.exceptions; 12 | 13 | /** 14 | * Used when the Antenna workflow configuration unexpectedly fails. 15 | */ 16 | public class ConfigurationException extends RuntimeException { 17 | 18 | private static final long serialVersionUID = 7171915096651884386L; 19 | 20 | public ConfigurationException() { 21 | super(); 22 | } 23 | 24 | public ConfigurationException(String message) { 25 | super(message); 26 | } 27 | 28 | public ConfigurationException(String message, Throwable cause) { 29 | super(message, cause); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /antenna-documentation/src/site/markdown/generators/cyclonedx-generator-step.md: -------------------------------------------------------------------------------- 1 | ## CycloneDX Bill-of-Material Generator 2 | 3 | ### Purpose 4 | 5 | This generator uses the artifacts collected and enriched by Antenna to create a Bill-of-Material (BOM) in [CycloneDX](https://cyclonedx.org/) format. 6 | The result is a file called ``cyclonedx.bom.xml`` and can be found in the Antenna's target directory. 7 | Using that, further processing of information from Antenna can be done in tools supporting this format. 8 | 9 | As example, when using [OWASP Dependency-Track](https://owasp.org/www-project-dependency-track/) the information could be used to report on security vulnerabilities for the collected artifacts. 10 | 11 | ### How to use 12 | Simply add this configuration to ``workflow.xml``: 13 | 14 | ```xml 15 | 16 | 17 | 18 | CycloneDX Bill-of-Material Generator 19 | com.eclipse.sw360.antenna.cyclonedx.CycloneDXGenerator 20 | 21 | 22 | 23 | ``` 24 | 25 | -------------------------------------------------------------------------------- /modules/policy/engine-testing/src/main/java/org/eclipse/sw360/antenna/policy/testing/ScenarioState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2019. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.policy.testing; 12 | 13 | import org.eclipse.sw360.antenna.api.IEvaluationResult; 14 | import org.eclipse.sw360.antenna.model.artifact.Artifact; 15 | 16 | import java.nio.file.Path; 17 | import java.util.ArrayList; 18 | import java.util.HashMap; 19 | import java.util.List; 20 | import java.util.Map; 21 | 22 | public class ScenarioState { 23 | Map artifacts = new HashMap<>(); 24 | List evaluations = new ArrayList<>(); 25 | List rulesets = new ArrayList<>(); 26 | List resourcesToDelete = new ArrayList<>(); 27 | } 28 | -------------------------------------------------------------------------------- /assembly/compliance-tool/src/test/resources/compliancetool-updater.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) Bosch.IO GmbH 2020. 3 | # 4 | # All rights reserved. This program and the accompanying materials 5 | # are made available under the terms of the Eclipse Public License v1.0 6 | # which accompanies this distribution, and is available at 7 | # http://www.eclipse.org/legal/epl-v20.html 8 | # 9 | # SPDX-License-Identifier: EPL-2.0 10 | # 11 | # csv properties 12 | sourcesDirectory=sources 13 | basedir=./ 14 | clearingDocDir=clearing_documents 15 | csvFilePath=src/test/resources/compliancetool_updater_test.csv 16 | delimiter=, 17 | encoding=UTF-8 18 | # no proxy settings 19 | # sw360 common properties 20 | sw360restServerUrl=http://localhost:8880/resource/api 21 | sw360authServerUrl=http://localhost:8880/authorization/oauth/token 22 | sw360updateReleases=true 23 | sw360uploadSources=false 24 | sw360deleteObsoleteSources=true 25 | # credentials name variables 26 | sw360user=admin@sw360.org 27 | sw360password=12345 28 | sw360clientId=trusted-sw360-client 29 | sw360clientPassword=sw360-secret 30 | sw360token=123token123 31 | -------------------------------------------------------------------------------- /antenna-documentation/src/site/markdown/processors/coordinates-validator.md: -------------------------------------------------------------------------------- 1 | ## Coordinates validator 2 | The Coordinates validator checks for each artifact if it contains an `ArtifactCoordinates` object. 3 | There are different ways to specify coordinates, e.g. `MavenCoordinates` for Maven artifacts, 4 | `JavaScriptCoordinates` for JS components etc. 5 | Based on the configuration, the behavior of the validator can be controlled. 6 | 7 | ### HowTo use 8 | Add the following step into your `` section of your workflow.xml 9 | 10 | ``` 11 | 12 | Coordinates Validator 13 | org.eclipse.sw360.antenna.validators.workflow.processors.CoordinatesValidator 14 | 15 | 16 | 17 | 18 | ``` 19 | 20 | #### Explanation of parameters 21 | * `failOnMissingCoordinates`: Specifies the behavior of the validator. 22 | If any artifact fails the validation, the validator notices the artifact with the configured value. The values **INFO**, **WARN**, **FAIL** are accepcted. -------------------------------------------------------------------------------- /antenna-documentation/src/site/markdown/processors/source-validator.md: -------------------------------------------------------------------------------- 1 | ## Source validator 2 | The Source validator checks the source JAR of each artifact. The source JAR can be downloaded in 3 | the previous enricher steps. Based on the configuration, the validator can affect the build 4 | due to missing source JAR or incomplete source JAR. 5 | 6 | ### HowTo use 7 | Add the following step into the `` section of your workflow.xml 8 | 9 | ``` 10 | 11 | Source Validator 12 | org.eclipse.sw360.antenna.validators.workflow.processors.SourceValidator 13 | 14 | 15 | 16 | 17 | 18 | ``` 19 | 20 | #### Explanation of parameters 21 | * `missingSourcesSeverity`: Specifies the behavior for missing source JAR. The values **INFO**, **WARN**, **FAIL** are accepcted. 22 | * `incompleteSourcesSeverity`: Specifies the behavior for incomplete source JAR. The values **INFO**, **WARN**, **FAIL** are accepcted. -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | > Please provide a summary of your changes here. 2 | > * Which issue is this pull request belonging to? (*Refer to issue here*) 3 | > * How is it solving the issue? 4 | > * Did you add or update any new dependencies that are required for your change? 5 | 6 | ### Request Reviewer 7 | > You can add desired reviewers here with an @mention. 8 | 9 | ### Type of Change 10 | > Mention one of the following: 11 | > bug fix | new feature | improvements | documentation update | CI | Other 12 | 13 | *Type of change*: 14 | 15 | ### How Has This Been Tested? 16 | > If you have added any changes that require additional tests, or changes in tests, you should implement them and describe them here. 17 | > All test that passed before your contribution should pass after it as well. 18 | 19 | ### Checklist 20 | Must: 21 | - [ ] All related issues are referenced in commit messages 22 | 23 | Optional: *(delete if not applicable)* 24 | - [ ] I have provided tests for the changes (if there are changes that need additional tests) 25 | - [ ] I have updated the documentation accordingly to my changes 26 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/api/IXMLResolver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2016-2017. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | 12 | package org.eclipse.sw360.antenna.api; 13 | 14 | import org.eclipse.sw360.antenna.api.exceptions.ConfigurationException; 15 | import org.eclipse.sw360.antenna.model.xml.generated.AntennaConfig; 16 | 17 | import java.io.File; 18 | 19 | /** 20 | * Resolves a xml file. 21 | */ 22 | public interface IXMLResolver { 23 | /** 24 | * Resolves a xml file. 25 | * 26 | * @param file 27 | * @return AntennaConfig with the values of the file. Null if file cannot be 28 | * opened. 29 | * @throws ConfigurationException If file does not contain a valid content 30 | */ 31 | AntennaConfig resolveXML(File file); 32 | } 33 | -------------------------------------------------------------------------------- /modules/sw360/sw360-client/src/main/java/org/eclipse/sw360/antenna/sw360/client/rest/resource/licenses/SW360LicenseList.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2018. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.sw360.client.rest.resource.licenses; 12 | 13 | import org.eclipse.sw360.antenna.sw360.client.rest.resource.LinkObjects; 14 | import org.eclipse.sw360.antenna.sw360.client.rest.resource.SW360HalResource; 15 | 16 | public class SW360LicenseList extends SW360HalResource { 17 | 18 | @Override 19 | public LinkObjects createEmptyLinks() { 20 | return new LinkObjects(); 21 | } 22 | 23 | @Override 24 | public SW360LicenseListEmbedded createEmptyEmbedded() { 25 | return new SW360LicenseListEmbedded(); 26 | } 27 | } -------------------------------------------------------------------------------- /core/core-workflow-steps/src/main/java/org/eclipse/sw360/antenna/workflow/generators/HTMLReportUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2019. 3 | * Copyright (c) Bosch.IO GmbH 2020. 4 | * 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the Eclipse Public License v2.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.eclipse.org/legal/epl-v20.html 9 | * 10 | * SPDX-License-Identifier: EPL-2.0 11 | */ 12 | package org.eclipse.sw360.antenna.workflow.generators; 13 | 14 | import org.apache.commons.text.StringEscapeUtils; 15 | import org.eclipse.sw360.antenna.model.license.License; 16 | 17 | public class HTMLReportUtils { 18 | private HTMLReportUtils() { 19 | // Utility class 20 | } 21 | 22 | public static String getLicenseAsHtmlListItem(License license) { 23 | return String.format("
  • %s
  • ", 24 | StringEscapeUtils.escapeHtml4(license.getId()), 25 | StringEscapeUtils.escapeHtml4(license.getId())); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /modules/sw360/sw360-client/src/main/java/org/eclipse/sw360/antenna/sw360/client/rest/resource/projects/SW360ProjectList.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2018. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.sw360.client.rest.resource.projects; 12 | 13 | import org.eclipse.sw360.antenna.sw360.client.rest.resource.LinkObjects; 14 | import org.eclipse.sw360.antenna.sw360.client.rest.resource.SW360HalResource; 15 | 16 | public class SW360ProjectList extends SW360HalResource { 17 | 18 | @Override 19 | public LinkObjects createEmptyLinks() { 20 | return new LinkObjects(); 21 | } 22 | 23 | @Override 24 | public SW360ProjectListEmbedded createEmptyEmbedded() { 25 | return new SW360ProjectListEmbedded(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /modules/sw360/sw360-client/src/main/java/org/eclipse/sw360/antenna/sw360/client/rest/resource/releases/SW360ReleaseList.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2018. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.sw360.client.rest.resource.releases; 12 | 13 | import org.eclipse.sw360.antenna.sw360.client.rest.resource.LinkObjects; 14 | import org.eclipse.sw360.antenna.sw360.client.rest.resource.SW360HalResource; 15 | 16 | public class SW360ReleaseList extends SW360HalResource { 17 | 18 | @Override 19 | public LinkObjects createEmptyLinks() { 20 | return new LinkObjects(); 21 | } 22 | 23 | @Override 24 | public SW360ReleaseListEmbedded createEmptyEmbedded() { 25 | return new SW360ReleaseListEmbedded(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/api/IConfigReader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2016-2017. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | 12 | package org.eclipse.sw360.antenna.api; 13 | 14 | import org.eclipse.sw360.antenna.model.Configuration; 15 | 16 | import java.io.File; 17 | import java.net.URI; 18 | import java.nio.file.Path; 19 | 20 | /** 21 | * Reads a given config file (uri or File) and returns a Configuration. The 22 | * config file is written to the targetDirectory as backup. The 23 | * processingReporter can be used to keep track of the configuration. 24 | * IConfigReader 25 | */ 26 | public interface IConfigReader { 27 | Configuration readConfigFromFile(File configFile, Path targetDirectory); 28 | Configuration readConfigFromUri(URI configFileUri, Path targetDirectory); 29 | } 30 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/model/util/ClassCodeSourceLocation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2019. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.model.util; 12 | 13 | import java.io.File; 14 | import java.net.URI; 15 | import java.net.URISyntaxException; 16 | 17 | public class ClassCodeSourceLocation { 18 | public static String getClassCodeSourceLocationAsString(Class clazz) throws URISyntaxException { 19 | URI codeSourceLocationUri = getClassCodeSourceLocationURI(clazz); 20 | return new File(codeSourceLocationUri).getPath(); 21 | } 22 | 23 | public static URI getClassCodeSourceLocationURI(Class clazz) throws URISyntaxException { 24 | return clazz.getProtectionDomain().getCodeSource().getLocation().toURI(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /assembly/maven-plugin/src/main/resources/log4j2.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) Bosch Software Innovations GmbH 2016. 3 | # Copyright (c) Bosch.IO GmbH 2020. 4 | # 5 | # All rights reserved. This program and the accompanying materials 6 | # are made available under the terms of the Eclipse Public License v2.0 7 | # which accompanies this distribution, and is available at 8 | # http://www.eclipse.org/legal/epl-v20.html 9 | # 10 | # SPDX-License-Identifier: EPL-2.0 11 | # 12 | 13 | # This is a basic log4j configuration file defining a pretty plain logging 14 | # format. It is used by artifacts integrated in build tools or other systems, 15 | # so that the logging output generated by them fits to the overall format. 16 | # Other assemblies can provide their specific logging configuration to enable 17 | # features, e.g. an advanced layout. 18 | name = PropertiesConfig 19 | 20 | appenders = console 21 | 22 | appender.console.type = Console 23 | appender.console.name = STDOUT 24 | appender.console.layout.type = PatternLayout 25 | 26 | rootLogger.level = info 27 | rootLogger.appenderRefs = stdout 28 | rootLogger.appenderRef.stdout.ref = STDOUT 29 | -------------------------------------------------------------------------------- /core/frontend-stubs/gradle-frontend-stub/src/main/java/org/eclipse/sw360/antenna/frontend/stub/gradle/AntennaGradlePlugin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2018. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.frontend.stub.gradle; 12 | 13 | import org.gradle.api.DefaultTask; 14 | import org.gradle.api.Plugin; 15 | import org.gradle.api.Project; 16 | 17 | public abstract class AntennaGradlePlugin implements Plugin { 18 | public static final String TASK_NAME = "analyze"; 19 | 20 | public abstract Class getTaskClass(); 21 | 22 | @Override 23 | public void apply(Project target) { 24 | target.getExtensions().create("AntennaConfiguration", AntennaExtension.class); 25 | target.getTasks().create(TASK_NAME, getTaskClass()); 26 | } 27 | 28 | } 29 | 30 | -------------------------------------------------------------------------------- /example-projects/basic-test-project/src/antennaconf2.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 15 | 16 | 17 | commons-lang-2.0.jar 18 | 19 | 20 | 21 | 22 | 23 | commons-lang-2.0.jar 24 | 25 | 26 | Apache-2.0 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/model/artifact/facts/ArtifactClearingDocument.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch.IO GmbH 2020. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.model.artifact.facts; 12 | 13 | import org.eclipse.sw360.antenna.model.artifact.ArtifactFact; 14 | import org.eclipse.sw360.antenna.model.artifact.ArtifactFactWithPayload; 15 | 16 | import java.nio.file.Path; 17 | 18 | public class ArtifactClearingDocument extends ArtifactFactWithPayload { 19 | public ArtifactClearingDocument(Path payload) { 20 | super(payload); 21 | } 22 | 23 | @Override 24 | public String getFactContentName() { 25 | return "Clearing document"; 26 | } 27 | 28 | @Override 29 | public Class getKey() { 30 | return ArtifactClearingDocument.class; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /antenna-documentation/src/site/markdown/processors/match-state-validator.md: -------------------------------------------------------------------------------- 1 | ## Match State validator 2 | The Match State validator checks the `MatchState` of each artifact. Based on the configuration, 3 | the validator can affect the build for `MatchState.SIMILAR` and `MatchState.UNKNOWN`. The `MatchState` 4 | specifies the equality between the binary JAR of the artifact and the JAR in the database e.g. SW360. 5 | 6 | ### HowTo use 7 | Add the following step into the `` section of your workflow.xml 8 | 9 | ``` 10 | 11 | Match State Validator 12 | org.eclipse.sw360.antenna.validators.workflow.processors.MatchStateValidator 13 | 14 | 15 | 16 | 17 | 18 | ``` 19 | 20 | #### Explanation of parameters 21 | * `severityOfSIMILAR`: Specifies the behavior for `MatchState.SIMILAR`. The values **INFO**, **WARN**, **FAIL** are accepcted. 22 | * `severityOfUNKNOWN`: Specifies the behavior for `MatchState.UNKNOWN`. The values **INFO**, **WARN**, **FAIL** are accepcted. -------------------------------------------------------------------------------- /core/model/src/test/java/org/eclipse/sw360/antenna/model/test/ReportTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2013,2016-2017. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.model.test; 12 | 13 | import org.eclipse.sw360.antenna.model.reporting.MessageType; 14 | import org.eclipse.sw360.antenna.model.reporting.ProcessingMessage; 15 | import org.eclipse.sw360.antenna.model.reporting.Report; 16 | import org.junit.Test; 17 | 18 | import static org.assertj.core.api.Assertions.assertThat; 19 | 20 | public class ReportTest { 21 | 22 | @Test 23 | public void test() { 24 | Report report = new Report(); 25 | ProcessingMessage msg = new ProcessingMessage(MessageType.PROCESSING_FAILURE, "msg"); 26 | report.add(msg); 27 | assertThat(report.getMessageList().get(0)).isEqualTo(msg); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/api/workflow/AbstractGenerator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2016-2017. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.api.workflow; 12 | 13 | import org.eclipse.sw360.antenna.api.IAttachable; 14 | import org.eclipse.sw360.antenna.api.exceptions.ExecutionException; 15 | import org.eclipse.sw360.antenna.model.artifact.Artifact; 16 | 17 | import java.util.Collection; 18 | import java.util.Map; 19 | 20 | public abstract class AbstractGenerator extends ConfigurableWorkflowItem { 21 | public Map produce(ProcessingState previousState) throws ExecutionException { 22 | return produce(previousState.getArtifacts()); 23 | } 24 | 25 | public abstract Map produce(Collection intermediates) throws ExecutionException; 26 | } 27 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/model/artifact/facts/ArtifactSourceFile.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2018. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | 12 | package org.eclipse.sw360.antenna.model.artifact.facts; 13 | 14 | import org.eclipse.sw360.antenna.model.artifact.ArtifactFact; 15 | import org.eclipse.sw360.antenna.model.artifact.ArtifactFactWithPayload; 16 | 17 | import java.nio.file.Path; 18 | 19 | public class ArtifactSourceFile extends ArtifactFactWithPayload { 20 | public ArtifactSourceFile(Path sourceFile) { 21 | super(sourceFile.normalize()); 22 | } 23 | 24 | @Override 25 | public String getFactContentName() { 26 | return "Source File"; 27 | } 28 | 29 | @Override 30 | public Class getKey() { 31 | return ArtifactSourceFile.class; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /modules/policy/engine-testing/src/test/java/org/eclipse/sw360/antenna/policy/testing/rules/TestRuleset.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2019. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.policy.testing.rules; 12 | 13 | import org.eclipse.sw360.antenna.policy.engine.Rule; 14 | import org.eclipse.sw360.antenna.policy.engine.Ruleset; 15 | 16 | import java.util.Arrays; 17 | import java.util.Collection; 18 | 19 | public class TestRuleset implements Ruleset { 20 | @Override 21 | public String getName() { 22 | return "Test Ruleset"; 23 | } 24 | 25 | @Override 26 | public String getVersion() { 27 | return "1"; 28 | } 29 | 30 | @Override 31 | public Collection getRules() { 32 | return Arrays.asList(new CheckForGPL(this), new CheckDifferentCoordinates(this)); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /modules/policy/engine/src/test/java/org/eclipse/sw360/antenna/policy/engine/testdata/TestRuleset.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2019. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.policy.engine.testdata; 12 | 13 | import org.eclipse.sw360.antenna.policy.engine.Rule; 14 | import org.eclipse.sw360.antenna.policy.engine.Ruleset; 15 | 16 | import java.util.Arrays; 17 | import java.util.Collection; 18 | 19 | public class TestRuleset implements Ruleset { 20 | @Override 21 | public String getName() { 22 | return "TestRuleset"; 23 | } 24 | 25 | @Override 26 | public String getVersion() { 27 | return "1.0.0"; 28 | } 29 | 30 | @Override 31 | public Collection getRules() { 32 | return Arrays.asList(new AlwaysViolationRule(this), new NeverViolationRule(this)); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /example-projects/p2-example-tycho-project/documentation.md: -------------------------------------------------------------------------------- 1 | ## The P2 example project 2 | 3 | The example project demonstrates a common workflow for writing an eclipse product: 4 | - All dependencies are gathered in a single dependency project which is run prebuilt and outputs a repository. 5 | - The build then generates a second repository which contains everything necessary to run the product. 6 | 7 | In addition, there are several optional ideas that are not used in the example project: 8 | - In order to define the dependencies, the project could define a target platform which uses the dependency project for resolution, defining the runtime as well as the development environment. 9 | - In order to define the deployment, features and/or products may be defined directly and then just deployed in the repository using the category.xml file instead of deploying the artifacts directly. 10 | 11 | ## Building the project 12 | 13 | - In the project folder, call `mvn package` (or any maven lifecycle step). 14 | 15 | This will then use the repository created in the `dependency_project` as source. It will also create a "deployment" repository in the subfolder `repository/target`. 16 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright (c) Bosch.IO GmbH 2020. 2 | # 3 | # All rights reserved. This program and the accompanying materials 4 | # are made available under the terms of the Eclipse Public License v2.0 5 | # which accompanies this distribution, and is available at 6 | # http://www.eclipse.org/legal/epl-v20.html 7 | # 8 | # SPDX-License-Identifier: EPL-2.0 9 | 10 | # 11 | # Build stage 12 | # 13 | FROM maven:3.5.0-jdk-8-alpine AS ANTENNA_MAVEN_BUILD 14 | 15 | RUN apk update && apk add git zip 16 | 17 | COPY . /home/antenna/ 18 | WORKDIR /home/antenna/ 19 | RUN mkdir /maven 20 | 21 | ARG COMMIT=master 22 | RUN git checkout -f ${COMMIT} 23 | 24 | RUN mvn -B -e -Dmaven.repo.local=/maven install -DskipTests=true -Dskip.pmd=true 25 | 26 | # 27 | # Package stage 28 | # 29 | FROM openjdk:8-jre-slim 30 | WORKDIR ../.. 31 | COPY --from=ANTENNA_MAVEN_BUILD /home/antenna/assembly/cli/target/antenna.jar /usr/local/lib/antenna.jar 32 | 33 | COPY /example-projects/example-project/pom.xml /antenna/antennaConfiguration.xml 34 | COPY /example-projects/example-project/src /antenna/src 35 | 36 | ENTRYPOINT ["java", "-jar", "/usr/local/lib/antenna.jar"] 37 | CMD ["/antenna/antennaConfiguration.xml"] 38 | -------------------------------------------------------------------------------- /modules/policy/engine/src/test/java/org/eclipse/sw360/antenna/policy/workflow/processors/testdata/TestCompareRuleset.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2019. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.policy.workflow.processors.testdata; 12 | 13 | import org.eclipse.sw360.antenna.policy.engine.Rule; 14 | import org.eclipse.sw360.antenna.policy.engine.Ruleset; 15 | 16 | import java.util.Arrays; 17 | import java.util.Collection; 18 | 19 | public class TestCompareRuleset implements Ruleset { 20 | @Override 21 | public String getName() { 22 | return "TestCompareRuleset"; 23 | } 24 | 25 | @Override 26 | public String getVersion() { 27 | return "2.0.0"; 28 | } 29 | 30 | @Override 31 | public Collection getRules() { 32 | return Arrays.asList(new EPLvsGPLRule(this)); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /modules/policy/engine/src/test/java/org/eclipse/sw360/antenna/policy/workflow/processors/testdata/TestSingleRuleset.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2019. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.policy.workflow.processors.testdata; 12 | 13 | import org.eclipse.sw360.antenna.policy.engine.Rule; 14 | import org.eclipse.sw360.antenna.policy.engine.Ruleset; 15 | 16 | import java.util.Arrays; 17 | import java.util.Collection; 18 | 19 | public class TestSingleRuleset implements Ruleset { 20 | @Override 21 | public String getName() { 22 | return "TestSingleRuleset"; 23 | } 24 | 25 | @Override 26 | public String getVersion() { 27 | return "1.0.0"; 28 | } 29 | 30 | @Override 31 | public Collection getRules() { 32 | return Arrays.asList(new UnknownArtifactRule(this)); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /core/runtime/src/main/java/org/eclipse/sw360/antenna/frontend/MetaDataStoringProject.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2019. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.frontend; 12 | 13 | import org.eclipse.sw360.antenna.api.IProject; 14 | 15 | import java.io.File; 16 | 17 | public abstract class MetaDataStoringProject implements IProject { 18 | protected File propertiesFile; 19 | 20 | public abstract void setProjectId(String id); 21 | public abstract void setVersion(String version); 22 | public abstract Build getBuild(); 23 | 24 | public String getArtifactId() { 25 | return getProjectId(); 26 | } 27 | 28 | public File getPropertiesFile() { 29 | return propertiesFile; 30 | } 31 | 32 | public void setPropertiesFile(File propertiesFile) { 33 | this.propertiesFile = propertiesFile; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/frontend-stubs/gradle-frontend-stub/src/main/java/org/eclipse/sw360/antenna/frontend/stub/gradle/AntennaExtension.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2018. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.frontend.stub.gradle; 12 | 13 | public class AntennaExtension { 14 | private String toolConfigurationPath; 15 | 16 | private String propertiesFilePath; 17 | 18 | public String getToolConfigurationPath() { 19 | return toolConfigurationPath; 20 | } 21 | 22 | public void setToolConfigurationPath(String toolConfigurationPath) { 23 | this.toolConfigurationPath = toolConfigurationPath; 24 | } 25 | 26 | public String getPropertiesFilePath() { 27 | return propertiesFilePath; 28 | } 29 | 30 | public void setPropertiesFilePath(String propertiesFilePath) { 31 | this.propertiesFilePath = propertiesFilePath; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/model/reporting/Report.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2016-2017. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | 12 | package org.eclipse.sw360.antenna.model.reporting; 13 | 14 | import java.util.ArrayList; 15 | import java.util.Collections; 16 | import java.util.List; 17 | 18 | /** 19 | * Report for processingMessages. 20 | */ 21 | public class Report { 22 | private final List messageList = Collections.synchronizedList(new ArrayList<>()); 23 | 24 | /** 25 | * Add the given ProcessingMessage to this report. 26 | * 27 | * @param msg 28 | */ 29 | public void add(ProcessingMessage msg) { 30 | synchronized (messageList) { 31 | messageList.add(msg); 32 | } 33 | } 34 | 35 | public List getMessageList() { 36 | return messageList; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /modules/policy/engine/src/main/java/org/eclipse/sw360/antenna/policy/engine/SingleArtifactRule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2019. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.policy.engine; 12 | 13 | import org.eclipse.sw360.antenna.policy.engine.model.ThirdPartyArtifact; 14 | 15 | import java.util.Optional; 16 | 17 | /** 18 | * {@link Rule} type that iterates through all {@link ThirdPartyArtifact} objects and allows to define 19 | * a local property check on the associated metadata. 20 | */ 21 | public interface SingleArtifactRule extends Rule { 22 | /** 23 | * @param thirdPartyArtifact The {@link ThirdPartyArtifact} for which a property check is executed 24 | * @return {@link PolicyViolation} as {@link Optional}, if a policy violation is found an empty Optional if not 25 | */ 26 | Optional evaluate(ThirdPartyArtifact thirdPartyArtifact); 27 | } 28 | -------------------------------------------------------------------------------- /core/runtime/src/test/java/org/eclipse/sw360/antenna/xml/XMLResolverTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2013,2016-2017. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.xml; 12 | 13 | import org.eclipse.sw360.antenna.model.xml.generated.AntennaConfig; 14 | import org.junit.Test; 15 | 16 | import java.io.File; 17 | import java.net.URISyntaxException; 18 | import java.net.URL; 19 | import java.nio.charset.StandardCharsets; 20 | 21 | import static org.assertj.core.api.Assertions.assertThat; 22 | 23 | public class XMLResolverTest { 24 | 25 | @Test 26 | public void test() throws URISyntaxException { 27 | XMLResolverJaxB resolver = new XMLResolverJaxB(StandardCharsets.UTF_8); 28 | URL xml = resolver.getClass().getResource("/antennaconf.xml"); 29 | AntennaConfig config = resolver.resolveXML(new File(xml.toURI())); 30 | assertThat(config).isNotNull(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /modules/policy/engine/src/test/java/org/eclipse/sw360/antenna/policy/engine/testdata/FailingRuleset.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2019. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.policy.engine.testdata; 12 | 13 | import org.eclipse.sw360.antenna.policy.engine.Rule; 14 | import org.eclipse.sw360.antenna.policy.engine.Ruleset; 15 | 16 | import java.util.Arrays; 17 | import java.util.Collection; 18 | 19 | public class FailingRuleset implements Ruleset { 20 | @Override 21 | public String getName() { 22 | return "FailingRuleset"; 23 | } 24 | 25 | @Override 26 | public String getVersion() { 27 | return "1.0.0"; 28 | } 29 | 30 | @Override 31 | public Collection getRules() { 32 | return Arrays.asList(new AlwaysViolationRule(this), 33 | new NeverViolationRule(this), 34 | new TestRule(this)); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /modules/sw360/sw360-client/src/main/java/org/eclipse/sw360/antenna/sw360/client/rest/resource/attachments/SW360AttachmentCheckStatus.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2019. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.sw360.client.rest.resource.attachments; 12 | 13 | public enum SW360AttachmentCheckStatus { 14 | NOTCHECKED(0), 15 | ACCEPTED(1), 16 | REJECTED(2); 17 | 18 | private final int value; 19 | 20 | SW360AttachmentCheckStatus(int value) { 21 | this.value = value; 22 | } 23 | 24 | public int getValue() { 25 | return this.value; 26 | } 27 | 28 | public static SW360AttachmentCheckStatus findByValue(int value) { 29 | switch (value) { 30 | case 2: 31 | return REJECTED; 32 | case 1: 33 | return ACCEPTED; 34 | default: 35 | return NOTCHECKED; 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/model/artifact/facts/MissingLicenseReasons.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2019. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | 12 | package org.eclipse.sw360.antenna.model.artifact.facts; 13 | 14 | 15 | public enum MissingLicenseReasons { 16 | NOT_DECLARED("No license was declared by the project or a declared license could not be found."), 17 | NO_SOURCES("No sources provided hence licenses cannot be found."), 18 | NO_LICENSE_IN_SOURCES("Sources are provided but do not contain license headers."), 19 | NOT_PROVIDED("No license was specified."), 20 | NOT_SUPPORTED("Retrieving license information failed for this component"), 21 | NON_STANDARD("Configured license is of non-standard threat-group"); 22 | 23 | public final String prettyPrintReason; 24 | 25 | MissingLicenseReasons(String prettyPrintReason) { 26 | this.prettyPrintReason = prettyPrintReason; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/model/artifact/facts/ArtifactChangeStatus.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2019. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.model.artifact.facts; 12 | 13 | import org.eclipse.sw360.antenna.model.artifact.ArtifactFact; 14 | import org.eclipse.sw360.antenna.model.artifact.ArtifactFactWithPayload; 15 | 16 | 17 | public class ArtifactChangeStatus extends ArtifactFactWithPayload { 18 | 19 | public ArtifactChangeStatus(ChangeStatus changeStatus) { 20 | super(changeStatus); 21 | } 22 | 23 | @Override 24 | public String getFactContentName() { 25 | return "Change Status"; 26 | } 27 | 28 | @Override 29 | public Class getKey() { 30 | return ArtifactChangeStatus.class; 31 | } 32 | 33 | public enum ChangeStatus { 34 | CHANGED, 35 | AS_IS, 36 | } 37 | 38 | } -------------------------------------------------------------------------------- /modules/policy/engine/src/main/java/org/eclipse/sw360/antenna/policy/engine/model/LicenseState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2019. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.policy.engine.model; 12 | 13 | /** 14 | * This enumeration allows to differentiate between the different kinds of license information, i.e., it distinguishes 15 | * between no license information, only declared license information (no analysis of artifact source to identify 16 | * observed licenses), only observed (no declaration of license found), a deducted license expression out of 17 | * declared and observed (sufficient for simple cases and consistent findings), or, a explicitly set license (in case 18 | * of an unclear situation and a manual overwrite by an open source expert). 19 | */ 20 | public enum LicenseState { 21 | NO_LICENSE, 22 | DECLARED_ONLY, 23 | OBSERVED_ONLY, 24 | DECLARED_AND_OBSERVED, 25 | EXPLICITLY_SET 26 | } 27 | -------------------------------------------------------------------------------- /modules/sw360/sw360-client/src/test/java/org/eclipse/sw360/antenna/sw360/client/rest/resource/attachments/SW360AttachmentTypeTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch.IO GmbH 2020. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.sw360.client.rest.resource.attachments; 12 | 13 | import org.junit.Test; 14 | 15 | import static org.assertj.core.api.Assertions.assertThat; 16 | 17 | public class SW360AttachmentTypeTest { 18 | @Test 19 | public void testFindByValue() { 20 | for (SW360AttachmentType attachmentType : SW360AttachmentType.values()) { 21 | SW360AttachmentType result = SW360AttachmentType.findByValue(attachmentType.getValue()); 22 | assertThat(result).isEqualTo(attachmentType); 23 | } 24 | } 25 | 26 | @Test 27 | public void testFindByValueUnknown() { 28 | SW360AttachmentType result = SW360AttachmentType.findByValue(-1); 29 | 30 | assertThat(result).isEqualTo(SW360AttachmentType.OTHER); 31 | } 32 | } -------------------------------------------------------------------------------- /assembly/README.md: -------------------------------------------------------------------------------- 1 | # assembly 2 | 3 | This part of Antenna demonstrates how an organization would compile its own assembly. 4 | It is build to contain a Maven plugin frontend and a CLI frontend which can be distributed via an artifact repository. 5 | 6 | ### How to use the assembly 7 | You can use the generated artifacts as 8 | - a maven plugin by referencing using the following code in a pom: 9 | ```xml 10 | 11 | org.eclipse.sw360.antenna 12 | antenna-maven-plugin 13 | ${org.eclipse.sw360.antenna.version} 14 | 15 | 16 | 17 | 18 | 19 | ``` 20 | or 21 | - a CLI interface by using the generated `jar` file in the `antenna-cli`-module. 22 | 23 | ### How to build your own personalized assembly 24 | Copy the module `assembly` to your own location. Then you can modify the `configuration` to match your needs, e.g. provide your set of WorkflowSteps as dependencies and your default workflow configuration. 25 | To adopt the names of the modules you should prepend every module name with `"-"`. 26 | -------------------------------------------------------------------------------- /modules/policy/engine/src/main/java/org/eclipse/sw360/antenna/policy/engine/RuleExecutor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2019. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.policy.engine; 12 | 13 | import org.eclipse.sw360.antenna.policy.engine.model.ThirdPartyArtifact; 14 | 15 | import java.util.Collection; 16 | 17 | /** 18 | * Interface that implements an executor that goes through all {@link Rule} instances of the corresponding type and 19 | * applies the rule on the available data. The design pattern is, that every type of rules has a corresponding executor. 20 | * The rule is reduced to a function that checks a condition. If the condition is false, the rule returns a 21 | * {@link PolicyViolation} that allows the executor to identify failing artifacts. 22 | */ 23 | interface RuleExecutor { 24 | Collection executeRules(Collection thirdPartyArtifacts); 25 | 26 | Collection getRulesets(); 27 | } 28 | -------------------------------------------------------------------------------- /modules/sw360/sw360-client/src/test/resources/__files/release.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "akka-actor_2.11", 3 | "version": "2.4.12", 4 | "externalIds": { 5 | "hash_1": "501887b9053ef9f4341a", 6 | "maven": "pkg:maven/com.typesafe.akka/akka-actor_2.11@2.4.12" 7 | }, 8 | "createdOn": "2019-11-13", 9 | "createdBy": "osi9be@bosch.com", 10 | "eccInformation": { 11 | "eccStatus": "OPEN" 12 | }, 13 | "_links": { 14 | "sw360:component": { 15 | "href": "https://sw360.test.com/resource/api/components/xxxxxxyyyyyzzzzz7b" 16 | }, 17 | "self": { 18 | "href": "https://sw360.test.com/resource/api/releases/xxxxxxyyyyyzzzzza4" 19 | }, 20 | "curies": [ 21 | { 22 | "href": "https://sw360.test.com/resource/docs/{rel}.html", 23 | "name": "sw360", 24 | "templated": true 25 | } 26 | ] 27 | }, 28 | "_embedded": { 29 | "sw360:attachments": [ 30 | { 31 | "filename": "artifact-sources.jar", 32 | "sha1": "9fa75ed24ee85514f63046a39697509c78f536de", 33 | "attachmentType": "SOURCE", 34 | "_links": { 35 | "self": { 36 | "href": "https://sw360.test.com/resource/api/attachments/xxxxxxxxxxxyyyyyyyyyyyyyzzz235b" 37 | } 38 | } 39 | } 40 | ] 41 | } 42 | } -------------------------------------------------------------------------------- /core/frontend-stubs/pom.xml: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 4.0.0 15 | 16 | org.eclipse.sw360.antenna 17 | antenna-management 18 | ${revision} 19 | ../../ 20 | 21 | 22 | frontend-stubs 23 | antenna-frontend-stubs 24 | pom 25 | 26 | 27 | cli-frontend-stub 28 | gradle-frontend-stub 29 | maven-frontend-stub 30 | 31 | 32 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/api/workflow/AbstractProcessor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2016-2017. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.api.workflow; 12 | 13 | import org.eclipse.sw360.antenna.api.exceptions.ExecutionException; 14 | import org.eclipse.sw360.antenna.model.artifact.Artifact; 15 | 16 | import java.util.Collection; 17 | 18 | public abstract class AbstractProcessor extends ConfigurableWorkflowItem { 19 | final public WorkflowStepResult process(ProcessingState previousState) throws ExecutionException { 20 | WorkflowStepResult newResult = new WorkflowStepResult(process(previousState.getArtifacts())); 21 | return postProcessResult(newResult); 22 | } 23 | 24 | public abstract Collection process(Collection intermediates) throws ExecutionException; 25 | 26 | public WorkflowStepResult postProcessResult(WorkflowStepResult result) { 27 | return result; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /example-projects/p2-example-project/src/antennaconf.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | SomeBundle 19 | 20 | 21 | EPL 2.0 22 | 23 | 24 | false 25 | EXACT 26 | Copyright 2019 Some Very Arbitrary Guy 27 | 28 | some_bundle 29 | 0.0.1.201902181544 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /assembly/compliance-tool/src/site/markdown/exporter.md: -------------------------------------------------------------------------------- 1 | ## SW360 Exporter 2 | 3 | The SW360 Exporter requests all components from a given SW360 instance 4 | and filters the releases of the components to check if they have a state 5 | that shows them as "cleared" or "approved". 6 | It then creates a list with the data of non-cleared releases and writes them 7 | sorted by creation date (from latest to oldest) in a csv file. 8 | 9 | The csv file follows the csv format accepted by the [CSV Analyzer](../analyzers/csv-analyzer-step.html). 10 | 11 | Should there already be a csv file of the same name in the target directory, 12 | the SW360 Exporter will overwrite it. 13 | 14 | ### Properties 15 | Sources specific properties: 16 | 17 | - `sourcesDirectory`: Directory where the sources downloaded are stored 18 | - `removeUnreferencedSources`: A boolean property that controls whether the exporter should do some cleanup on the sources directory. If set to *true*, the exporter checks after the download of sources whether the directory contains any files that are not referenced by any of the components that have been written to the CSV file. Such files are then removed, so that the directory contains only the sources of components that are currently in focus. The default value of this flag if *false*. -------------------------------------------------------------------------------- /core/core-workflow-steps/src/test/resources/CsvAnalyzerTest/dependencies.csv: -------------------------------------------------------------------------------- 1 | Artifact Id,Group Id,Version,Coordinate Type,Effective License,Declared License,Observed License,Copyrights,Hash,Source URL,Release Tag URL,Software Heritage ID,Clearing State,Clearing Document,Change Status,CPE,File Name 2 | commons-csv,org.apache.commons,1.4,mvn,Apache-2.0,Apache-2.0,Apache-2.0 OR MIT,Copyright 2005-2016 The Apache Software Foundation,620580a88953cbcf4528459e485054e7c27c0889,http://archive.apache.org/dist/commons/csv/source/commons-csv-1.4-src.zip,https://github.com/apache/commons-csv/tree/csv-1.4,swh:1:cnt:60dbac0aafd98c9ca461256a0cefd8a7aaea8bda,OSM_APPROVED,CsvAnalyzerTest/clearing.json,AS_IS,cpe:2.3:a:apache:commons-csv:1.4, 3 | commons-cli,org.apache.commons,1.4,maven,Apache-2.0,Apache-2.0,,Copyright 2005-2016 The Apache Software Foundation,2a26e60c745cdeb99a96f21adec508f43b5d25a5,http://archive.apache.org/dist/commons/cli/source/commons-cli-1.4-src.zip,https://github.com/apache/commons-cli/tree/cli-1.4,swh:1:cnt:fb91f0e6b0e7b2f89fe5e1a2b1b375775e4839d4,OSM_APPROVED,non-existing-clearing.json,AS_IS,cpe:2.3:a:apache:commons-cli:1.4,commons-cli.jar 4 | testNuget,,1.0,nuget,,,,,,,,,,,,, 5 | testDotNet,,1.0,dotnet,,,,,,,,,,,,, 6 | testNpm,test,1.0,npm,,,,,,,,,,,,, 7 | testbundle ,,1.0,bundle,,,,,,,,,,,,, 8 | testPython,,1.0,PYPI,,,,,,,,,,,,, 9 | -------------------------------------------------------------------------------- /http-support/src/main/java/org/eclipse/sw360/antenna/http/HttpClientFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch.IO GmbH 2020. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.http; 12 | 13 | import org.eclipse.sw360.antenna.http.config.HttpClientConfig; 14 | 15 | /** 16 | *

    17 | * Definition of an interface that allows the creation of an {@link HttpClient} 18 | * object. 19 | *

    20 | *

    21 | * This interface defines a factory method that can be used to create new, 22 | * fully configured instances of {@link HttpClient}. The new instances are 23 | * created based on a configuration object. 24 | *

    25 | */ 26 | public interface HttpClientFactory { 27 | /** 28 | * Creates a new instance of {@code HttpClient} and configures it 29 | * according to the passed in configuration object. 30 | * 31 | * @param config the configuration for the new client 32 | * @return the new {@code HttpClient} instance 33 | */ 34 | HttpClient newHttpClient(HttpClientConfig config); 35 | } 36 | -------------------------------------------------------------------------------- /modules/policy/engine-testing/src/test/resources/features/T2_CheckDifferentCoordinates.feature: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) Bosch Software Innovations GmbH 2019. 3 | # 4 | # All rights reserved. This program and the accompanying materials 5 | # are made available under the terms of the Eclipse Public License v1.0 6 | # which accompanies this distribution, and is available at 7 | # http://www.eclipse.org/legal/epl-v20.html 8 | # 9 | # SPDX-License-Identifier: EPL-2.0 10 | # 11 | 12 | Feature: Check Multiple Coordinate Types 13 | In this test we do not allow components from different technologies in the same project 14 | 15 | Scenario: Artifacts from different technologies fail 16 | Given an artifact called "Maven" with 17 | | coordinates | pkg:maven/com.something/foo@1.0.0 | 18 | And an artifact called "Nuget" with 19 | | coordinates | pkg:nuget/bar@2.3.1 | 20 | When I use the rule "T2" 21 | Then all artifacts fail with policy id "T2" 22 | 23 | Scenario: Artifacts from same technology succeed 24 | Given an artifact called "Maven" with 25 | | coordinates | pkg:maven/com.something/foo@1.0.0 | 26 | And an artifact called "Maven2" with 27 | | coordinates | pkg:maven/com.something/bar@2.3.1 | 28 | When I use the rule "T2" 29 | Then no artifact fails 30 | 31 | 32 | -------------------------------------------------------------------------------- /modules/policy/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 16 | 4.0.0 17 | 18 | 19 | org.eclipse.sw360.antenna 20 | antenna-management 21 | ${revision} 22 | ../../ 23 | 24 | 25 | policy-module 26 | policy-module 27 | 28 | pom 29 | 30 | 31 | engine 32 | engine-testing 33 | basic-policies 34 | 35 | 36 | -------------------------------------------------------------------------------- /antenna-documentation/Jenkinsfile.eclipse.documentation: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2020. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | 12 | /* 13 | * This is an additional Jenkinsfile, for building the documentation 14 | * with the GitHub site-maven-plugin within the Eclipse Foundation infrastructure 15 | */ 16 | 17 | pipeline { 18 | agent any 19 | 20 | tools { 21 | maven 'apache-maven-latest' 22 | jdk 'adoptopenjdk-hotspot-jdk8-latest' 23 | } 24 | 25 | environment { 26 | GITHUB_CREDENTIALS = credentials('github-bot') 27 | } 28 | stages { 29 | stage('Configure Git') { 30 | steps { 31 | sh 'git config --global user.name "${GITHUB_CREDENTIALS_USR}"' 32 | sh 'git config --global user.email "${GITHUB_CREDENTIALS_USR}@eclipse.org"' 33 | } 34 | } 35 | stage('Site Deploy') { 36 | steps { 37 | sh 'antenna-documentation/scripts/main.sh' 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /assembly/pom.xml: -------------------------------------------------------------------------------- 1 | 13 | 14 | 15 | 4.0.0 16 | 17 | 18 | antenna-management 19 | org.eclipse.sw360.antenna 20 | ${revision} 21 | 22 | 23 | assembly 24 | pom 25 | Antenna assembly 26 | 27 | 28 | compliance-tool 29 | configuration 30 | cli 31 | maven-plugin 32 | gradle-plugin 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /modules/policy/basic-policies/src/test/resources/features/SWHSourceIdKnownRule.feature: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) Bosch Software Innovations GmbH 2019. 3 | # 4 | # All rights reserved. This program and the accompanying materials 5 | # are made available under the terms of the Eclipse Public License v1.0 6 | # which accompanies this distribution, and is available at 7 | # http://www.eclipse.org/legal/epl-v20.html 8 | # 9 | # SPDX-License-Identifier: EPL-2.0 10 | # 11 | 12 | Feature: Software Heritage link available 13 | Artifacts should have a link to the sources on software heritage. 14 | 15 | Scenario: Artifact without Software Heritage information fails the rule 16 | Given an artifact 17 | When I use the rule "SWHAvailable" 18 | Then the artifact should fail with policy id "SWHAvailable" 19 | 20 | Scenario: Proprietary artifact passes the rule 21 | Given an artifact with 22 | | proprietary | true | 23 | When I use the rule "SWHAvailable" 24 | Then no artifact fails on policy id "SWHAvailable" 25 | 26 | Scenario: Artifact with Software Heritage information pass the rule 27 | Given an artifact with 28 | | sources | swh:1:rel:22ece559cc7cc2364edc5e5593d63ae8bd229f9f | 29 | When I use the rule "SWHAvailable" 30 | Then no artifact fails on policy id "SWHAvailable" 31 | -------------------------------------------------------------------------------- /modules/policy/engine/src/main/java/org/eclipse/sw360/antenna/policy/engine/CompareArtifactRule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2019. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.policy.engine; 12 | 13 | import org.eclipse.sw360.antenna.policy.engine.model.ThirdPartyArtifact; 14 | 15 | import java.util.Optional; 16 | 17 | /** 18 | * {@link Rule} type that iterates through all {@link ThirdPartyArtifact} objects and allows to compare properties 19 | * of the artifact to the property of all other artifacts 20 | */ 21 | public interface CompareArtifactRule extends Rule { 22 | /** 23 | * @param leftArtifact Left side {@link ThirdPartyArtifact} of the comparison 24 | * @param rightArtifact Right side {@link ThirdPartyArtifact} of the comparison 25 | * @return {@link PolicyViolation} as {@link Optional}, if a policy violation is found an empty Optional if not 26 | */ 27 | Optional evaluate(ThirdPartyArtifact leftArtifact, ThirdPartyArtifact rightArtifact); 28 | } 29 | -------------------------------------------------------------------------------- /assembly/compliance-tool/src/main/java/org/eclipse/sw360/antenna/frontend/compliancetool/sw360/reporter/ReporterOutputFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch.IO GmbH 2020. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.frontend.compliancetool.sw360.reporter; 12 | 13 | /** 14 | * Factory class for creating a {@link ReporterOutput} implementation 15 | */ 16 | class ReporterOutputFactory { 17 | static final ReporterOutput DEFAULT_REPORTER_OUTPUT = new ReporterOutputCSV(); 18 | 19 | private ReporterOutputFactory() {} 20 | 21 | /** 22 | * create function to create an object implementing the {@link ReporterOutput} 23 | * 24 | * @param outputFormat String representation of the type of the object 25 | * @return {@link ReporterOutput} of the output format 26 | */ 27 | static ReporterOutput getReporterOutput(String outputFormat) { 28 | if (outputFormat.equalsIgnoreCase("csv")) { 29 | return new ReporterOutputCSV(); 30 | } 31 | return DEFAULT_REPORTER_OUTPUT; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /modules/sw360/sw360-client/src/main/java/org/eclipse/sw360/antenna/sw360/client/rest/resource/SW360Visibility.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2017-2018. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | 12 | package org.eclipse.sw360.antenna.sw360.client.rest.resource; 13 | 14 | public enum SW360Visibility { 15 | PRIVATE(0), ME_AND_MODERATORS(1), BUISNESSUNIT_AND_MODERATORS(2), EVERYONE(3); 16 | 17 | private final int value; 18 | 19 | SW360Visibility(int value) { 20 | this.value = value; 21 | } 22 | 23 | public int getValue() { 24 | return this.value; 25 | } 26 | 27 | public static SW360Visibility findByValue(int value) { 28 | switch (value) { 29 | case 0: 30 | return PRIVATE; 31 | case 1: 32 | return ME_AND_MODERATORS; 33 | case 2: 34 | return BUISNESSUNIT_AND_MODERATORS; 35 | case 3: 36 | return EVERYONE; 37 | default: 38 | return null; 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /example-projects/p2-example-tycho-project/antennaconf.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | SomeBundle 19 | 20 | 21 | EPL 2.0 22 | 23 | 24 | false 25 | EXACT 26 | Copyright 2019 Some Very Arbitrary Guy 27 | 28 | some_bundle 29 | 0.0.1.201904011221 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /modules/policy/engine/src/main/java/org/eclipse/sw360/antenna/policy/engine/Rule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2019. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.policy.engine; 12 | 13 | /** 14 | * Interface for a generic rule with the standard fields relevant for all policy rules. 15 | */ 16 | public interface Rule { 17 | /** 18 | * @return The business id of the rule defined by the policy responsible 19 | */ 20 | String getId(); 21 | 22 | /** 23 | * @return The business getName of the rule defined by the policy responsible 24 | */ 25 | String getName(); 26 | 27 | /** 28 | * @return The description given to the user of the policy in case of a policy violation 29 | */ 30 | String getDescription(); 31 | 32 | /** 33 | * @return The configured severity of a policy violation 34 | */ 35 | RuleSeverity getSeverity(); 36 | 37 | /** 38 | * @return The associated {@link Ruleset} from which the rule originates 39 | */ 40 | Ruleset getRuleset(); 41 | } 42 | -------------------------------------------------------------------------------- /core/model/src/test/java/org/eclipse/sw360/antenna/model/license/LicenseComparatorTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2013,2016-2017. 3 | * Copyright (c) Bosch.IO GmbH 2020. 4 | * 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the Eclipse Public License v2.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.eclipse.org/legal/epl-v20.html 9 | * 10 | * SPDX-License-Identifier: EPL-2.0 11 | */ 12 | package org.eclipse.sw360.antenna.model.license; 13 | 14 | import org.eclipse.sw360.antenna.model.util.LicenseComparator; 15 | import org.junit.Test; 16 | 17 | import static org.assertj.core.api.Assertions.assertThat; 18 | 19 | public class LicenseComparatorTest { 20 | 21 | @Test 22 | public void testCompare() { 23 | License license = new License(); 24 | license.setId("EPL-1.0"); 25 | license.setText(""); 26 | License compareLicense = new License(); 27 | compareLicense.setId("a"); 28 | LicenseComparator comparator = new LicenseComparator(); 29 | assertThat(comparator.compare(license, license)).isEqualTo(0); 30 | assertThat(comparator.compare(compareLicense, license)).isPositive(); 31 | assertThat(comparator.compare(license, compareLicense)).isNegative(); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /core/model/src/test/java/org/eclipse/sw360/antenna/model/license/LicenseOperatorTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch.IO GmbH 2020. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.model.license; 12 | 13 | import org.junit.Test; 14 | 15 | import static org.assertj.core.api.Assertions.assertThat; 16 | 17 | public class LicenseOperatorTest { 18 | @Test 19 | public void testLicenseOperator() { 20 | assertThat(LicenseOperator.fromValue("and")) 21 | .isEqualTo(LicenseOperator.AND); 22 | assertThat(LicenseOperator.fromValue("And")) 23 | .isEqualTo(LicenseOperator.AND); 24 | assertThat(LicenseOperator.fromValue("AND")) 25 | .isEqualTo(LicenseOperator.AND); 26 | 27 | assertThat(LicenseOperator.fromValue("or")) 28 | .isEqualTo(LicenseOperator.OR); 29 | assertThat(LicenseOperator.fromValue("Or")) 30 | .isEqualTo(LicenseOperator.OR); 31 | assertThat(LicenseOperator.fromValue("OR")) 32 | .isEqualTo(LicenseOperator.OR); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /modules/sw360/sw360-client/src/test/java/org/eclipse/sw360/antenna/sw360/client/rest/resource/attachments/SW360AttachmentTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2019. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.sw360.client.rest.resource.attachments; 12 | 13 | import org.eclipse.sw360.antenna.sw360.client.rest.resource.SW360ResourcesTestUtils; 14 | 15 | public class SW360AttachmentTest extends SW360ResourcesTestUtils { 16 | @Override 17 | public SW360Attachment prepareItem() { 18 | SW360Attachment sw360Attachment = new SW360Attachment("test.doc", SW360AttachmentType.SOURCE); 19 | return sw360Attachment; 20 | } 21 | 22 | @Override 23 | public SW360Attachment prepareItemWithoutOptionalInput() { 24 | SW360Attachment sw360Attachment = new SW360Attachment(); 25 | sw360Attachment.setFilename(""); 26 | return sw360Attachment; 27 | } 28 | 29 | @Override 30 | public Class getHandledClassType() { 31 | return SW360Attachment.class; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/model/artifact/facts/ArtifactIdentifier.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2018. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | 12 | package org.eclipse.sw360.antenna.model.artifact.facts; 13 | 14 | import org.eclipse.sw360.antenna.model.artifact.Artifact; 15 | import org.eclipse.sw360.antenna.model.artifact.ArtifactFact; 16 | import org.eclipse.sw360.antenna.model.artifact.ArtifactSelector; 17 | 18 | public interface ArtifactIdentifier 19 | extends ArtifactFact, ArtifactSelector { 20 | @Override 21 | default boolean matches(Artifact artifact) { 22 | return artifact.getArtifactIdentifiers() 23 | .stream() 24 | .anyMatch(this::matches); 25 | } 26 | 27 | default boolean matches(ArtifactFact artifactFact) { 28 | if(artifactFact instanceof ArtifactIdentifier) { 29 | return matches((ArtifactIdentifier) artifactFact); 30 | } 31 | return false; 32 | } 33 | 34 | boolean matches(ArtifactIdentifier artifactIdentifier); 35 | } 36 | -------------------------------------------------------------------------------- /modules/sw360/sw360-client/src/main/java/org/eclipse/sw360/antenna/sw360/client/rest/resource/projects/SW360ProjectType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2017-2018. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | 12 | package org.eclipse.sw360.antenna.sw360.client.rest.resource.projects; 13 | 14 | public enum SW360ProjectType { 15 | CUSTOMER(0), INTERNAL(1), PRODUCT(2), SERVICE(3), INNER_SOURCE(4); 16 | 17 | private final int value; 18 | 19 | SW360ProjectType(int value) { 20 | this.value = value; 21 | } 22 | 23 | public int getValue() { 24 | return this.value; 25 | } 26 | 27 | public static SW360ProjectType findByValue(int value) { 28 | switch (value) { 29 | case 0: 30 | return CUSTOMER; 31 | case 1: 32 | return INTERNAL; 33 | case 2: 34 | return PRODUCT; 35 | case 3: 36 | return SERVICE; 37 | case 4: 38 | return INNER_SOURCE; 39 | default: 40 | return null; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /modules/attribution-document/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 4.0.0 17 | 18 | org.eclipse.sw360.antenna 19 | antenna-management 20 | ${revision} 21 | ../../ 22 | 23 | 24 | attribution-document 25 | pom 26 | 27 | 28 | 29 | attribution-document-core 30 | attribution-document-generator 31 | attribution-document-demo-bundle 32 | attribution-document-basic-bundle 33 | 34 | 35 | -------------------------------------------------------------------------------- /antenna-documentation/src/site/markdown/generators/csv-generator-step.md: -------------------------------------------------------------------------------- 1 | # CSV report generator 2 | ### How to use 3 | Add this configuration to the workflow.xml 4 | 5 | ```xml 6 | 7 | 8 | 9 | CSV Report Generator 10 | org.eclipse.sw360.antenna.workflow.generators.CSVGenerator 11 | 12 | 13 | 14 | ``` 15 | 16 | ### How does the output look like: 17 | The output for the example project (`./target/antenna/Antenna_artifactInformation.csv`) looks like: 18 | 19 | ```csv 20 | artifactName;artifactId;groupId;mavenVersion;bundleVersion;license 21 | ;system;com.proprietary.software;1.0.0;;A proprietary License 22 | ;commons-csv;org.apache.commons;1.4;;Apache Software License 2.0 23 | ;log4j-core;org.apache.logging.log4j;2.6.2;;Apache License 2.0 24 | ;commons-math3;org.apache.commons;3.2;;Apache License 2.0 25 | ;jackson-core;com.fasterxml.jackson.core;2.8.4;2.8.4;Apache License 2.0 26 | ;jackson-annotations;com.fasterxml.jackson.core;2.8.4;2.8.4;Apache License 2.0 27 | ArbitraryCopiedCode;;;;;Creative Commons Attribution Share Alike 3.0 Unported 28 | ;system;a.test.project;1.0.0;;htmlArea-1.0 29 | ``` 30 | 31 | ### Magic string for output handlers 32 | 33 | When configuring output handlers, the output of the CSV report generator can be referred to by `artifact-information`. 34 | -------------------------------------------------------------------------------- /modules/sw360/sw360-client/src/main/java/org/eclipse/sw360/antenna/sw360/client/adapter/SW360ProjectAdapterUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2018. 3 | * Copyright (c) Bosch.IO GmbH 2020. 4 | * 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the Eclipse Public License v2.0 7 | * which accompanies this distribution, and is available at 8 | * http://www.eclipse.org/legal/epl-v20.html 9 | * 10 | * SPDX-License-Identifier: EPL-2.0 11 | */ 12 | package org.eclipse.sw360.antenna.sw360.client.adapter; 13 | 14 | import org.apache.commons.lang3.StringUtils; 15 | import org.eclipse.sw360.antenna.sw360.client.rest.resource.projects.SW360Project; 16 | 17 | class SW360ProjectAdapterUtils { 18 | 19 | private SW360ProjectAdapterUtils() {} 20 | 21 | public static boolean isValidProject(SW360Project project) { 22 | return StringUtils.isNotEmpty(project.getName()) && StringUtils.isNotEmpty(project.getVersion()); 23 | } 24 | 25 | public static boolean hasEqualCoordinates(SW360Project sw360Project, String projectName, String projectVersion) { 26 | boolean isAppIdEqual = sw360Project.getName().equalsIgnoreCase(projectName); 27 | boolean isProjectVersionEqual = sw360Project.getVersion().equalsIgnoreCase(projectVersion); 28 | return isAppIdEqual && isProjectVersionEqual; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /core/runtime/src/test/java/org/eclipse/sw360/antenna/xml/XMLValidatorTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2013,2016-2017. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.xml; 12 | 13 | import org.eclipse.sw360.antenna.api.exceptions.ConfigurationException; 14 | import org.junit.Test; 15 | 16 | import java.net.MalformedURLException; 17 | import java.net.URL; 18 | 19 | public class XMLValidatorTest { 20 | @Test 21 | public void validateXMLTestValidURL() { 22 | XMLValidator validator = new XMLValidator(); 23 | URL xsd = validator.getClass().getResource("/configTest.xsd"); 24 | URL xml = validator.getClass().getResource("/antennaconf.xml"); 25 | validator.validateXML(xml, xsd); 26 | } 27 | 28 | @Test(expected = ConfigurationException.class) 29 | public void validateXMLTestInvalidURL() throws MalformedURLException { 30 | XMLValidator validator = new XMLValidator(); 31 | URL xsd = validator.getClass().getResource("/configTest.xsd"); 32 | URL xml = new URL("http://"); 33 | validator.validateXML(xml, xsd); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /modules/sw360/sw360-client/src/main/java/org/eclipse/sw360/antenna/sw360/client/rest/resource/Self.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2017-2018. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | 12 | package org.eclipse.sw360.antenna.sw360.client.rest.resource; 13 | 14 | import java.io.Serializable; 15 | import java.util.Objects; 16 | 17 | public class Self implements Serializable { 18 | private String href; 19 | 20 | public Self() { 21 | // no-òp 22 | } 23 | 24 | public Self(String href) { 25 | this.href = href; 26 | } 27 | 28 | public String getHref() { 29 | return href; 30 | } 31 | 32 | public Self setHref(String href) { 33 | this.href = href; 34 | return this; 35 | } 36 | 37 | @Override 38 | public boolean equals(Object o) { 39 | if (this == o) return true; 40 | if (o == null || getClass() != o.getClass()) return false; 41 | Self self = (Self) o; 42 | return Objects.equals(href, self.href); 43 | } 44 | 45 | @Override 46 | public int hashCode() { 47 | return Objects.hash(href); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /core/model/src/main/java/org/eclipse/sw360/antenna/model/artifact/facts/ArtifactIssues.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2018. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | 12 | package org.eclipse.sw360.antenna.model.artifact.facts; 13 | 14 | import org.eclipse.sw360.antenna.model.artifact.ArtifactFactWithPayload; 15 | import org.eclipse.sw360.antenna.model.xml.generated.Issue; 16 | import org.eclipse.sw360.antenna.model.xml.generated.Issues; 17 | 18 | import java.util.Collections; 19 | import java.util.List; 20 | 21 | public class ArtifactIssues extends ArtifactFactWithPayload> { 22 | public ArtifactIssues(Issues issues) { 23 | super(issues.getIssue()); 24 | } 25 | public ArtifactIssues(List issues) { 26 | super(issues); 27 | } 28 | 29 | public static List getDefault() { 30 | return Collections.emptyList(); 31 | } 32 | 33 | @Override 34 | public String getFactContentName() { 35 | return "Issues"; 36 | } 37 | 38 | @Override 39 | public boolean isEmpty() { 40 | return super.isEmpty() || get().size() == 0; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /modules/policy/engine/src/test/java/org/eclipse/sw360/antenna/policy/engine/testdata/TestRule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Bosch Software Innovations GmbH 2019. 3 | * 4 | * All rights reserved. This program and the accompanying materials 5 | * are made available under the terms of the Eclipse Public License v2.0 6 | * which accompanies this distribution, and is available at 7 | * http://www.eclipse.org/legal/epl-v20.html 8 | * 9 | * SPDX-License-Identifier: EPL-2.0 10 | */ 11 | package org.eclipse.sw360.antenna.policy.engine.testdata; 12 | 13 | import org.eclipse.sw360.antenna.policy.engine.Rule; 14 | import org.eclipse.sw360.antenna.policy.engine.RuleSeverity; 15 | import org.eclipse.sw360.antenna.policy.engine.Ruleset; 16 | 17 | public class TestRule implements Rule { 18 | private final Ruleset ruleset; 19 | 20 | public TestRule(Ruleset ruleset) { 21 | this.ruleset = ruleset; 22 | } 23 | 24 | @Override 25 | public String getId() { 26 | return "TST"; 27 | } 28 | 29 | @Override 30 | public String getName() { 31 | return "Test Rule"; 32 | } 33 | 34 | @Override 35 | public String getDescription() { 36 | return "Nothing"; 37 | } 38 | 39 | @Override 40 | public RuleSeverity getSeverity() { 41 | return RuleSeverity.WARN; 42 | } 43 | 44 | @Override 45 | public Ruleset getRuleset() { 46 | return ruleset; 47 | } 48 | } 49 | --------------------------------------------------------------------------------