From 83b4725abad87ac84037926257634d03c1a061d5 Mon Sep 17 00:00:00 2001 From: nemonik Date: Tue, 5 May 2015 14:19:46 -0400 Subject: [PATCH 01/43] remove resource from wrong path --- .../java/org/mitre/stix/examples/sample.xml | 49 ------------------- 1 file changed, 49 deletions(-) delete mode 100755 src/main/java/org/mitre/stix/examples/sample.xml diff --git a/src/main/java/org/mitre/stix/examples/sample.xml b/src/main/java/org/mitre/stix/examples/sample.xml deleted file mode 100755 index 0e6f46a..0000000 --- a/src/main/java/org/mitre/stix/examples/sample.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - Example watchlist that contains IP information. - Indicators - Watchlist - - - - IP Watchlist - Sample IP Address Indicator for this watchlist. This contains one indicator with a set of three IP addresses in the watchlist. - - - - 10.0.0.0##comma##10.0.0.1##comma##10.0.0.2 - - - - - - - From 8ff5115ce871716145c7ea17677c2e79c42210cf Mon Sep 17 00:00:00 2001 From: nemonik Date: Tue, 5 May 2015 14:39:58 -0400 Subject: [PATCH 02/43] DOC: Switched to Travis CI and CircleCi and badges for v1.1.1 --- README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.MD b/README.MD index b01b0d9..f362ef4 100644 --- a/README.MD +++ b/README.MD @@ -7,7 +7,7 @@ java-stix is being developed under the official [STIXProject][stix project] For more information, see [http://stix.mitre.org/][stix]. -[![Circle CI](https://circleci.com/gh/STIXProject/java-stix.svg?style=svg)](https://circleci.com/gh/STIXProject/java-stix) [![Build Status](https://travis-ci.org/STIXProject/java-stix.svg)](https://travis-ci.org/STIXProject/java-stix) +[![Circle CI](https://circleci.com/gh/STIXProject/java-stix/tree/v1.1.1.svg?style=svg)](https://circleci.com/gh/STIXProject/java-stix/tree/v1.1.1) [![Build Status](https://travis-ci.org/STIXProject/java-stix.svg?branch=v1.1.1)](https://travis-ci.org/STIXProject/java-stix) ## Overview From 0809793522de9a8a9bba381cdf102dfc19cb024c Mon Sep 17 00:00:00 2001 From: nemonik Date: Thu, 7 May 2015 00:24:22 -0400 Subject: [PATCH 03/43] refactoring to allow signing to actually work correctly --- build.gradle | 163 ++++++++++-------- .../org/mitre/stix/DocumentUtilities.java | 2 +- 2 files changed, 93 insertions(+), 72 deletions(-) diff --git a/build.gradle b/build.gradle index 7fb0e90..31c8271 100644 --- a/build.gradle +++ b/build.gradle @@ -8,13 +8,34 @@ * * Run * - * gradle + * ./gradlew * * from the commnand-line and the build task will execute by default. * * The Jar will be built to * * build/libs/stix-${version}.jar + * + * + * Publishing archives: + * + * signingKeyId, signingPassword, secretKeyFile, ossrhUsername, and ossrhPassword properties + * should be defined outside of the repository either on the command-line via + * + * ./gradlew -PsigningKeyId=value -PsigningPassword=value -PsecretKeyFile=value -PossrhUsername=value -PossrhPassword=value + * + * or via ~/.gradle/gradle.properties as + * + * signingKeyId=value + * signingPassword=value + * secretKeyFile=value + * ossrhUsername=value + * ossrhPassword=value + * + * Check settings via: + * + * ./gradle checkProperties + * */ import org.gradle.plugins.signing.Sign @@ -73,7 +94,7 @@ task calcChecksum(type: CalcChecksumTask) { compileJava.dependsOn createPackageInfo task wrapper(type: Wrapper) { - gradleVersion = '2.3' + gradleVersion = '2.4' } task javadocJar(type: Jar) { @@ -89,6 +110,31 @@ task sourcesJar(type: Jar, dependsOn: javadoc) { from sourceSets.main.allSource } +gradle.taskGraph.whenReady { taskGraph -> + if (taskGraph.allTasks.any { it instanceof Sign}) { + allprojects { + ext."signing.keyId" = signingKeyId ?: "" + ext."signing.password" = signingPassword ?: "" + ext."signing.secretKeyRingFile" = secretKeyFile ?: "" + } + } +} + +task checkProperties() { + println "signingKeyId ${signingKeyId ? '= ' + signingKeyId : 'is not set.'}" + println "signingPassword ${signingPassword ? '= ' + signingPassword : 'is not set.'}" + println "secretKeyFile ${secretKeyFile ? '= ' + secretKeyFile : 'is not set.'}" + println "ossrhUsername ${ossrhUsername ? '= ' + ossrhUsername : 'is not set.'}" + println "ossrhPassword ${ossrhPassword ?'= ' + ossrhPassword : 'is not set.'}" +} + +signing { + required { + !version.contains("SNAPSHOT") && gradle.taskGraph.hasTask("uploadArchives") + } + sign configurations.archives +} + clean { delete("src/generated/java") delete("src/main/resources/namespace-prefix.xjb") @@ -141,74 +187,48 @@ jar { from 'LICENSE' } -gradle.taskGraph.whenReady { taskGraph -> - if (taskGraph.allTasks.any { it instanceof Upload }) { - allprojects { - // signingKeyId, signingPassword, secretKeyFile, ossrhUsername, ossrhPassword - // should be define out of the repository either on the command-line via - // - // gradle -DsigningKeyId=value -DsigningPassword=value -DsecretKeyFile=value -DossrhUsername=value -DossrhPassword=value - // - // or via ~/.gradle/gradle.properties as - // - // systemProp.signingKeyId=value - // systemProp.signingPassword=value - // systemProp.secretKeyFile=value - // systemProp.ossrhUsername=value - // systemProp.ossrhPassword=value - - ext."signing.keyId" = System.properties["signingKeyId"] - ext."signing.password" = System.properties["signingPassword"] - ext."signing.secretKeyRingFile" = System.properties["secretKeyFile"] - - ext."ossrhUsername" = System.properties["ossrhUsername"] - ext."ossrhPassword" = System.properties["ossrhPassword"] - - signing { - sign configurations.archives - } - - uploadArchives { - repositories { - mavenDeployer { - beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } - - repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { - authentication(userName: ossrhUsername, password: ossrhPassword) - } - - snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") { - authentication(userName: ossrhUsername, password: ossrhPassword) +afterEvaluate { project -> + uploadArchives { + repositories { + mavenDeployer { + beforeDeployment { MavenDeployment deployment -> + signing.signPom(deployment) + } + + repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { + authentication(userName: ossrhUsername ?: "", password: ossrhPassword ?: "") + } + + snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") { + authentication(userName: ossrhUsername ?: "", password: ossrhPassword ?: "") + } + + pom.project { + name "${archivesBaseName}" + packaging 'jar' + version "${project.version}" + // optionally artifactId can be defined here + description "The JAXB Bindings for STIX v." + version + url "https://github.com/nemonik/java_stix" + + scm { + connection "https://github.com/nemonik/java_stix.git" + developerConnection "https://github.com/nemonik/java_stix.git" + url "https://github.com/nemonik/java_stix" + } + + licenses { + license { + name "The BSD 3-Clause License" + url "https://raw.githubusercontent.com/nemonik/java_stix/master/LICENSE" } - - pom.project { - name 'stix' - packaging 'jar' - version "${project.version}" - // optionally artifactId can be defined here - description "The JAXB Bindings for STIX v." + version - url "https://github.com/nemonik/java_stix" - - scm { - connection "https://github.com/nemonik/java_stix.git" - developerConnection "https://github.com/nemonik/java_stix.git" - url "https://github.com/nemonik/java_stix" - } - - licenses { - license { - name "The BSD 3-Clause License" - url "https://raw.githubusercontent.com/nemonik/java_stix/master/LICENSE" - } - } - - developers { - developer { - id 'nemonik' - name 'Michael Joseph Walsh' - email 'java-stix-pom[ASCII character number 64]nemonik.com' - } - } + } + + developers { + developer { + id 'nemonik' + name 'Michael Joseph Walsh' + email 'java-stix-pom[ASCII character number 64]nemonik.com' } } } @@ -251,7 +271,9 @@ if (JavaVersion.current().isJava8Compatible()) { } artifacts { - archives javadocJar, sourcesJar + archives jar + archives sourcesJar + archives javadocJar } buildscript { @@ -264,7 +286,6 @@ buildscript { } dependencies { - // Needed for GeneratedSourceTransformationTask classpath name: "org.eclipse.core.runtime_3.10.0.v20140318-2214" classpath name: "org.eclipse.osgi_3.10.0.v20140606-1445" diff --git a/src/main/java/org/mitre/stix/DocumentUtilities.java b/src/main/java/org/mitre/stix/DocumentUtilities.java index 9481be9..2393dc7 100644 --- a/src/main/java/org/mitre/stix/DocumentUtilities.java +++ b/src/main/java/org/mitre/stix/DocumentUtilities.java @@ -76,7 +76,7 @@ public static Document toDocument(JAXBElement jaxbElement) { * JAXB representation of an XML Element * @param prettyPrint * True for pretty print, otherwise false - * @return + * @return The Document representation */ public static Document toDocument(JAXBElement jaxbElement, boolean prettyPrint) { From 85cb3a9a6c37818af44aea9a6d1b22c9eb317a21 Mon Sep 17 00:00:00 2001 From: nemonik Date: Thu, 7 May 2015 14:40:24 -0400 Subject: [PATCH 04/43] fixed CI issues and signing --- .travis.yml | 3 +++ README.MD | 32 +++++++++++++++++--------------- build.gradle | 43 ++++++++++++++++++++++++++----------------- circle.yml | 4 ++++ 4 files changed, 50 insertions(+), 32 deletions(-) diff --git a/.travis.yml b/.travis.yml index 709b707..39e3908 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,3 +8,6 @@ before_install: env: GRADLE_OPTS=-Dorg.gradle.daemon=true env: CI_OPTS=--stacktrace + +install: /bin/true +script: "./gradlew build -x signArchives" \ No newline at end of file diff --git a/README.MD b/README.MD index f362ef4..42fab23 100644 --- a/README.MD +++ b/README.MD @@ -7,7 +7,7 @@ java-stix is being developed under the official [STIXProject][stix project] For more information, see [http://stix.mitre.org/][stix]. -[![Circle CI](https://circleci.com/gh/STIXProject/java-stix/tree/v1.1.1.svg?style=svg)](https://circleci.com/gh/STIXProject/java-stix/tree/v1.1.1) [![Build Status](https://travis-ci.org/STIXProject/java-stix.svg?branch=v1.1.1)](https://travis-ci.org/STIXProject/java-stix) +[![Circle CI](https://circleci.com/gh/STIXProject/java-stix.svg?style=svg)](https://circleci.com/gh/STIXProject/java-stix) [![Build Status](https://travis-ci.org/STIXProject/java-stix.svg)](https://travis-ci.org/STIXProject/java-stix) ## Overview @@ -157,27 +157,30 @@ First change directories into the project and enter on the command-line: ./gradlew -as `build` is the default Gradle task. +as `jar` is the default Gradle task. To run the `build` and skip signing jars, +do the following + + ./gradlew build -x signArchives After the Gradle wrapper shell script has downloaded and cached the Gradle binary distribution, a successful build will look like something like this on UNIX: - ➜ java_stix git:(master) ./gradlew + ➜ java_stix git:(master) ✗ gradle build -x signArchives :buildSrc:compileJava UP-TO-DATE - :buildSrc:compileGroovy + :buildSrc:compileGroovy UP-TO-DATE :buildSrc:processResources UP-TO-DATE - :buildSrc:classes - :buildSrc:jar - :buildSrc:assemble + :buildSrc:classes UP-TO-DATE + :buildSrc:jar UP-TO-DATE + :buildSrc:assemble UP-TO-DATE :buildSrc:compileTestJava UP-TO-DATE :buildSrc:compileTestGroovy UP-TO-DATE :buildSrc:processTestResources UP-TO-DATE :buildSrc:testClasses UP-TO-DATE :buildSrc:test UP-TO-DATE :buildSrc:check UP-TO-DATE - :buildSrc:build - :clean UP-TO-DATE + :buildSrc:build UP-TO-DATE + :clean :retrieveSchemas Schemas are present. Retrieval is not needed. /Users/walsh/Development/workspace/java_stix/src/main/resources/schemas/v1.1.1/cybox/objects/Archive_File_Object.xsd already patched. @@ -195,14 +198,13 @@ on UNIX: :classes :jar :javadoc - /Users/walsh/Development/workspace/java_stix/src/main/java/org/mitre/stix/DocumentUtilities.java:81: warning - @return tag has no arguments. /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:277: warning - Tag @link: reference not found: byte[] - /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:299: warning - Tag @link: reference not found: byte[] + /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:287: warning - Tag @link: reference not found: byte[] /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:361: warning - Tag @link: reference not found: byte[] /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:331: warning - Tag @link: reference not found: byte[] /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:351: warning - Tag @link: reference not found: byte[] /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:277: warning - Tag @link: reference not found: byte[] - /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:299: warning - Tag @link: reference not found: byte[] + /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:287: warning - Tag @link: reference not found: byte[] /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:331: warning - Tag @link: reference not found: byte[] /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:351: warning - Tag @link: reference not found: byte[] /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:361: warning - Tag @link: reference not found: byte[] @@ -211,11 +213,11 @@ on UNIX: /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/X509Data.java:132: warning - Tag @link: reference not found: byte[] /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/X509Data.java:132: warning - Tag @link: reference not found: byte[] /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:277: warning - Tag @link: reference not found: byte[] - /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:299: warning - Tag @link: reference not found: byte[] + /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:287: warning - Tag @link: reference not found: byte[] /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:361: warning - Tag @link: reference not found: byte[] /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:331: warning - Tag @link: reference not found: byte[] /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:351: warning - Tag @link: reference not found: byte[] - 20 warnings + 19 warnings :javadocJar :sourcesJar :assemble @@ -229,7 +231,7 @@ on UNIX: BUILD SUCCESSFUL - Total time: 2 mins 58.614 secs + Total time: 3 mins 7.702 secs Ignore the javadoc tag warnings they have no impact on the build. Also, ignore the warning about unchecked or unsafe operations as they are an artifact of diff --git a/build.gradle b/build.gradle index 31c8271..e74d0cb 100644 --- a/build.gradle +++ b/build.gradle @@ -34,6 +34,12 @@ * * Check settings via: * + * To publish a snapshot execute the "uploadArchives" task with "snapshot" property like so: + * + * ./gradlew uploadArchives -Psnaphot + * + * Otherwise you will deploy to staging. + * * ./gradle checkProperties * */ @@ -54,7 +60,7 @@ apply plugin: "eclipse" apply plugin: "maven" apply plugin: "signing" -defaultTasks "build" +defaultTasks "jar" version = "1.1.1" group = "org.mitre" @@ -110,28 +116,31 @@ task sourcesJar(type: Jar, dependsOn: javadoc) { from sourceSets.main.allSource } +task checkProperties() { + doFirst { + println "signingKeyId ${hasProperty("signingKeyId") ? '= ' + signingKeyId : 'is not set.'}" + println "signingPassword ${hasProperty("signingPassword") ? '= ' + signingPassword : 'is not set.'}" + println "secretKeyFile ${hasProperty("secretKeyFile") ? '= ' + secretKeyFile : 'is not set.'}" + println "ossrhUsername ${hasProperty("ossrhUsername") ? '= ' + ossrhUsername : 'is not set.'}" + println "ossrhPassword ${hasProperty("ossrhPassword") ?'= ' + ossrhPassword : 'is not set.'}" + } +} + gradle.taskGraph.whenReady { taskGraph -> + + println ">>>${taskGraph.allTasks}" + if (taskGraph.allTasks.any { it instanceof Sign}) { allprojects { - ext."signing.keyId" = signingKeyId ?: "" - ext."signing.password" = signingPassword ?: "" - ext."signing.secretKeyRingFile" = secretKeyFile ?: "" + ext."signing.keyId" = hasProperty("signingKeyId") ? signingKeyId : "" + ext."signing.password" = hasProperty("signingPassword") ? signingPassword: "" + ext."signing.secretKeyRingFile" = hasProperty("secretKeyFile") ? secretKeyFile: "" } } } -task checkProperties() { - println "signingKeyId ${signingKeyId ? '= ' + signingKeyId : 'is not set.'}" - println "signingPassword ${signingPassword ? '= ' + signingPassword : 'is not set.'}" - println "secretKeyFile ${secretKeyFile ? '= ' + secretKeyFile : 'is not set.'}" - println "ossrhUsername ${ossrhUsername ? '= ' + ossrhUsername : 'is not set.'}" - println "ossrhPassword ${ossrhPassword ?'= ' + ossrhPassword : 'is not set.'}" -} - signing { - required { - !version.contains("SNAPSHOT") && gradle.taskGraph.hasTask("uploadArchives") - } + required {!version.endsWith("SNAPSHOT") && gradle.taskGraph.hasTask("uploadArchives") } sign configurations.archives } @@ -196,11 +205,11 @@ afterEvaluate { project -> } repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { - authentication(userName: ossrhUsername ?: "", password: ossrhPassword ?: "") + authentication(userName: hasProperty("ossrhUsername") ? ossrhUsername : "", password: hasProperty("ossrhPassword") ? ossrhPassword: "") } snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") { - authentication(userName: ossrhUsername ?: "", password: ossrhPassword ?: "") + authentication(userName: hasProperty("ossrhUsername") ? ossrhUsername : "", password: hasProperty("ossrhPassword") ? ossrhPassword: "") } pom.project { diff --git a/circle.yml b/circle.yml index 9169a61..75a9973 100644 --- a/circle.yml +++ b/circle.yml @@ -4,3 +4,7 @@ machine: environment: GRADLE_OPTS: -Dorg.gradle.daemon=true CI_OPTS: --stacktrace --debug + +test: + override: + - ./gradlew build -x signArchives \ No newline at end of file From 728646687847fa0d4f870656d71ab18ac69d81e2 Mon Sep 17 00:00:00 2001 From: nemonik Date: Fri, 8 May 2015 01:25:09 -0400 Subject: [PATCH 05/43] refactoring for signing --- .travis.yml | 2 +- README.MD | 18 +++--- build.gradle | 159 +++++++++++++++++++++++++++++---------------------- circle.yml | 2 +- 4 files changed, 100 insertions(+), 81 deletions(-) diff --git a/.travis.yml b/.travis.yml index 39e3908..6f988d3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,4 +10,4 @@ env: GRADLE_OPTS=-Dorg.gradle.daemon=true env: CI_OPTS=--stacktrace install: /bin/true -script: "./gradlew build -x signArchives" \ No newline at end of file +script: "./gradlew -x signArchives" \ No newline at end of file diff --git a/README.MD b/README.MD index 42fab23..7f8d2e0 100644 --- a/README.MD +++ b/README.MD @@ -75,12 +75,12 @@ including OS X thereby removing the need to have Gradle installed. For a UNIX platform, you can run Gradle from the project root via: - ./gradlew + ./gradlew -x signArchives This documentation centers on UNIX-centric Gradle command-line execution for brevity, but if you are on Windows you can run Gradle via: - .\gradlew.bat + .\gradlew.bat -x signArchives Executing the `tasks` Gradle task will inform you of all the tasks runnable @@ -153,14 +153,10 @@ It is really unnecessary to build by hand, if your intention is to use the java-stix in your project as [snapshot](#importing_into_eclipse) exist in the Maven Central Snapshot repository, and soon releases will exist too. -First change directories into the project and enter on the command-line: +If you have not set up the signing properties you can instruct Gradle to skip +signing jars by doing the following: - ./gradlew - -as `jar` is the default Gradle task. To run the `build` and skip signing jars, -do the following - - ./gradlew build -x signArchives + ./gradlew -x signArchives After the Gradle wrapper shell script has downloaded and cached the Gradle binary distribution, a successful build will look like something like this @@ -240,7 +236,7 @@ XJC being used to autogenerate the document object model. If you want more detail about the build you can pass `--stacktrace --debug` on the command line like so: - ./gradlew --stacktrace --debug + ./gradlew -x signArchives --stacktrace --debug for a more detailed build. I set an environment `CI_OPTS` variable with this value for CircleCi builds to be bettered informed as to why the buiid is @@ -314,7 +310,7 @@ After running the Gradle build script, if you are using the Eclipse IDE you may want to run the following from the command-line to set up the Ecipse environment: - ./gradlew build cleanEclipse eclipse + ./gradlew build cleanEclipse eclipse -x signArchives It entirely depends on how smart yoour Eclipse Gradle plugin is and how you imported the project. The above command will change your prject to essentially diff --git a/build.gradle b/build.gradle index e74d0cb..434dc0e 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,7 @@ * * Run * - * ./gradlew + * ./gradlew -x signArchives * * from the commnand-line and the build task will execute by default. * @@ -34,11 +34,14 @@ * * Check settings via: * - * To publish a snapshot execute the "uploadArchives" task with "snapshot" property like so: + * To publish a snapshot execute the "uploadArchives" task like so: * - * ./gradlew uploadArchives -Psnaphot + * ./gradlew uploadArchives * - * Otherwise you will deploy to staging. + * Otherwise you can publish a release to staging by executing the "uploadArchives" task + * with "release" property like so: + * + * ./gradlew uploadArchives -Prelease * * ./gradle checkProperties * @@ -60,7 +63,7 @@ apply plugin: "eclipse" apply plugin: "maven" apply plugin: "signing" -defaultTasks "jar" +defaultTasks "build" version = "1.1.1" group = "org.mitre" @@ -68,7 +71,7 @@ archivesBaseName = "stix" project.ext.set("schemaVersion", version) -if (project.hasProperty("snapshot")) { +if (!has("release")) { version = "${version}-SNAPSHOT" } @@ -118,29 +121,99 @@ task sourcesJar(type: Jar, dependsOn: javadoc) { task checkProperties() { doFirst { - println "signingKeyId ${hasProperty("signingKeyId") ? '= ' + signingKeyId : 'is not set.'}" - println "signingPassword ${hasProperty("signingPassword") ? '= ' + signingPassword : 'is not set.'}" - println "secretKeyFile ${hasProperty("secretKeyFile") ? '= ' + secretKeyFile : 'is not set.'}" - println "ossrhUsername ${hasProperty("ossrhUsername") ? '= ' + ossrhUsername : 'is not set.'}" - println "ossrhPassword ${hasProperty("ossrhPassword") ?'= ' + ossrhPassword : 'is not set.'}" + println "${project.hasProperty("signingKeyId") ? 'signingKeyId = ' + signingKeyId : 'No value has been specified for property \'signingKeyId\'.'}" + println "${project.hasProperty("signingPassword") ? 'signingPassword = ' + signingPassword : 'No value has been specified for property \'signingKeyId\'.'}" + println "${project.hasProperty("secretKeyFile") ? 'secretKeyFile = ' + secretKeyFile : 'No value has been specified for property \'secretKeyFile\'.'}" + println "${project.hasProperty("ossrhUsername") ? 'ossrhUsername = ' + ossrhUsername : 'No value has been specified for property \'ossrhUsername\'.'}" + println "${project.hasProperty("ossrhPassword") ?'ossrhPassword = ' + ossrhPassword : 'No value has been specified for property \'ossrhPassword\'.'}" } } -gradle.taskGraph.whenReady { taskGraph -> - - println ">>>${taskGraph.allTasks}" +uploadArchives{ + configuration = configurations.archives + repositories { + mavenDeployer { + beforeDeployment { MavenDeployment deployment -> + if (!project.hasProperty("ossrhUsername")) { + throw new GradleException("No value has been specified for property 'ossrhUsername'.") + } + + if (!project.hasProperty("ossrhPassword")) { + throw new GradleException("No value has been specified for property 'ossrhPassword'.") + } + + signing.signPom(deployment) + } + + repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { + authentication(userName: project.hasProperty("ossrhUsername") ? ossrhUsername : "", password: project.hasProperty("ossrhPassword") ? ossrhPassword: "") + } + + snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") { + authentication(userName: project.hasProperty("ossrhUsername") ? ossrhUsername : "", password: project.hasProperty("ossrhPassword") ? ossrhPassword: "") + } + + pom.project { + name "${archivesBaseName}" + packaging 'jar' + version "${project.version}" + // optionally artifactId can be defined here + description "The JAXB Bindings for STIX v." + version + url "https://github.com/nemonik/java_stix" + + scm { + connection "https://github.com/nemonik/java_stix.git" + developerConnection "https://github.com/nemonik/java_stix.git" + url "https://github.com/nemonik/java_stix" + } + + licenses { + license { + name "The BSD 3-Clause License" + url "https://raw.githubusercontent.com/nemonik/java_stix/master/LICENSE" + } + } + + developers { + developer { + id 'nemonik' + name 'Michael Joseph Walsh' + email 'java-stix-pom[ASCII character number 64]nemonik.com' + } + } + } + } + } +} +gradle.taskGraph.whenReady { taskGraph -> if (taskGraph.allTasks.any { it instanceof Sign}) { allprojects { - ext."signing.keyId" = hasProperty("signingKeyId") ? signingKeyId : "" - ext."signing.password" = hasProperty("signingPassword") ? signingPassword: "" - ext."signing.secretKeyRingFile" = hasProperty("secretKeyFile") ? secretKeyFile: "" + ext."signing.keyId" = project.hasProperty("signingKeyId") ? signingKeyId : "" + ext."signing.password" = project.hasProperty("signingPassword") ? signingPassword: "" + ext."signing.secretKeyRingFile" = project.hasProperty("secretKeyFile") ? secretKeyFile: "" + } + } + + if (taskGraph.hasTask(tasks.uploadArchives)) { + if (has("release")) { + if (!project.hasProperty("signingKeyId")) { + throw new GradleException("No value has been specified for property 'signingKeyId'.") + } + + if (!project.hasProperty("signingPassword")) { + throw new GradleException("No value has been specified for property 'signingPassword'.") + } + + if (!project.hasProperty("secretKeyFile")) { + throw new GradleException("No value has been specified for property 'secretKeyFile'.") + } } } } signing { - required {!version.endsWith("SNAPSHOT") && gradle.taskGraph.hasTask("uploadArchives") } + required {has("release") && gradle.taskGraph.hasTask(tasks.uploadArchives) } sign configurations.archives } @@ -196,56 +269,6 @@ jar { from 'LICENSE' } -afterEvaluate { project -> - uploadArchives { - repositories { - mavenDeployer { - beforeDeployment { MavenDeployment deployment -> - signing.signPom(deployment) - } - - repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { - authentication(userName: hasProperty("ossrhUsername") ? ossrhUsername : "", password: hasProperty("ossrhPassword") ? ossrhPassword: "") - } - - snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") { - authentication(userName: hasProperty("ossrhUsername") ? ossrhUsername : "", password: hasProperty("ossrhPassword") ? ossrhPassword: "") - } - - pom.project { - name "${archivesBaseName}" - packaging 'jar' - version "${project.version}" - // optionally artifactId can be defined here - description "The JAXB Bindings for STIX v." + version - url "https://github.com/nemonik/java_stix" - - scm { - connection "https://github.com/nemonik/java_stix.git" - developerConnection "https://github.com/nemonik/java_stix.git" - url "https://github.com/nemonik/java_stix" - } - - licenses { - license { - name "The BSD 3-Clause License" - url "https://raw.githubusercontent.com/nemonik/java_stix/master/LICENSE" - } - } - - developers { - developer { - id 'nemonik' - name 'Michael Joseph Walsh' - email 'java-stix-pom[ASCII character number 64]nemonik.com' - } - } - } - } - } - } -} - javadoc { include "**/org/mitre/stix/**/*" include "**/com/mandiant/**/*" diff --git a/circle.yml b/circle.yml index 75a9973..694bb8d 100644 --- a/circle.yml +++ b/circle.yml @@ -7,4 +7,4 @@ machine: test: override: - - ./gradlew build -x signArchives \ No newline at end of file + - ./gradlew -x signArchives \ No newline at end of file From 1def492b21adff06518a91159e2db7a1f019a2ea Mon Sep 17 00:00:00 2001 From: nemonik Date: Fri, 8 May 2015 01:40:18 -0400 Subject: [PATCH 06/43] DOC: minor fixes --- README.MD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.MD b/README.MD index 7f8d2e0..0bd73ce 100644 --- a/README.MD +++ b/README.MD @@ -162,7 +162,7 @@ After the Gradle wrapper shell script has downloaded and cached the Gradle binary distribution, a successful build will look like something like this on UNIX: - ➜ java_stix git:(master) ✗ gradle build -x signArchives + ➜ java_stix git:(master) ✗ ./gradlew -x signArchives :buildSrc:compileJava UP-TO-DATE :buildSrc:compileGroovy UP-TO-DATE :buildSrc:processResources UP-TO-DATE @@ -286,7 +286,7 @@ integration. To build on Windows use the gradlew batch script like so: - $ .\gradlew.bat + $ .\gradlew.bat -x signArchives If the build goes well you will find the jars: From a810c65b0956dceaa18df8fbdac39ec46407a0e2 Mon Sep 17 00:00:00 2001 From: nemonik Date: Mon, 11 May 2015 10:25:26 -0400 Subject: [PATCH 07/43] changes to pom.xml key-value pairs --- build.gradle | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index 434dc0e..592ed11 100644 --- a/build.gradle +++ b/build.gradle @@ -159,18 +159,18 @@ uploadArchives{ version "${project.version}" // optionally artifactId can be defined here description "The JAXB Bindings for STIX v." + version - url "https://github.com/nemonik/java_stix" + url "https://github.com/STIXProject/java-stix" scm { - connection "https://github.com/nemonik/java_stix.git" - developerConnection "https://github.com/nemonik/java_stix.git" - url "https://github.com/nemonik/java_stix" + connection "https://github.com/STIXProject/java-stix.git" + developerConnection "https://github.com/STIXProject/java-stix.git" + url "https://github.com/STIXProject/java-stix" } licenses { license { name "The BSD 3-Clause License" - url "https://raw.githubusercontent.com/nemonik/java_stix/master/LICENSE" + url "https://raw.githubusercontent.com/STIXProject/java-stix/master/LICENSE" } } From e203c3e2d99279756d3d81f8c12c570a1c6d49a9 Mon Sep 17 00:00:00 2001 From: nemonik Date: Tue, 12 May 2015 09:06:46 -0400 Subject: [PATCH 08/43] DOC: release info added --- README.MD | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/README.MD b/README.MD index 0bd73ce..f04d093 100644 --- a/README.MD +++ b/README.MD @@ -24,13 +24,33 @@ Releases of java-stix will comply with the Semantic Versioning specification at see TODO.txt for a tentative roadmap. Releases will be announced on the [STIX discussion list][list]. +## Releases + +Releases are distributed via the Maven Central Repository. + +### Apache Maven: + + + org.mitre + stix + 1.1.1 + + +### Gradle: + + compile 'org.mitre:stix:1.1.1' + +### Apache Ivy: + + + ## Snapshots Snapshots are being pushed to -https://oss.sonatype.org/content/repositories/snapshots/org/mitre/stix/ +[https://oss.sonatype.org/content/repositories/snapshots/org/mitre/stix/](https://oss.sonatype.org/content/repositories/snapshots/org/mitre/stix/) -So, users can simply retrieve java-stix directly via the Central Repository. +Users using Apache Maven for example can simply retrieve java-stix directly via the Central Repository: @@ -49,7 +69,7 @@ So, users can simply retrieve java-stix directly via the Central Repository. -At a later date, release artifacts will appear in the Maven Central Repository. +[Release](#releases) artifacts appear in the Maven Central Repository. # Building From 69b64ecb741ea6a0b7e8345b1a3938e8cfaee11d Mon Sep 17 00:00:00 2001 From: nemonik Date: Tue, 12 May 2015 13:21:27 -0400 Subject: [PATCH 09/43] moved properties that may change between out of the gradle build script --- build.gradle | 6 +----- gradle.properties | 3 +++ 2 files changed, 4 insertions(+), 5 deletions(-) create mode 100644 gradle.properties diff --git a/build.gradle b/build.gradle index 592ed11..cc2b865 100644 --- a/build.gradle +++ b/build.gradle @@ -65,10 +65,6 @@ apply plugin: "signing" defaultTasks "build" -version = "1.1.1" -group = "org.mitre" -archivesBaseName = "stix" - project.ext.set("schemaVersion", version) if (!has("release")) { @@ -158,7 +154,7 @@ uploadArchives{ packaging 'jar' version "${project.version}" // optionally artifactId can be defined here - description "The JAXB Bindings for STIX v." + version + description "The Java bindings for STIX v." + version url "https://github.com/STIXProject/java-stix" scm { diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..8ee9732 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,3 @@ +version = 1.1.1 +group = org.mitre +archivesBaseName = stix \ No newline at end of file From 35303b0dc21be0869452d4439c01c71ea3a96ec1 Mon Sep 17 00:00:00 2001 From: nemonik Date: Sat, 16 May 2015 02:01:09 -0400 Subject: [PATCH 10/43] Pulled in some changes from master, and made further changes. --- README.MD | 27 +++++++++++++++---- build.gradle | 15 ++++++++--- .../org/mitre/stix/CalcChecksumTask.groovy | 8 ++++-- gradle.properties | 3 ++- retrieve_schemas.bat | 1 + retrieve_schemas.sh | 1 + src/main/java/org/mitre/stix/STIXSchema.java | 8 +++--- .../org/mitre/stix/examples/CIQIdentity.java | 16 +++++------ .../stix/examples/CreationToolMetadata.java | 2 +- 9 files changed, 55 insertions(+), 26 deletions(-) diff --git a/README.MD b/README.MD index f04d093..5a4a3c5 100644 --- a/README.MD +++ b/README.MD @@ -7,7 +7,7 @@ java-stix is being developed under the official [STIXProject][stix project] For more information, see [http://stix.mitre.org/][stix]. -[![Circle CI](https://circleci.com/gh/STIXProject/java-stix.svg?style=svg)](https://circleci.com/gh/STIXProject/java-stix) [![Build Status](https://travis-ci.org/STIXProject/java-stix.svg)](https://travis-ci.org/STIXProject/java-stix) +[![Circle CI](https://circleci.com/gh/STIXProject/java-stix.svg?style=svg)](https://circleci.com/gh/STIXProject/java-stix) [![Build Status](https://travis-ci.org/STIXProject/java-stix.svg)](https://travis-ci.org/STIXProject/java-stix) [![Code Climate](https://codeclimate.com/github/STIXProject/java-stix/badges/gpa.svg)](https://codeclimate.com/github/STIXProject/java-stix) [![Test Coverage](https://codeclimate.com/github/STIXProject/java-stix/badges/coverage.svg)](https://codeclimate.com/github/STIXProject/java-stix/coverage) ## Overview @@ -73,6 +73,8 @@ Users using Apache Maven for example can simply retrieve java-stix directly via # Building +java-stix builds under Java7, and Java8. + ## Clone the repository Clone the java-stix project via: @@ -253,8 +255,8 @@ Ignore the javadoc tag warnings they have no impact on the build. Also, ignore the warning about unchecked or unsafe operations as they are an artifact of XJC being used to autogenerate the document object model. -If you want more detail about the build you can pass `--stacktrace --debug` on -the command line like so: +If you want more detail consider passing `-d`/`--debug` or `-i`/`--info` along with +`--stacktrace` on the command line like so: ./gradlew -x signArchives --stacktrace --debug @@ -280,16 +282,31 @@ path. To execute the tests: - ./gradlew test + /gradlew -x signArchives test Consider using `-d`/`--debug` or `-i`/`--info` for more details during test execution like so: - ./gradlew test -i + ./gradlew -x signArchives -i The `test` task will generated a report that can be found at `build/reports/tests/index.html`. +### Examples + +Examples exist in src/main/java/org/mitre/stix/examples + + src/main/java/org/mitre/stix/examples/ + ├── CIQIdentity.java + ├── CreationToolMetadata.java + ├── IndicatorHash.java + ├── XML2Object.java + └── XMLParser.java + +To execute CIQIdentity on the command-line via Gradle, do the following: + + ./gradlew -PmainClass=org.mitre.stix.examples.CIQIdentity -x signArchives execute + ## Addendum The author sees this section out of scope, but added it in hopes it will help diff --git a/build.gradle b/build.gradle index cc2b865..a6bde77 100644 --- a/build.gradle +++ b/build.gradle @@ -94,9 +94,12 @@ task cleanSchema(type: CleanSchemaTask) { } task calcChecksum(type: CalcChecksumTask) { + schemaVersion = project.schemaVersion } -compileJava.dependsOn createPackageInfo +if (!has("skipPackageInfo")) { + compileJava.dependsOn createPackageInfo +} task wrapper(type: Wrapper) { gradleVersion = '2.4' @@ -125,6 +128,11 @@ task checkProperties() { } } +task execute(type:JavaExec) { + main = project.mainClass + classpath = sourceSets.main.runtimeClasspath +} + uploadArchives{ configuration = configurations.archives repositories { @@ -150,7 +158,7 @@ uploadArchives{ } pom.project { - name "${archivesBaseName}" + name "${project.name}" packaging 'jar' version "${project.version}" // optionally artifactId can be defined here @@ -223,7 +231,8 @@ sourceSets { java { srcDirs("src/main/java", "src/generated/java") } resources { srcDir("src/main/resources") - exclude "*.xjb" // not needed in the jar + exclude "*.xjb" + exclude "**/v1.2-rc1" } } } diff --git a/buildSrc/src/main/groovy/org/mitre/stix/CalcChecksumTask.groovy b/buildSrc/src/main/groovy/org/mitre/stix/CalcChecksumTask.groovy index 98aec3c..60ca51d 100644 --- a/buildSrc/src/main/groovy/org/mitre/stix/CalcChecksumTask.groovy +++ b/buildSrc/src/main/groovy/org/mitre/stix/CalcChecksumTask.groovy @@ -5,12 +5,14 @@ package org.mitre.stix import org.gradle.api.DefaultTask +import org.gradle.api.tasks.Input import org.gradle.api.tasks.TaskAction import java.io.FileInputStream import java.security.MessageDigest public class Checksum { + def calc(File file) { def messageDigest = MessageDigest.getInstance("SHA1") @@ -36,9 +38,11 @@ public class Checksum { } class CalcChecksumTask extends DefaultTask { - + + @Input String schemaVersion + CalcChecksumTask() { - description = "Calculates checksum for a file. For example: gradle -Pfilepath=src/main/resources/schemas/v1.1.1/cybox/objects/Archive_File_Object.xsd calcChecksum" + description = "Calculates checksum for a file. For example: gradle -Pfilepath=src/main/resources/schemas/v${schemaVersion}/cybox/objects/Archive_File_Object.xsd calcChecksum" } @TaskAction diff --git a/gradle.properties b/gradle.properties index 8ee9732..891b2c6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,4 @@ version = 1.1.1 group = org.mitre -archivesBaseName = stix \ No newline at end of file +name = stix +mainClass = org.mitre.stix.STIXSchema \ No newline at end of file diff --git a/retrieve_schemas.bat b/retrieve_schemas.bat index 08f6a75..43e2b8a 100644 --- a/retrieve_schemas.bat +++ b/retrieve_schemas.bat @@ -7,4 +7,5 @@ git checkout tags/v1.1.1 echo Retrieving CybOX schemas... git submodule init git submodule update --force +cd cybox git checkout 3442ebe50385d3bd0b3305952b90d296e0a1242c \ No newline at end of file diff --git a/retrieve_schemas.sh b/retrieve_schemas.sh index 4b1d0c7..4b72c33 100755 --- a/retrieve_schemas.sh +++ b/retrieve_schemas.sh @@ -9,5 +9,6 @@ git checkout tags/v1.1.1 echo " Retrieving CybOX schemas..." git submodule init git submodule update --force +cd cybox git checkout 3442ebe50385d3bd0b3305952b90d296e0a1242c diff --git a/src/main/java/org/mitre/stix/STIXSchema.java b/src/main/java/org/mitre/stix/STIXSchema.java index c7db78a..55e1c22 100644 --- a/src/main/java/org/mitre/stix/STIXSchema.java +++ b/src/main/java/org/mitre/stix/STIXSchema.java @@ -10,16 +10,13 @@ import java.net.URL; import java.nio.charset.StandardCharsets; import java.util.HashMap; -import java.util.HashSet; import java.util.Map; -import java.util.Set; import java.util.logging.Logger; -import javax.xml.bind.annotation.XmlType; - import javax.xml.XMLConstants; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlSchema; +import javax.xml.bind.annotation.XmlType; import javax.xml.namespace.QName; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; @@ -43,7 +40,6 @@ import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; -import org.w3c.dom.NodeList; import org.xml.sax.SAXException; /** @@ -273,6 +269,8 @@ public static void main(String[] args) throws ParserConfigurationException, .println(schema .validate(new URL( "https://raw.githubusercontent.com/STIXProject/schemas/master/samples/STIX_Domain_Watchlist.xml"))); + + System.out.println(schema.getVersion()); } /** diff --git a/src/main/java/org/mitre/stix/examples/CIQIdentity.java b/src/main/java/org/mitre/stix/examples/CIQIdentity.java index 0633206..579d531 100644 --- a/src/main/java/org/mitre/stix/examples/CIQIdentity.java +++ b/src/main/java/org/mitre/stix/examples/CIQIdentity.java @@ -118,9 +118,8 @@ public static void main(String[] args) { InformationSourceType producer = new InformationSourceType() .withDescription( - new StructuredTextType( - "An indicator containing a File observable with an associated hash", - null)) + new StructuredTextType() + .withValue("An indicator containing a File observable with an associated hash")) .withTime( new TimeType() .withProducedTime(new DateTimeWithPrecisionType( @@ -155,10 +154,9 @@ public static void main(String[] args) { .withTimestamp(now) .withTitle("File Hash Example") .withDescription( - new StructuredTextType( - "An indicator containing a File observable with an associated hash", - null)).withProducer(producer) - .withObservable(observable); + new StructuredTextType() + .withValue("An indicator containing a File observable with an associated hash")) + .withProducer(producer).withObservable(observable); IndicatorsType indicators = new IndicatorsType( new ArrayList() { @@ -187,8 +185,8 @@ public static void main(String[] args) { System.out.println(StringUtils.repeat("-", 120)); - System.out.println(STIXPackage.fromXMLString(stixPackage - .toXMLString()).toXMLString(true)); + System.out.println(STIXPackage.fromXMLString( + stixPackage.toXMLString()).toXMLString(true)); } catch (DatatypeConfigurationException e) { throw new RuntimeException(e); diff --git a/src/main/java/org/mitre/stix/examples/CreationToolMetadata.java b/src/main/java/org/mitre/stix/examples/CreationToolMetadata.java index ac1a9fa..1f37ddb 100644 --- a/src/main/java/org/mitre/stix/examples/CreationToolMetadata.java +++ b/src/main/java/org/mitre/stix/examples/CreationToolMetadata.java @@ -46,7 +46,7 @@ public static void main(String[] args) { new GregorianCalendar(TimeZone.getTimeZone("UTC"))); STIXHeaderType header = new STIXHeaderType() - .withDescription(new StructuredTextType("Example", null)) + .withDescription(new StructuredTextType().withValue("Example")) .withInformationSource( new InformationSourceType().withTools(new ToolsInformationType() .withTools(new ToolInformationType() From 6bf8e6c2e6226ff3dad6688ebed1681dbaa5fe92 Mon Sep 17 00:00:00 2001 From: nemonik Date: Sat, 16 May 2015 02:01:16 -0400 Subject: [PATCH 11/43] Pulled in some changes from master, and made further changes. --- .java-version | 1 + 1 file changed, 1 insertion(+) create mode 100644 .java-version diff --git a/.java-version b/.java-version new file mode 100644 index 0000000..ad72959 --- /dev/null +++ b/.java-version @@ -0,0 +1 @@ +oracle64-1.8.0.20 From e80e83bd39ce5459d0ec52e0b002334faa9f1822 Mon Sep 17 00:00:00 2001 From: nemonik Date: Sat, 16 May 2015 02:02:57 -0400 Subject: [PATCH 12/43] Pulled in some changes from master, and made further changes. --- .gitignore | 1 - settings.gradle | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 settings.gradle diff --git a/.gitignore b/.gitignore index 13970e1..27c4384 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,6 @@ src/generated .classpath .project .settings/ -settings.gradle .gradle/2.1/taskArtifacts src/main/resources/namespace-prefix.xjb src/main/resource/schemas diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..24c2c63 --- /dev/null +++ b/settings.gradle @@ -0,0 +1 @@ +rootProject.name = name \ No newline at end of file From 67be3ee37be7c583f457e27e53e0c83f810948d8 Mon Sep 17 00:00:00 2001 From: nemonik Date: Sat, 16 May 2015 02:04:29 -0400 Subject: [PATCH 13/43] Pulled in some changes from master, and made further changes. --- .../org/mitre/stix/sitx_1/STIXPackageSpec.groovy | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/test/groovy/org/mitre/stix/sitx_1/STIXPackageSpec.groovy b/src/test/groovy/org/mitre/stix/sitx_1/STIXPackageSpec.groovy index 2c698d3..6f9d3bc 100644 --- a/src/test/groovy/org/mitre/stix/sitx_1/STIXPackageSpec.groovy +++ b/src/test/groovy/org/mitre/stix/sitx_1/STIXPackageSpec.groovy @@ -53,7 +53,7 @@ import spock.lang.* class STIXPackageSpec extends spock.lang.Specification{ - def "A STIXPpackage when created creates the expected XML String"() { + def "A STIXPackage when created creates the expected XML String"() { setup: XMLUnit.setIgnoreWhitespace(true) XMLUnit.setIgnoreAttributeOrder(true) @@ -188,9 +188,8 @@ class STIXPackageSpec extends spock.lang.Specification{ def producer = new InformationSourceType() .withDescription( - new StructuredTextType( - "An indicator containing a File observable with an associated hash", - null)) + new StructuredTextType().withValue( + "An indicator containing a File observable with an associated hash")) .withTime( new TimeType() .withProducedTime(new DateTimeWithPrecisionType( @@ -225,9 +224,9 @@ class STIXPackageSpec extends spock.lang.Specification{ .withTimestamp(epoch) .withTitle("File Hash Example") .withDescription( - new StructuredTextType( - "An indicator containing a File observable with an associated hash", - null)).withProducer(producer) + new StructuredTextType().withValue( + "An indicator containing a File observable with an associated hash")) + .withProducer(producer) .withObservable(observable) def indicators = new IndicatorsType( From a58969b09278e7a970a3babd75c79b1b864188ff Mon Sep 17 00:00:00 2001 From: nemonik Date: Sat, 16 May 2015 06:39:36 -0400 Subject: [PATCH 14/43] DOC: remove codeclimate badges --- README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.MD b/README.MD index 5a4a3c5..858edc4 100644 --- a/README.MD +++ b/README.MD @@ -7,7 +7,7 @@ java-stix is being developed under the official [STIXProject][stix project] For more information, see [http://stix.mitre.org/][stix]. -[![Circle CI](https://circleci.com/gh/STIXProject/java-stix.svg?style=svg)](https://circleci.com/gh/STIXProject/java-stix) [![Build Status](https://travis-ci.org/STIXProject/java-stix.svg)](https://travis-ci.org/STIXProject/java-stix) [![Code Climate](https://codeclimate.com/github/STIXProject/java-stix/badges/gpa.svg)](https://codeclimate.com/github/STIXProject/java-stix) [![Test Coverage](https://codeclimate.com/github/STIXProject/java-stix/badges/coverage.svg)](https://codeclimate.com/github/STIXProject/java-stix/coverage) +[![Circle CI](https://circleci.com/gh/STIXProject/java-stix.svg?style=svg)](https://circleci.com/gh/STIXProject/java-stix) [![Build Status](https://travis-ci.org/STIXProject/java-stix.svg)](https://travis-ci.org/STIXProject/java-stix) ## Overview From b6563d592fd5fcf95ad2f156eadc020bfb3f4c4e Mon Sep 17 00:00:00 2001 From: nemonik Date: Thu, 21 May 2015 19:20:07 -0400 Subject: [PATCH 15/43] was hitting wrong remote sample xml --- src/main/java/org/mitre/stix/STIXSchema.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/org/mitre/stix/STIXSchema.java b/src/main/java/org/mitre/stix/STIXSchema.java index 55e1c22..81bd43a 100644 --- a/src/main/java/org/mitre/stix/STIXSchema.java +++ b/src/main/java/org/mitre/stix/STIXSchema.java @@ -267,8 +267,7 @@ public static void main(String[] args) throws ParserConfigurationException, System.out .println(schema - .validate(new URL( - "https://raw.githubusercontent.com/STIXProject/schemas/master/samples/STIX_Domain_Watchlist.xml"))); + .validate(new URL("https://raw.githubusercontent.com/STIXProject/python-stix/v1.1.1.5/examples/sample.xml"))); System.out.println(schema.getVersion()); } From 3eb212a99372ab3e459e3d086d708674ca55f921 Mon Sep 17 00:00:00 2001 From: nemonik Date: Thu, 21 May 2015 19:28:06 -0400 Subject: [PATCH 16/43] was hitting wrong remote sample xml --- build.gradle | 2 -- gradle.properties | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index a6bde77..93e2af5 100644 --- a/build.gradle +++ b/build.gradle @@ -65,8 +65,6 @@ apply plugin: "signing" defaultTasks "build" -project.ext.set("schemaVersion", version) - if (!has("release")) { version = "${version}-SNAPSHOT" } diff --git a/gradle.properties b/gradle.properties index 891b2c6..5261bfb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,5 @@ -version = 1.1.1 +version = 1.1.1.1 +schemaVersion = 1.1.1 group = org.mitre name = stix mainClass = org.mitre.stix.STIXSchema \ No newline at end of file From 6d03dc5137cfb430cf91b18e9d8ff466a6280bfb Mon Sep 17 00:00:00 2001 From: nemonik Date: Thu, 21 May 2015 23:29:45 -0400 Subject: [PATCH 17/43] added task to gather up all dependencies --- README.MD | 10 +++++----- build.gradle | 5 +++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/README.MD b/README.MD index 858edc4..7fd9bb2 100644 --- a/README.MD +++ b/README.MD @@ -33,16 +33,16 @@ Releases are distributed via the Maven Central Repository. org.mitre stix - 1.1.1 + 1.1.1.1 ### Gradle: - compile 'org.mitre:stix:1.1.1' + compile 'org.mitre:stix:1.1.1.1' ### Apache Ivy: - + ## Snapshots @@ -65,7 +65,7 @@ Users using Apache Maven for example can simply retrieve java-stix directly via org.mitre stix - 1.1.1-SNAPSHOT + 1.1.1.1-SNAPSHOT @@ -146,7 +146,7 @@ commands on the command line: git submodule init git submodule update --force - cd src/main/resources/schemas/v1.1.1 + cd src/main/resources/schemas/v1.1.1. git checkout tags/v1.1.1 Your not done. You'll also need to retrieve the CybOX schemas. diff --git a/build.gradle b/build.gradle index 93e2af5..bc0500c 100644 --- a/build.gradle +++ b/build.gradle @@ -131,6 +131,11 @@ task execute(type:JavaExec) { classpath = sourceSets.main.runtimeClasspath } +task gatherDependencies(type: Copy) { + into "${buildDir}/dependencies" + from configurations.runtime +} + uploadArchives{ configuration = configurations.archives repositories { From ccc8bce1739592994fc3eb2ef9ac29307f5c7355 Mon Sep 17 00:00:00 2001 From: nemonik Date: Fri, 22 May 2015 14:18:44 -0400 Subject: [PATCH 18/43] changes so validation error msgs can be retrieved --- src/main/java/org/mitre/stix/STIXSchema.java | 26 ++++++++++++++------ 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/mitre/stix/STIXSchema.java b/src/main/java/org/mitre/stix/STIXSchema.java index 81bd43a..1aea288 100644 --- a/src/main/java/org/mitre/stix/STIXSchema.java +++ b/src/main/java/org/mitre/stix/STIXSchema.java @@ -40,6 +40,7 @@ import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; +import org.xml.sax.ErrorHandler; import org.xml.sax.SAXException; /** @@ -87,7 +88,8 @@ private STIXSchema() { this.version = ((Version) this.getClass().getPackage() .getAnnotation(Version.class)).schema(); - ResourcePatternResolver patternResolver = new PathMatchingResourcePatternResolver(); + ResourcePatternResolver patternResolver = new PathMatchingResourcePatternResolver( + this.getClass().getClassLoader()); Resource[] schemaResources; try { @@ -166,6 +168,16 @@ private STIXSchema() { } } + /** + * Override the default ValidationErrorHandler with one of your own. + * + * @param customErrorHandler + * The Handler to use instead. + */ + public void setValidationErrorHandler(ErrorHandler customErrorHandler) { + validator.setErrorHandler(customErrorHandler); + } + /** * Returns the schema version * @@ -243,6 +255,7 @@ public boolean validate(String xmlText) { } catch (IOException e) { throw new RuntimeException(e); } catch (SAXException e) { + System.out.println("---------\n" + e + "--------\n"); return false; } @@ -267,8 +280,9 @@ public static void main(String[] args) throws ParserConfigurationException, System.out .println(schema - .validate(new URL("https://raw.githubusercontent.com/STIXProject/python-stix/v1.1.1.5/examples/sample.xml"))); - + .validate(new URL( + "https://raw.githubusercontent.com/STIXProject/python-stix/v1.1.1.5/examples/sample.xml"))); + System.out.println(schema.getVersion()); } @@ -297,11 +311,9 @@ public static String getNamespaceURI(Object obj) { */ public static String getName(Object obj) { try { - return obj.getClass().getAnnotation( - XmlRootElement.class).name(); + return obj.getClass().getAnnotation(XmlRootElement.class).name(); } catch (NullPointerException e) { - return obj.getClass().getAnnotation( - XmlType.class).name(); + return obj.getClass().getAnnotation(XmlType.class).name(); } } From 663ee11f7e759b23aeba7a5189bab6d74d239a2b Mon Sep 17 00:00:00 2001 From: nemonik Date: Fri, 29 May 2015 11:08:17 -0400 Subject: [PATCH 19/43] changes to STIXSchema --- src/main/java/org/mitre/stix/STIXSchema.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/mitre/stix/STIXSchema.java b/src/main/java/org/mitre/stix/STIXSchema.java index 1aea288..3cb1253 100644 --- a/src/main/java/org/mitre/stix/STIXSchema.java +++ b/src/main/java/org/mitre/stix/STIXSchema.java @@ -94,7 +94,7 @@ private STIXSchema() { try { schemaResources = patternResolver - .getResources("classpath*:schemas/v" + version + .getResources("classpath:schemas/v" + version + "/**/*.xsd"); prefixSchemaBindings = new HashMap(); From a0da82a6c8a90467529e992cd05afe6ab7899d7a Mon Sep 17 00:00:00 2001 From: nemonik Date: Fri, 29 May 2015 13:36:26 -0400 Subject: [PATCH 20/43] Added a Dockerfile to create java-stix build container --- Dockerfile | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ebc67da --- /dev/null +++ b/Dockerfile @@ -0,0 +1,79 @@ +############################################################ +# A Dockerfile used to create a java-stix build container +# based on Ubunu. +# +# Copyright (c) 2015, The MITRE Corporation. All rights reserved. +# See LICENSE for complete terms. +# +# @author nemonik (Michael Joseph Walsh ) +# +# WHAT TO DO: +# +# If you have Docker installed, from the root of the project run +# the following to create a container image for this Dockerfile via: +# +# docker build -t java_stix_img . +# +# Then create a container using the image you just created via: +# +# docker run -t -i java_stix_img /bin/bash +# +# To retreive the jar archives from the running docker container use following +# from the command-line of your docker host, not the container: +# +# docker cp :/java-stix/build/libs/stix-1.1.1.1-SNAPSHOT-javadoc.jar . +# docker cp :/java-stix/build/libs/stix-1.1.1.1-SNAPSHOT-sources.jar . +# docker cp :/java-stix/build/libs/stix-1.1.1.1-SNAPSHOT.jar . +# +# If the containder ID is not obvious, but you can also retrieve it via: +# +# docker ps +# +# An example of retrieving the snapshot jar would be the following: +# +# ➜ /tmp docker cp 83ad9afb6096:/java-stix/build/libs/stix-1.1.1.1-SNAPSHOT.jar . +# +# +############################################################ + +# Set base image +FROM ubuntu + +# File Maintainer +MAINTAINER Michael Joseph Walsh + +# Add the application resources URL +#RUN echo "deb http://archive.ubuntu.com/ubuntu/ $(lsb_release -sc) main universe" >> /etc/apt/sources.list + +# Update the sources list +RUN apt-get update + +# Install cmd-line dev toolchain +RUN apt-get install -y tar git curl nano wget dialog net-tools build-essential + +# To install the OpenJDK environment +#RUN apt-get install default-jdk + +# To install the OpenJDK 7, comment out the above and uncomment the following. +RUN apt-get install -y openjdk-7-jdk + +# Optionally to install the Oracle JDK, comment out the above, uncomment the +# the next 3 lines, and then uncommment the preferred JDK version. +#RUN apt-get install python-software-properties +#RUN add-apt-repository ppa:webupd8team/java +#RUN apt-get update + +#RUN apt-get install oracle-java7-installer +#RUN apt-get install oracle-java8-installer + +# Clone the java-stix repo +RUN git clone https://github.com/STIXProject/java-stix.git + +# Open the java-stix project +WORKDIR java-stix + +# Checkout the v1.1.1.1 branch +RUN git checkout -b v1.1.1.1 origin/v1.1.1.1 + +# Build unsigned jar archives in debug to /java-stix/build/libs +RUN ./gradlew -x signArchives -d From bfa3776ec34f1ffc8bca58da5e28175f4e544a9f Mon Sep 17 00:00:00 2001 From: nemonik Date: Fri, 29 May 2015 16:02:37 -0400 Subject: [PATCH 21/43] modified to use ubuntu:15.04 as a base --- Dockerfile | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index ebc67da..3a4eaff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ # # Then create a container using the image you just created via: # -# docker run -t -i java_stix_img /bin/bash +# docker run -t -i java_stix_img_v1_1_1_1 /bin/bash # # To retreive the jar archives from the running docker container use following # from the command-line of your docker host, not the container: @@ -37,31 +37,28 @@ ############################################################ # Set base image -FROM ubuntu +FROM ubuntu:15.04 # File Maintainer MAINTAINER Michael Joseph Walsh -# Add the application resources URL -#RUN echo "deb http://archive.ubuntu.com/ubuntu/ $(lsb_release -sc) main universe" >> /etc/apt/sources.list - # Update the sources list RUN apt-get update # Install cmd-line dev toolchain RUN apt-get install -y tar git curl nano wget dialog net-tools build-essential -# To install the OpenJDK environment -#RUN apt-get install default-jdk +# To install the default OpenJDK environment +RUN apt-get -y install openjdk-8-jdk # To install the OpenJDK 7, comment out the above and uncomment the following. -RUN apt-get install -y openjdk-7-jdk +#RUN apt-get install -y openjdk-7-jdk # Optionally to install the Oracle JDK, comment out the above, uncomment the # the next 3 lines, and then uncommment the preferred JDK version. -#RUN apt-get install python-software-properties -#RUN add-apt-repository ppa:webupd8team/java -#RUN apt-get update +#RUN apt-get -y install python-software-properties +#RUN add-apt-repository -y ppa:webupd8team/java +#RUN apt-get -y update #RUN apt-get install oracle-java7-installer #RUN apt-get install oracle-java8-installer @@ -76,4 +73,4 @@ WORKDIR java-stix RUN git checkout -b v1.1.1.1 origin/v1.1.1.1 # Build unsigned jar archives in debug to /java-stix/build/libs -RUN ./gradlew -x signArchives -d +RUN ./gradlew -x signArchives -d From 141d0a1d4427dd98bffcce98a6c32495d635fe0e Mon Sep 17 00:00:00 2001 From: nemonik Date: Fri, 29 May 2015 19:29:42 -0400 Subject: [PATCH 22/43] modified gradle to target Java v1.7 --- README.MD | 32 +++++++++++++++++++++++++++++++- build.gradle | 5 +++++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/README.MD b/README.MD index 7fd9bb2..907b492 100644 --- a/README.MD +++ b/README.MD @@ -319,7 +319,7 @@ this platform. You will need additional dependencies normally found in UNIX, such as, GNU patch. GNU Patch can be installed via either cygwin, Chocolatey, or directly. Then you'll need to work out permission elevation issues so Gradle can execute the command-line GNU patch command through Gradle's Ant -integration. +integration. Alternatively, see the section on [building using the Dockerfil](#building_via_docker). To build on Windows use the gradlew batch script like so: @@ -334,6 +334,36 @@ If the build goes well you will find the jars: where `${version}` is replaced with the `version` number in the Gradle build script. +### Building via the Dockerfile + +If you have Docker installed, from the root of the project run +the following to create a container image for this Dockerfile via: + + docker build -t java_stix_img_v1_2_0_1 . + +Then create a container using the image you just created via: + + docker run -t -i java_stix_img_v1_2_0_1 /bin/bash + +To retreive the jar archives from the running docker container use following +from the command-line of your docker host, not the container: + + docker cp :/java-stix/build/libs/stix-1.2.0.1-SNAPSHOT-javadoc.jar . + docker cp :/java-stix/build/libs/stix-1.2.0.1-SNAPSHOT-sources.jar . + docker cp :/java-stix/build/libs/stix-1.2.0.1-SNAPSHOT.jar . + +If the containder ID is not obvious, but you can also retrieve it via: + + docker ps + +An example of retrieving the snapshot jar would be the following: + + docker cp 83ad9afb6096:/java-stix/build/libs/stix-1.2.0.1-SNAPSHOT.jar . + +By default the Docker container will build using OpenJdk 7. You can modify +the Dockerfile to other JVM's noted in the file. Please, note Gradle targets +Java 1.7 compatibility regardless. + ### Importing the project into Eclipse As Eclipse's various Gradle plugins have varying degrees of usefulness, I diff --git a/build.gradle b/build.gradle index bc0500c..4a748b8 100644 --- a/build.gradle +++ b/build.gradle @@ -316,6 +316,11 @@ artifacts { archives javadocJar } +tasks.withType(JavaCompile) { + sourceCompatibility = "1.7" + targetCompatibility = "1.7" +} + buildscript { repositories { jcenter() From 05845d00f00fed1e3f8d2fc3e3d1c00232d04f61 Mon Sep 17 00:00:00 2001 From: nemonik Date: Fri, 29 May 2015 20:17:06 -0400 Subject: [PATCH 23/43] don't include the v1.2.0 schema as a resource --- build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle b/build.gradle index 4a748b8..a74224d 100644 --- a/build.gradle +++ b/build.gradle @@ -236,6 +236,7 @@ sourceSets { srcDir("src/main/resources") exclude "*.xjb" exclude "**/v1.2-rc1" + exclude "**/v1.2.0" } } } From 56605d4e078f62caeaac927fd85c4777e08085c2 Mon Sep 17 00:00:00 2001 From: nemonik Date: Mon, 1 Jun 2015 14:38:18 -0400 Subject: [PATCH 24/43] DOC: sitx schema retrieval tweak --- README.MD | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.MD b/README.MD index 907b492..3bc877b 100644 --- a/README.MD +++ b/README.MD @@ -146,8 +146,9 @@ commands on the command line: git submodule init git submodule update --force - cd src/main/resources/schemas/v1.1.1. + cd src/main/resources/schemas/v1.1.1 git checkout tags/v1.1.1 + Your not done. You'll also need to retrieve the CybOX schemas. @@ -155,8 +156,10 @@ Your not done. You'll also need to retrieve the CybOX schemas. While in the project: + cd src/main/resources/schemas/v1.1.1 git submodule init git submodule update --force + cd cybox git checkout 3442ebe50385d3bd0b3305952b90d296e0a1242c When Gradle build script first runs it will also patch the CybOX schemas so From efb60c485ad98d5c8aac5a2bff1cb4a8d8c28659 Mon Sep 17 00:00:00 2001 From: nemonik Date: Mon, 1 Jun 2015 15:02:47 -0400 Subject: [PATCH 25/43] DOC: typo correction --- README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.MD b/README.MD index 3bc877b..9fcd248 100644 --- a/README.MD +++ b/README.MD @@ -322,7 +322,7 @@ this platform. You will need additional dependencies normally found in UNIX, such as, GNU patch. GNU Patch can be installed via either cygwin, Chocolatey, or directly. Then you'll need to work out permission elevation issues so Gradle can execute the command-line GNU patch command through Gradle's Ant -integration. Alternatively, see the section on [building using the Dockerfil](#building_via_docker). +integration. Alternatively, see the section on [building using the Dockerfile](#building_via_docker). To build on Windows use the gradlew batch script like so: From e13ecabe2a1a8ae66347f66206b3a5625a585a1f Mon Sep 17 00:00:00 2001 From: nemonik Date: Wed, 17 Jun 2015 11:01:22 -0400 Subject: [PATCH 26/43] added repository to retrv openjdk-8-jdk --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3a4eaff..e0649c3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -46,9 +46,11 @@ MAINTAINER Michael Joseph Walsh RUN apt-get update # Install cmd-line dev toolchain -RUN apt-get install -y tar git curl nano wget dialog net-tools build-essential +RUN apt-get install -y tar git curl nano wget dialog net-tools build-essential software-properties-common # To install the default OpenJDK environment +RUN add-apt-repository -y ppa:openjdk-r/ppa +RUN apt-get -y update RUN apt-get -y install openjdk-8-jdk # To install the OpenJDK 7, comment out the above and uncomment the following. From 74537a191f470eb1a82086630e3aeb785f501662 Mon Sep 17 00:00:00 2001 From: nemonik Date: Mon, 22 Jun 2015 13:25:27 -0400 Subject: [PATCH 27/43] modified Dockerfile and move to 2.4 gradle wrapper --- .travis.yml | 4 ++-- Dockerfile | 12 ++++++------ circle.yml | 4 ++-- gradle/wrapper/gradle-wrapper.jar | Bin 52141 -> 52266 bytes gradle/wrapper/gradle-wrapper.properties | 4 ++-- gradlew | 4 ++-- gradlew.bat | 4 ++-- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6f988d3..39d388a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,8 +6,8 @@ jdk: before_install: - chmod +x gradlew -env: GRADLE_OPTS=-Dorg.gradle.daemon=true +env: GRADLE_OPTS=-Dorg.gradle.daemon=true -Xmx1024m -Xms256m env: CI_OPTS=--stacktrace install: /bin/true -script: "./gradlew -x signArchives" \ No newline at end of file +script: "./gradlew -x signArchives" diff --git a/Dockerfile b/Dockerfile index e0649c3..1838bd2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -43,7 +43,7 @@ FROM ubuntu:15.04 MAINTAINER Michael Joseph Walsh # Update the sources list -RUN apt-get update +RUN apt-get -y update # Install cmd-line dev toolchain RUN apt-get install -y tar git curl nano wget dialog net-tools build-essential software-properties-common @@ -65,14 +65,14 @@ RUN apt-get -y install openjdk-8-jdk #RUN apt-get install oracle-java7-installer #RUN apt-get install oracle-java8-installer -# Clone the java-stix repo -RUN git clone https://github.com/STIXProject/java-stix.git +# Clone java-stix repo at the current branch into the container +COPY . java-stix # Open the java-stix project WORKDIR java-stix -# Checkout the v1.1.1.1 branch -RUN git checkout -b v1.1.1.1 origin/v1.1.1.1 - # Build unsigned jar archives in debug to /java-stix/build/libs RUN ./gradlew -x signArchives -d + +# Clean up APT when done. +RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* diff --git a/circle.yml b/circle.yml index 694bb8d..eb3efff 100644 --- a/circle.yml +++ b/circle.yml @@ -2,9 +2,9 @@ machine: java: version: oraclejdk7 environment: - GRADLE_OPTS: -Dorg.gradle.daemon=true + GRADLE_OPTS: -Dorg.gradle.daemon=true -Xmx1024m -Xms256m CI_OPTS: --stacktrace --debug test: override: - - ./gradlew -x signArchives \ No newline at end of file + - ./gradlew -x signArchives diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 085a1cdc27db1185342f15a00441734e74fe3735..b5166dad4d90021f6a0b45268c0755719f1d5cd4 100644 GIT binary patch delta 8640 zcmZv>1yEc|7cD%vySsY`?(Q;32(B?SxH}U(Xn;xZ!QI{6Ew}{t0KqS=d1Sc%{rP$y$xGRs;@vnIPE4qb`=_I^QCTFt$`8SbuE{irD@ ztvZT@`&{I78!jRIU7bNu_R`ghD7)1yen}SiH>(h_xXe5zb`*lWYUy7p`RcYj%(H4F zLYCaNG7i98d2}0!a^*;pX$FRY4k=hrAwvTzdn!0+ z5aA^991OZnAwZdQ?^_t$KkYR1uuJ@k1OW8o004{tFisyc=$r05h)kE@QGRh?QnpgN zKYE!_drC0gOelnY+@mmJlTnp?k;PHT!2lJ{npQo=;_Jjfn4vN-b38aV7a=*`mnXtM zhZluWB3|J7bd=1#bS1LmW6?M%@p#uS0e8*0qMm^lg3j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|Q2g1d1Vx25Z73GD z8A1`M{mT@O0$Y?p^3M#mc{8h0o_v9jZjA8Mx>bo{nc1B#8Ee{_+%Orc}@F2(<9 zf(~>^lK-wfw0-$h4k8!;fba?b-v#l*1~YWOg!=sEp0)>iVf_aI0Bpd67&h3ko9y?l zfaAJ>Frwh{?pM&!X*Upd*brQuK@Dc>c}DR&k*YWfY4MZFH6j2Y^p6Mt0P(9gf;tBG zyoAP9^#EZTO`z0i4;_>O_5xuG%)wpeoZ$ODbSUNdLH-nG9?=f)1S=mFJLdJOTiait*Hf{42E8?I|q@__U7@ z8jscwgpK$5&*Tun3tl+?X#Ca2{7WO|BUr46>Zz-V3r!Xw#%=5URBkjl06^d`$A>_0 zV2}`)Y~artnFoNdlflqrb_49t*nhs>GW_>ML19mhRN(aiTxc==eWm~a&cBinfN=)J zp<*(V7Dw?<1 Date: Mon, 22 Jun 2015 14:32:39 -0400 Subject: [PATCH 28/43] travisci env fix --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 39d388a..a5e140a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ jdk: before_install: - chmod +x gradlew -env: GRADLE_OPTS=-Dorg.gradle.daemon=true -Xmx1024m -Xms256m +env: GRADLE_OPTS="-Dorg.gradle.daemon=true -Xmx1024m -Xms256m" env: CI_OPTS=--stacktrace install: /bin/true From 523c388a06c25d392d4d5461741ffbce93f5ab0f Mon Sep 17 00:00:00 2001 From: nemonik Date: Mon, 22 Jun 2015 14:51:34 -0400 Subject: [PATCH 29/43] fixing ci pipeline --- .travis.yml | 2 +- build.gradle | 7 +++++++ circle.yml | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index a5e140a..f887409 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ jdk: before_install: - chmod +x gradlew -env: GRADLE_OPTS="-Dorg.gradle.daemon=true -Xmx1024m -Xms256m" +env: GRADLE_OPTS=-Dorg.gradle.daemon=true env: CI_OPTS=--stacktrace install: /bin/true diff --git a/build.gradle b/build.gradle index a74224d..6bd1c20 100644 --- a/build.gradle +++ b/build.gradle @@ -101,6 +101,13 @@ if (!has("skipPackageInfo")) { task wrapper(type: Wrapper) { gradleVersion = '2.4' + def jvmOpts='-Xmx1024m -Xms256m' + inputs.property("jvmOpts", jvmOpts) + doLast { + def optsEnvVar = "DEFAULT_JVM_OPTS" + scriptFile.write scriptFile.text.replace("$optsEnvVar=\"\"", "$optsEnvVar=\"$jvmOpts\"") + batchScript.write batchScript.text.replace("set $optsEnvVar=", "set $optsEnvVar=$jvmOpts") + } } task javadocJar(type: Jar) { diff --git a/circle.yml b/circle.yml index eb3efff..be88d48 100644 --- a/circle.yml +++ b/circle.yml @@ -2,7 +2,7 @@ machine: java: version: oraclejdk7 environment: - GRADLE_OPTS: -Dorg.gradle.daemon=true -Xmx1024m -Xms256m + GRADLE_OPTS: -Dorg.gradle.daemon=true CI_OPTS: --stacktrace --debug test: From a381f57b7479af423f282b5190b226321b961d98 Mon Sep 17 00:00:00 2001 From: nemonik Date: Mon, 22 Jun 2015 14:52:33 -0400 Subject: [PATCH 30/43] fixing ci pipeline --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 6968be7..f01ac3f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,4 +1,4 @@ -#Mon Jun 22 12:47:09 EDT 2015 +#Mon Jun 22 14:50:21 EDT 2015 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME From 391250e452d59b6032df7a8ccd250752d4cecc9c Mon Sep 17 00:00:00 2001 From: nemonik Date: Mon, 22 Jun 2015 14:53:27 -0400 Subject: [PATCH 31/43] fixing ci pipeline --- gradlew | 2 +- gradlew.bat | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gradlew b/gradlew index 91a7e26..8c1075e 100755 --- a/gradlew +++ b/gradlew @@ -7,7 +7,7 @@ ############################################################################## # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +DEFAULT_JVM_OPTS="-Xmx1024m -Xms256m" APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` diff --git a/gradlew.bat b/gradlew.bat index aec9973..c750a85 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -9,7 +9,7 @@ if "%OS%"=="Windows_NT" setlocal @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= +set DEFAULT_JVM_OPTS=-Xmx1024m -Xms256m set DIRNAME=%~dp0 if "%DIRNAME%" == "" set DIRNAME=. From e7038e399994401496c83f1a11c7e51c0fed4e72 Mon Sep 17 00:00:00 2001 From: nemonik Date: Mon, 22 Jun 2015 15:14:49 -0400 Subject: [PATCH 32/43] doc: updated in regards to versioning --- README.MD | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.MD b/README.MD index 9fcd248..68d1165 100644 --- a/README.MD +++ b/README.MD @@ -22,7 +22,11 @@ replacement for the [python-stix][python stix] API. Releases of java-stix will comply with the Semantic Versioning specification at [http://semver.org/][semver]. Java-stix is currently under active development; see TODO.txt for a tentative roadmap. Releases will be announced on the [STIX -discussion list][list]. +discussion list][list]. A java-stix for a particular shema release will match the +STIX schema version in Semantic Versioning form. Follow up patched releases of +java-stix for a particular schema release will add and increment a 4th digit. For +example, the first patch release for java-stix `v1.1.1` would be `v1.1.1.1`. Patches +will be worked in a branch prior to being tagged and released. ## Releases From b8c121b8bc09068a9d799a1961cc0f7d8d4c4516 Mon Sep 17 00:00:00 2001 From: nemonik Date: Tue, 23 Jun 2015 11:07:05 -0400 Subject: [PATCH 33/43] doc: typo fix --- README.MD | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.MD b/README.MD index 68d1165..d7f76cd 100644 --- a/README.MD +++ b/README.MD @@ -23,10 +23,10 @@ Releases of java-stix will comply with the Semantic Versioning specification at [http://semver.org/][semver]. Java-stix is currently under active development; see TODO.txt for a tentative roadmap. Releases will be announced on the [STIX discussion list][list]. A java-stix for a particular shema release will match the -STIX schema version in Semantic Versioning form. Follow up patched releases of -java-stix for a particular schema release will add and increment a 4th digit. For -example, the first patch release for java-stix `v1.1.1` would be `v1.1.1.1`. Patches -will be worked in a branch prior to being tagged and released. +STIX schema version in Semantic Versioning form. Follow up patches of java-stix +for a particular schema release will increment a 4th digit. For example, the first +patch release for java-stix `v1.2.0` would be `v1.2.0.1`. Patches will be worked +in a branch prior to being tagged and released. ## Releases From 23607c77879ba23fe33a2678716a7f59d9d460c2 Mon Sep 17 00:00:00 2001 From: nemonik Date: Tue, 23 Jun 2015 11:07:42 -0400 Subject: [PATCH 34/43] doc: typo fix --- README.MD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.MD b/README.MD index d7f76cd..c164356 100644 --- a/README.MD +++ b/README.MD @@ -22,10 +22,10 @@ replacement for the [python-stix][python stix] API. Releases of java-stix will comply with the Semantic Versioning specification at [http://semver.org/][semver]. Java-stix is currently under active development; see TODO.txt for a tentative roadmap. Releases will be announced on the [STIX -discussion list][list]. A java-stix for a particular shema release will match the +discussion list][list]. A java-stix for a particular schema release will match the STIX schema version in Semantic Versioning form. Follow up patches of java-stix for a particular schema release will increment a 4th digit. For example, the first -patch release for java-stix `v1.2.0` would be `v1.2.0.1`. Patches will be worked +patch release for java-stix `v1.1.1` would be `v1.1.1.1`. Patches will be worked in a branch prior to being tagged and released. ## Releases From 10f8ee16a6743da63a161d5a0530104e8e3b206c Mon Sep 17 00:00:00 2001 From: nemonik Date: Sun, 28 Jun 2015 23:48:03 -0400 Subject: [PATCH 35/43] change to allow validation to thrown SAXException, when no ErrorHandler is set --- .../GeneratedSourceTransformationTask.groovy | 8 +++++-- src/main/java/org/mitre/stix/STIXSchema.java | 24 +++++++++++++------ .../org/mitre/stix/examples/CIQIdentity.java | 3 +++ .../stix/examples/CreationToolMetadata.java | 3 +++ .../mitre/stix/examples/IndicatorHash.java | 3 +++ 5 files changed, 32 insertions(+), 9 deletions(-) diff --git a/buildSrc/src/main/groovy/org/mitre/stix/GeneratedSourceTransformationTask.groovy b/buildSrc/src/main/groovy/org/mitre/stix/GeneratedSourceTransformationTask.groovy index 8c90916..9e43f3a 100644 --- a/buildSrc/src/main/groovy/org/mitre/stix/GeneratedSourceTransformationTask.groovy +++ b/buildSrc/src/main/groovy/org/mitre/stix/GeneratedSourceTransformationTask.groovy @@ -304,6 +304,7 @@ class GeneratedSourceTransformationTask extends DefaultTask { [ imports: [ + "org.xml.sax.SAXException" ], template: """\ @@ -311,9 +312,12 @@ class GeneratedSourceTransformationTask extends DefaultTask { * Validates the XML representation of this \${name} instance * Returning true indicating a successful validation, false if not. * - * @return boolean + * @return boolean True If it validates against the schema + * @throws SAXException + * If the a validation ErrorHandler has not been set, and + * validation throws a SAXException */ - public boolean validate() { + public boolean validate() throws SAXException { return STIXSchema.getInstance().validate(toXMLString()); } """ diff --git a/src/main/java/org/mitre/stix/STIXSchema.java b/src/main/java/org/mitre/stix/STIXSchema.java index 3cb1253..b9212e2 100644 --- a/src/main/java/org/mitre/stix/STIXSchema.java +++ b/src/main/java/org/mitre/stix/STIXSchema.java @@ -94,8 +94,7 @@ private STIXSchema() { try { schemaResources = patternResolver - .getResources("classpath:schemas/v" + version - + "/**/*.xsd"); + .getResources("classpath:schemas/v" + version + "/**/*.xsd"); prefixSchemaBindings = new HashMap(); @@ -192,8 +191,12 @@ public String getVersion() { * * @param url * The URL object for the XML to be validated. + * @return boolean True If the xmlText validates against the schema + * @throws SAXException + * If the a validation ErrorHandler has not been set, and + * validation throws a SAXException */ - public boolean validate(URL url) { + public boolean validate(URL url) throws SAXException { String xmlText = null; @@ -211,8 +214,12 @@ public boolean validate(URL url) { * * @param xmlText * A string of XML text to be validated + * @return boolean True If the xmlText validates against the schema + * @throws SAXException + * If the a validation ErrorHandler has not been set, and + * validation throws a SAXException */ - public boolean validate(String xmlText) { + public boolean validate(String xmlText) throws SAXException { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setNamespaceAware(true); @@ -251,12 +258,15 @@ public boolean validate(String xmlText) { try { validator.validate(new StreamSource(new ByteArrayInputStream( xmlText.getBytes(StandardCharsets.UTF_8)))); - } catch (IOException e) { throw new RuntimeException(e); } catch (SAXException e) { - System.out.println("---------\n" + e + "--------\n"); - return false; + if (this.validator.getErrorHandler() != null) { + return false; + } else { + //re-throw the SAXException + throw e; + } } return true; diff --git a/src/main/java/org/mitre/stix/examples/CIQIdentity.java b/src/main/java/org/mitre/stix/examples/CIQIdentity.java index 579d531..02f1316 100644 --- a/src/main/java/org/mitre/stix/examples/CIQIdentity.java +++ b/src/main/java/org/mitre/stix/examples/CIQIdentity.java @@ -43,6 +43,7 @@ import org.mitre.stix.stix_1.IndicatorsType; import org.mitre.stix.stix_1.STIXHeaderType; import org.mitre.stix.stix_1.STIXPackage; +import org.xml.sax.SAXException; /** * An example of how to add CIQ Identity information to a STIX Indicator. @@ -190,6 +191,8 @@ public static void main(String[] args) { } catch (DatatypeConfigurationException e) { throw new RuntimeException(e); + } catch (SAXException e) { + e.printStackTrace(); } } } diff --git a/src/main/java/org/mitre/stix/examples/CreationToolMetadata.java b/src/main/java/org/mitre/stix/examples/CreationToolMetadata.java index 1f37ddb..87b40c3 100644 --- a/src/main/java/org/mitre/stix/examples/CreationToolMetadata.java +++ b/src/main/java/org/mitre/stix/examples/CreationToolMetadata.java @@ -20,6 +20,7 @@ import org.mitre.stix.common_1.StructuredTextType; import org.mitre.stix.stix_1.STIXHeaderType; import org.mitre.stix.stix_1.STIXPackage; +import org.xml.sax.SAXException; /** * Build a STIX Document with Tool Information @@ -69,6 +70,8 @@ public static void main(String[] args) { } catch (DatatypeConfigurationException e) { throw new RuntimeException(e); + } catch (SAXException e) { + e.printStackTrace(); } } } diff --git a/src/main/java/org/mitre/stix/examples/IndicatorHash.java b/src/main/java/org/mitre/stix/examples/IndicatorHash.java index 7144b59..b9120ff 100644 --- a/src/main/java/org/mitre/stix/examples/IndicatorHash.java +++ b/src/main/java/org/mitre/stix/examples/IndicatorHash.java @@ -32,6 +32,7 @@ import org.mitre.stix.stix_1.IndicatorsType; import org.mitre.stix.stix_1.STIXHeaderType; import org.mitre.stix.stix_1.STIXPackage; +import org.xml.sax.SAXException; /** * Build a STIX Indicator document containing a File observable with an @@ -129,6 +130,8 @@ public static void main(String[] args) { } catch (DatatypeConfigurationException e) { throw new RuntimeException(e); + } catch (SAXException e) { + e.printStackTrace(); } } } From 72cbf2f76f9aea01168f65c4f6f7aad33af88847 Mon Sep 17 00:00:00 2001 From: nemonik Date: Mon, 29 Jun 2015 00:48:43 -0400 Subject: [PATCH 36/43] changed the version --- gradle.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 5261bfb..f67f5d0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ -version = 1.1.1.1 +version = 1.1.1.2 schemaVersion = 1.1.1 group = org.mitre name = stix -mainClass = org.mitre.stix.STIXSchema \ No newline at end of file +mainClass = org.mitre.stix.STIXSchema From 14e239c654b9727e1b37623e51838ffe69dc56c1 Mon Sep 17 00:00:00 2001 From: nemonik Date: Mon, 29 Jun 2015 13:54:06 -0400 Subject: [PATCH 37/43] synchronized validation to avoid concurrency issues like FWK005 --- src/main/java/org/mitre/stix/STIXSchema.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/mitre/stix/STIXSchema.java b/src/main/java/org/mitre/stix/STIXSchema.java index b9212e2..ca16a2f 100644 --- a/src/main/java/org/mitre/stix/STIXSchema.java +++ b/src/main/java/org/mitre/stix/STIXSchema.java @@ -256,8 +256,12 @@ public boolean validate(String xmlText) throws SAXException { } try { - validator.validate(new StreamSource(new ByteArrayInputStream( - xmlText.getBytes(StandardCharsets.UTF_8)))); + // synchronized to avoid org.xml.sax.SAXException: FWK005 parse may + // not be called while parsing. + synchronized (this) { + validator.validate(new StreamSource(new ByteArrayInputStream( + xmlText.getBytes(StandardCharsets.UTF_8)))); + } } catch (IOException e) { throw new RuntimeException(e); } catch (SAXException e) { From ebc5628434d4399369102756749bebeefa19f20c Mon Sep 17 00:00:00 2001 From: nemonik Date: Tue, 30 Jun 2015 02:06:36 -0400 Subject: [PATCH 38/43] doc: update Dockerfile and README.MD documentation --- Dockerfile | 12 +++++------ README.MD | 63 +++++++++++++++++++++++++++++++----------------------- 2 files changed, 42 insertions(+), 33 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1838bd2..4ec68c3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,18 +12,18 @@ # If you have Docker installed, from the root of the project run # the following to create a container image for this Dockerfile via: # -# docker build -t java_stix_img . +# docker build -t nemonik/java-stix . # # Then create a container using the image you just created via: # -# docker run -t -i java_stix_img_v1_1_1_1 /bin/bash +# docker run -t -i nemonik/java-stix /bin/bash # -# To retreive the jar archives from the running docker container use following +# To retrieve the jar archives from the running docker container use following # from the command-line of your docker host, not the container: # -# docker cp :/java-stix/build/libs/stix-1.1.1.1-SNAPSHOT-javadoc.jar . -# docker cp :/java-stix/build/libs/stix-1.1.1.1-SNAPSHOT-sources.jar . -# docker cp :/java-stix/build/libs/stix-1.1.1.1-SNAPSHOT.jar . +# docker cp :/java-stix/build/libs/stix-1.2.0.2-SNAPSHOT-javadoc.jar . +# docker cp :/java-stix/build/libs/stix-1.2.0.2-SNAPSHOT-sources.jar . +# docker cp :/java-stix/build/libs/stix-1.2.0.2-SNAPSHOT.jar . # # If the containder ID is not obvious, but you can also retrieve it via: # diff --git a/README.MD b/README.MD index c164356..11d5bf3 100644 --- a/README.MD +++ b/README.MD @@ -1,6 +1,6 @@ # java-stix -The Java bindings for STIX, the Structured Threat Information eXpression +The Java bindings for STIX, the Structured Threat Information eXpression language used for representing structured cyber threat information. java-stix is being developed under the official [STIXProject][stix project] @@ -25,9 +25,17 @@ see TODO.txt for a tentative roadmap. Releases will be announced on the [STIX discussion list][list]. A java-stix for a particular schema release will match the STIX schema version in Semantic Versioning form. Follow up patches of java-stix for a particular schema release will increment a 4th digit. For example, the first -patch release for java-stix `v1.1.1` would be `v1.1.1.1`. Patches will be worked +patch release for java-stix `v1.2.0` would be `v1.2.0.2`. Patches will be worked in a branch prior to being tagged and released. +## Got a Question or Problem? + +If you have questions about how to use java-stix, please direct these to the [STIX discussion list][list]. + +## Contributing to java-stix? + +We'd welcome you contributing to java-stix. Read the [CONTRIBUTING.MD](CONTRIBUTING.MD) for guidlines. + ## Releases Releases are distributed via the Maven Central Repository. @@ -37,16 +45,16 @@ Releases are distributed via the Maven Central Repository. org.mitre stix - 1.1.1.1 + 1.2.0.2 ### Gradle: - compile 'org.mitre:stix:1.1.1.1' + compile 'org.mitre:stix:1.2.0.2' ### Apache Ivy: - + ## Snapshots @@ -69,7 +77,7 @@ Users using Apache Maven for example can simply retrieve java-stix directly via org.mitre stix - 1.1.1.1-SNAPSHOT + 1.2.0.2-SNAPSHOT @@ -150,21 +158,20 @@ commands on the command line: git submodule init git submodule update --force - cd src/main/resources/schemas/v1.1.1 - git checkout tags/v1.1.1 + cd src/main/resources/schemas/v1.2.0 + git checkout tags/v1.2.0 - Your not done. You'll also need to retrieve the CybOX schemas. ### The CybOX schemas While in the project: - cd src/main/resources/schemas/v1.1.1 + cd src/main/resources/schemas/v1.2.0 git submodule init git submodule update --force cd cybox - git checkout 3442ebe50385d3bd0b3305952b90d296e0a1242c + git checkout 97beb32c376a9223e91b52cb3e4c8d2af6baf786 When Gradle build script first runs it will also patch the CybOX schemas so that the JAXB2 Simple Document Object Model can be generated. Once patched, it @@ -208,40 +215,42 @@ on UNIX: :clean :retrieveSchemas Schemas are present. Retrieval is not needed. - /Users/walsh/Development/workspace/java_stix/src/main/resources/schemas/v1.1.1/cybox/objects/Archive_File_Object.xsd already patched. + /Users/walsh/Development/workspace/java_stix/src/main/resources/schemas/v1.2.0/cybox/objects/Archive_File_Object.xsd already patched. :createPrefixNamespaceBindings - schemas/v1.1.1/external/open_ioc_2010/ioc.xsd claims the same prefix "tns" as schemas/v1.1.1/external/open_ioc_2010/ioc-TR.xsd + schemas/v1.2.0/external/open_ioc_2010/ioc.xsd claims the same prefix "tns" as schemas/v1.2.0/external/open_ioc_2010/ioc-TR.xsd :generateJAXB - Generating JAXB model to /Users/walsh/Development/workspace/java_stix/src/generated/java for STIX Schema v1.1.1 found in /Users/walsh/Development/workspace/java_stix/src/main/resources/schemas/v1.1.1 + Generating JAXB model to /Users/walsh/Development/workspace/java_stix/src/generated/java for STIX Schema v1.2.0 found in /Users/walsh/Development/workspace/java_stix/src/main/resources/schemas/v1.2.0 :generatedSourceTransformation :createPackageInfo :compileJava + warning: [options] bootstrap class path not set in conjunction with -source 1.7 Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. + 1 warning :compileGroovy UP-TO-DATE :processResources :classes :jar :javadoc /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:277: warning - Tag @link: reference not found: byte[] - /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:287: warning - Tag @link: reference not found: byte[] /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:361: warning - Tag @link: reference not found: byte[] + /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:341: warning - Tag @link: reference not found: byte[] + /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:311: warning - Tag @link: reference not found: byte[] /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:331: warning - Tag @link: reference not found: byte[] - /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:351: warning - Tag @link: reference not found: byte[] /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:277: warning - Tag @link: reference not found: byte[] - /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:287: warning - Tag @link: reference not found: byte[] + /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:311: warning - Tag @link: reference not found: byte[] /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:331: warning - Tag @link: reference not found: byte[] - /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:351: warning - Tag @link: reference not found: byte[] + /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:341: warning - Tag @link: reference not found: byte[] /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:361: warning - Tag @link: reference not found: byte[] /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/SPKIData.java:115: warning - Tag @link: reference not found: byte[] /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/X509Data.java:132: warning - Tag @link: reference not found: byte[] /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/X509Data.java:132: warning - Tag @link: reference not found: byte[] /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/X509Data.java:132: warning - Tag @link: reference not found: byte[] /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:277: warning - Tag @link: reference not found: byte[] - /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:287: warning - Tag @link: reference not found: byte[] /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:361: warning - Tag @link: reference not found: byte[] + /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:341: warning - Tag @link: reference not found: byte[] + /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:311: warning - Tag @link: reference not found: byte[] /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:331: warning - Tag @link: reference not found: byte[] - /Users/walsh/Development/workspace/java_stix/src/generated/java/org/w3/_2000/_09/xmldsig/ObjectFactory.java:351: warning - Tag @link: reference not found: byte[] 19 warnings :javadocJar :sourcesJar @@ -256,7 +265,7 @@ on UNIX: BUILD SUCCESSFUL - Total time: 3 mins 7.702 secs + Total time: 3 mins 45.121 secs Ignore the javadoc tag warnings they have no impact on the build. Also, ignore the warning about unchecked or unsafe operations as they are an artifact of @@ -346,18 +355,18 @@ script. If you have Docker installed, from the root of the project run the following to create a container image for this Dockerfile via: - docker build -t java_stix_img_v1_2_0_1 . + docker build -t nemonik/java-stix . Then create a container using the image you just created via: - docker run -t -i java_stix_img_v1_2_0_1 /bin/bash + docker run -t -i nemonik/java-stix /bin/bash To retreive the jar archives from the running docker container use following from the command-line of your docker host, not the container: - docker cp :/java-stix/build/libs/stix-1.2.0.1-SNAPSHOT-javadoc.jar . - docker cp :/java-stix/build/libs/stix-1.2.0.1-SNAPSHOT-sources.jar . - docker cp :/java-stix/build/libs/stix-1.2.0.1-SNAPSHOT.jar . + docker cp :/java-stix/build/libs/stix-1.2.0.2-SNAPSHOT-javadoc.jar . + docker cp :/java-stix/build/libs/stix-1.2.0.2-SNAPSHOT-sources.jar . + docker cp :/java-stix/build/libs/stix-1.2.0.2-SNAPSHOT.jar . If the containder ID is not obvious, but you can also retrieve it via: @@ -365,7 +374,7 @@ If the containder ID is not obvious, but you can also retrieve it via: An example of retrieving the snapshot jar would be the following: - docker cp 83ad9afb6096:/java-stix/build/libs/stix-1.2.0.1-SNAPSHOT.jar . + docker cp 83ad9afb6096:/java-stix/build/libs/stix-1.2.0.2-SNAPSHOT.jar . By default the Docker container will build using OpenJdk 7. You can modify the Dockerfile to other JVM's noted in the file. Please, note Gradle targets From 0b396cc0e3ff1a1a48fa23e1005d18d10c66d6aa Mon Sep 17 00:00:00 2001 From: nemonik Date: Tue, 30 Jun 2015 02:18:40 -0400 Subject: [PATCH 39/43] doc: update Dockerfile and README.MD documentation --- Dockerfile | 8 ++++---- README.MD | 26 +++++++++++++------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4ec68c3..b5cba3f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,9 +21,9 @@ # To retrieve the jar archives from the running docker container use following # from the command-line of your docker host, not the container: # -# docker cp :/java-stix/build/libs/stix-1.2.0.2-SNAPSHOT-javadoc.jar . -# docker cp :/java-stix/build/libs/stix-1.2.0.2-SNAPSHOT-sources.jar . -# docker cp :/java-stix/build/libs/stix-1.2.0.2-SNAPSHOT.jar . +# docker cp :/java-stix/build/libs/stix-1.1.1.2-SNAPSHOT-javadoc.jar . +# docker cp :/java-stix/build/libs/stix-1.1.1.2-SNAPSHOT-sources.jar . +# docker cp :/java-stix/build/libs/stix-1.1.1.2-SNAPSHOT.jar . # # If the containder ID is not obvious, but you can also retrieve it via: # @@ -31,7 +31,7 @@ # # An example of retrieving the snapshot jar would be the following: # -# ➜ /tmp docker cp 83ad9afb6096:/java-stix/build/libs/stix-1.1.1.1-SNAPSHOT.jar . +# ➜ /tmp docker cp 83ad9afb6096:/java-stix/build/libs/stix-1.1.1.2-SNAPSHOT.jar . # # ############################################################ diff --git a/README.MD b/README.MD index 11d5bf3..f5c7edb 100644 --- a/README.MD +++ b/README.MD @@ -25,7 +25,7 @@ see TODO.txt for a tentative roadmap. Releases will be announced on the [STIX discussion list][list]. A java-stix for a particular schema release will match the STIX schema version in Semantic Versioning form. Follow up patches of java-stix for a particular schema release will increment a 4th digit. For example, the first -patch release for java-stix `v1.2.0` would be `v1.2.0.2`. Patches will be worked +patch release for java-stix `v1.1.1` would be `v1.1.1.1`. Patches will be worked in a branch prior to being tagged and released. ## Got a Question or Problem? @@ -45,16 +45,16 @@ Releases are distributed via the Maven Central Repository. org.mitre stix - 1.2.0.2 + 1.1.1.2 ### Gradle: - compile 'org.mitre:stix:1.2.0.2' + compile 'org.mitre:stix:1.1.1.2' ### Apache Ivy: - + ## Snapshots @@ -77,7 +77,7 @@ Users using Apache Maven for example can simply retrieve java-stix directly via org.mitre stix - 1.2.0.2-SNAPSHOT + 1.1.1.2-SNAPSHOT @@ -158,8 +158,8 @@ commands on the command line: git submodule init git submodule update --force - cd src/main/resources/schemas/v1.2.0 - git checkout tags/v1.2.0 + cd src/main/resources/schemas/v1.1.1 + git checkout tags/v1.1.1 Your not done. You'll also need to retrieve the CybOX schemas. @@ -167,11 +167,11 @@ Your not done. You'll also need to retrieve the CybOX schemas. While in the project: - cd src/main/resources/schemas/v1.2.0 + cd src/main/resources/schemas/v1.1.1 git submodule init git submodule update --force cd cybox - git checkout 97beb32c376a9223e91b52cb3e4c8d2af6baf786 + git checkout 3442ebe50385d3bd0b3305952b90d296e0a1242c When Gradle build script first runs it will also patch the CybOX schemas so that the JAXB2 Simple Document Object Model can be generated. Once patched, it @@ -364,9 +364,9 @@ Then create a container using the image you just created via: To retreive the jar archives from the running docker container use following from the command-line of your docker host, not the container: - docker cp :/java-stix/build/libs/stix-1.2.0.2-SNAPSHOT-javadoc.jar . - docker cp :/java-stix/build/libs/stix-1.2.0.2-SNAPSHOT-sources.jar . - docker cp :/java-stix/build/libs/stix-1.2.0.2-SNAPSHOT.jar . + docker cp :/java-stix/build/libs/stix-1.1.1.2-SNAPSHOT-javadoc.jar . + docker cp :/java-stix/build/libs/stix-1.1.1.2-SNAPSHOT-sources.jar . + docker cp :/java-stix/build/libs/stix-1.1.1.2-SNAPSHOT.jar . If the containder ID is not obvious, but you can also retrieve it via: @@ -374,7 +374,7 @@ If the containder ID is not obvious, but you can also retrieve it via: An example of retrieving the snapshot jar would be the following: - docker cp 83ad9afb6096:/java-stix/build/libs/stix-1.2.0.2-SNAPSHOT.jar . + docker cp 83ad9afb6096:/java-stix/build/libs/stix-1.1.1.2-SNAPSHOT.jar . By default the Docker container will build using OpenJdk 7. You can modify the Dockerfile to other JVM's noted in the file. Please, note Gradle targets From 7fef548a95a79d54fdd20c425aa6afceacf3405c Mon Sep 17 00:00:00 2001 From: nemonik Date: Wed, 1 Jul 2015 14:48:14 -0400 Subject: [PATCH 40/43] changes for pom --- build.gradle | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build.gradle b/build.gradle index 6bd1c20..f4d52c4 100644 --- a/build.gradle +++ b/build.gradle @@ -189,6 +189,11 @@ uploadArchives{ } developers { + developer { + id 'stix' + name 'STIX Project, The MITRE Corporation' + email 'stix[ASCII character number 64]mitre.org' + }, developer { id 'nemonik' name 'Michael Joseph Walsh' From 66c6074e1f1c80ec9ae6cdefe9480c2c2908f4ff Mon Sep 17 00:00:00 2001 From: nemonik Date: Wed, 1 Jul 2015 14:56:39 -0400 Subject: [PATCH 41/43] changes for pom --- build.gradle | 56 ++++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/build.gradle b/build.gradle index f4d52c4..0e8c135 100644 --- a/build.gradle +++ b/build.gradle @@ -12,19 +12,19 @@ * * from the commnand-line and the build task will execute by default. * - * The Jar will be built to + * The Jar will be built to + * + * build/libs/stix-${version}.jar * - * build/libs/stix-${version}.jar - * * * Publishing archives: * * signingKeyId, signingPassword, secretKeyFile, ossrhUsername, and ossrhPassword properties * should be defined outside of the repository either on the command-line via - * + * * ./gradlew -PsigningKeyId=value -PsigningPassword=value -PsecretKeyFile=value -PossrhUsername=value -PossrhPassword=value * - * or via ~/.gradle/gradle.properties as + * or via ~/.gradle/gradle.properties as * * signingKeyId=value * signingPassword=value @@ -38,7 +38,7 @@ * * ./gradlew uploadArchives * - * Otherwise you can publish a release to staging by executing the "uploadArchives" task + * Otherwise you can publish a release to staging by executing the "uploadArchives" task * with "release" property like so: * * ./gradlew uploadArchives -Prelease @@ -105,7 +105,7 @@ task wrapper(type: Wrapper) { inputs.property("jvmOpts", jvmOpts) doLast { def optsEnvVar = "DEFAULT_JVM_OPTS" - scriptFile.write scriptFile.text.replace("$optsEnvVar=\"\"", "$optsEnvVar=\"$jvmOpts\"") + scriptFile.write scriptFile.text.replace("$optsEnvVar=\"\"", "$optsEnvVar=\"$jvmOpts\"") batchScript.write batchScript.text.replace("set $optsEnvVar=", "set $optsEnvVar=$jvmOpts") } } @@ -151,43 +151,43 @@ uploadArchives{ if (!project.hasProperty("ossrhUsername")) { throw new GradleException("No value has been specified for property 'ossrhUsername'.") } - + if (!project.hasProperty("ossrhPassword")) { throw new GradleException("No value has been specified for property 'ossrhPassword'.") } - + signing.signPom(deployment) } - + repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { authentication(userName: project.hasProperty("ossrhUsername") ? ossrhUsername : "", password: project.hasProperty("ossrhPassword") ? ossrhPassword: "") } - + snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") { authentication(userName: project.hasProperty("ossrhUsername") ? ossrhUsername : "", password: project.hasProperty("ossrhPassword") ? ossrhPassword: "") } - + pom.project { name "${project.name}" packaging 'jar' version "${project.version}" - // optionally artifactId can be defined here + // optionally artifactId can be defined here description "The Java bindings for STIX v." + version url "https://github.com/STIXProject/java-stix" - + scm { connection "https://github.com/STIXProject/java-stix.git" developerConnection "https://github.com/STIXProject/java-stix.git" url "https://github.com/STIXProject/java-stix" } - + licenses { license { name "The BSD 3-Clause License" url "https://raw.githubusercontent.com/STIXProject/java-stix/master/LICENSE" } } - + developers { developer { id 'stix' @@ -213,17 +213,17 @@ gradle.taskGraph.whenReady { taskGraph -> ext."signing.secretKeyRingFile" = project.hasProperty("secretKeyFile") ? secretKeyFile: "" } } - + if (taskGraph.hasTask(tasks.uploadArchives)) { if (has("release")) { if (!project.hasProperty("signingKeyId")) { throw new GradleException("No value has been specified for property 'signingKeyId'.") } - + if (!project.hasProperty("signingPassword")) { throw new GradleException("No value has been specified for property 'signingPassword'.") } - + if (!project.hasProperty("secretKeyFile")) { throw new GradleException("No value has been specified for property 'secretKeyFile'.") } @@ -266,13 +266,13 @@ dependencies { compile "org.apache.httpcomponents:httpclient-cache:4.3.5" compile "org.apache.httpcomponents:httpmime:4.3.5" compile "org.apache.httpcomponents:fluent-hc:4.3.5" - + compile "org.springframework:spring-core:4.1.4.RELEASE" - + compile "commons-io:commons-io:2.4" - + compile "commons-lang:commons-lang:2.6" - + testCompile "org.codehaus.groovy:groovy:2.4.3" testCompile "org.spockframework:spock-core:1.0-groovy-2.4" testCompile "xmlunit:xmlunit:1.6" @@ -299,7 +299,7 @@ javadoc { include "**/org/mitre/**/*" include "**/org/purl/**/*" include "**/org/w3/**/*" - + options.overview = "src/main/javadoc/overview.html"; options.showAll() options.encoding("UTF-8") @@ -309,7 +309,7 @@ javadoc { options.windowTitle("java-stix v." + version) options.docTitle("java-stix v." + version) options.footer("Copyright (c) 2015, The MITRE Corporation. All rights reserved.") - + doFirst { javadoc.title = "java-stix v." + version javadoc.options.docTitle = javadoc.title @@ -339,7 +339,7 @@ buildscript { jcenter() mavenCentral() mavenLocal() - + flatDir { dirs "libs" } } @@ -355,12 +355,12 @@ buildscript { classpath name: "org.eclipse.core.resources_3.9.0.v20140514-1307" classpath name: "org.eclipse.jdt.core_3.10.0.v20140604-1726" classpath name: "org.eclipse.equinox.registry_3.5.400.v20140428-1507" - + // Needed for GenerateJAXBTask classpath "com.sun.xml.bind:jaxb-xjc:2.2.5-2" classpath "com.sun.xml.bind:jaxb-impl:2.2.5-2" classpath "javax.xml.bind:jaxb-api:2.2.+" - + classpath "org.jvnet.jaxb2_commons:jaxb2-basics:0.6.5" classpath "org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.6.5" classpath "org.jvnet.jaxb2_commons:jaxb2-fluent-api:3.0" From 3d8874e8f0b5c156909916a624c3c0c40d63b9cb Mon Sep 17 00:00:00 2001 From: nemonik Date: Wed, 1 Jul 2015 15:07:30 -0400 Subject: [PATCH 42/43] changed MAINTAINER --- Dockerfile | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index b5cba3f..6a8e74b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,17 +8,17 @@ # @author nemonik (Michael Joseph Walsh ) # # WHAT TO DO: -# -# If you have Docker installed, from the root of the project run +# +# If you have Docker installed, from the root of the project run # the following to create a container image for this Dockerfile via: # -# docker build -t nemonik/java-stix . +# docker build -t stix/java-stix . # # Then create a container using the image you just created via: # -# docker run -t -i nemonik/java-stix /bin/bash +# docker run -t -i stix/java-stix /bin/bash # -# To retrieve the jar archives from the running docker container use following +# To retrieve the jar archives from the running docker container use following # from the command-line of your docker host, not the container: # # docker cp :/java-stix/build/libs/stix-1.1.1.2-SNAPSHOT-javadoc.jar . @@ -31,7 +31,7 @@ # # An example of retrieving the snapshot jar would be the following: # -# ➜ /tmp docker cp 83ad9afb6096:/java-stix/build/libs/stix-1.1.1.2-SNAPSHOT.jar . +# ➜ /tmp docker cp 83ad9afb6096:/java-stix/build/libs/stix-1.1.1.2-SNAPSHOT.jar . # # ############################################################ @@ -40,7 +40,7 @@ FROM ubuntu:15.04 # File Maintainer -MAINTAINER Michael Joseph Walsh +MAINTAINER STIX Project, The MITRE Corporation # Update the sources list RUN apt-get -y update @@ -50,13 +50,13 @@ RUN apt-get install -y tar git curl nano wget dialog net-tools build-essential s # To install the default OpenJDK environment RUN add-apt-repository -y ppa:openjdk-r/ppa -RUN apt-get -y update +RUN apt-get -y update RUN apt-get -y install openjdk-8-jdk # To install the OpenJDK 7, comment out the above and uncomment the following. #RUN apt-get install -y openjdk-7-jdk -# Optionally to install the Oracle JDK, comment out the above, uncomment the +# Optionally to install the Oracle JDK, comment out the above, uncomment the # the next 3 lines, and then uncommment the preferred JDK version. #RUN apt-get -y install python-software-properties #RUN add-apt-repository -y ppa:webupd8team/java From 949745db8fdc3bf85a883787061276fe40d53862 Mon Sep 17 00:00:00 2001 From: nemonik Date: Wed, 1 Jul 2015 15:27:09 -0400 Subject: [PATCH 43/43] changes for pom --- build.gradle | 5 ----- 1 file changed, 5 deletions(-) diff --git a/build.gradle b/build.gradle index 0e8c135..89228ad 100644 --- a/build.gradle +++ b/build.gradle @@ -193,11 +193,6 @@ uploadArchives{ id 'stix' name 'STIX Project, The MITRE Corporation' email 'stix[ASCII character number 64]mitre.org' - }, - developer { - id 'nemonik' - name 'Michael Joseph Walsh' - email 'java-stix-pom[ASCII character number 64]nemonik.com' } } }