Skip to content

Commit

Permalink
Use SPDX license identifiers with correct license (resolves IBM-Block…
Browse files Browse the repository at this point in the history
…chain#41) (IBM-Blockchain#42)

* Use SPDX license identifiers with correct license (resolves IBM-Blockchain#41)

Signed-off-by: Simon Stone <[email protected]>

* Use Fabric Java shim 1.3.1-SNAPSHOT package

Signed-off-by: Simon Stone <[email protected]>
  • Loading branch information
Simon Stone authored and cazfletch committed Oct 29, 2018
1 parent e59ea72 commit 9a0a798
Show file tree
Hide file tree
Showing 54 changed files with 89 additions and 664 deletions.
12 changes: 1 addition & 11 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# SPDX-License-Identifier: Apache-2.0
#

root = true
Expand Down
12 changes: 1 addition & 11 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# SPDX-License-Identifier: Apache-2.0
#

coverage
Expand Down
15 changes: 1 addition & 14 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* SPDX-License-Identifier: Apache-2.0
*/

module.exports = {
Expand Down
12 changes: 1 addition & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# SPDX-License-Identifier: Apache-2.0
#

# Logs
Expand Down
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#
# SPDX-License-Identifier: Apache-2.0
#

sudo: required
services:
- docker
Expand Down
15 changes: 1 addition & 14 deletions generators/app/index.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* SPDX-License-Identifier: Apache-2.0
*/

'use strict';
Expand Down
18 changes: 3 additions & 15 deletions generators/chaincode/index.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* SPDX-License-Identifier: Apache-2.0
*/

'use strict';
Expand Down Expand Up @@ -65,6 +52,7 @@ module.exports = class extends Generator {
}];
const answers = await this.prompt(questions);
Object.assign(this.options, answers);
this.options.spdxAndLicense = `SPDX-License-Identifier: ${this.options.license}`;
}

async writing () {
Expand All @@ -87,6 +75,6 @@ module.exports = class extends Generator {
}

end(){
console.log('Finished generating contract');
console.log('Finished generating chaincode');
}
};
12 changes: 1 addition & 11 deletions generators/chaincode/templates/go/.editorconfig
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# <%= spdxAndLicense // SPDX-License-Identifier: Apache-2.0 %>
#

root = true
Expand Down
12 changes: 1 addition & 11 deletions generators/chaincode/templates/go/.gitignore-hidefromnpm
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# <%= spdxAndLicense // SPDX-License-Identifier: Apache-2.0 %>
#

# Binaries for programs and plugins
Expand Down
15 changes: 1 addition & 14 deletions generators/chaincode/templates/go/chaincode.go
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* <%= spdxAndLicense // SPDX-License-Identifier: Apache-2.0 %>
*/

package main
Expand Down
4 changes: 4 additions & 0 deletions generators/chaincode/templates/go/chaincode_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/*
* <%= spdxAndLicense // SPDX-License-Identifier: Apache-2.0 %>
*/

package main

import (
Expand Down
15 changes: 1 addition & 14 deletions generators/chaincode/templates/go/main.go
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* <%= spdxAndLicense // SPDX-License-Identifier: Apache-2.0 %>
*/

package main
Expand Down
12 changes: 1 addition & 11 deletions generators/chaincode/templates/java/.gitignore-hidefromnpm
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# <%= spdxAndLicense // SPDX-License-Identifier: Apache-2.0 %>
#

.gradle
Expand Down
17 changes: 2 additions & 15 deletions generators/chaincode/templates/java/build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* <%= spdxAndLicense // SPDX-License-Identifier: Apache-2.0 %>
*/

plugins {
Expand All @@ -22,7 +9,7 @@ plugins {
}

dependencies {
implementation 'org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:1.3.0-SNAPSHOT'
implementation 'org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:1.3.1-SNAPSHOT'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.+'
}
Expand Down
15 changes: 1 addition & 14 deletions generators/chaincode/templates/java/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* <%= spdxAndLicense // SPDX-License-Identifier: Apache-2.0 %>
*/

rootProject.name = '<%= name %>'
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* <%= spdxAndLicense // SPDX-License-Identifier: Apache-2.0 %>
*/

package org.example;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* <%= spdxAndLicense // SPDX-License-Identifier: Apache-2.0 %>
*/

package org.example;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* <%= spdxAndLicense // SPDX-License-Identifier: Apache-2.0 %>
*/

package org.example;
Expand Down
12 changes: 1 addition & 11 deletions generators/chaincode/templates/javascript/.editorconfig
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# <%= spdxAndLicense // SPDX-License-Identifier: Apache-2.0 %>
#

root = true
Expand Down
12 changes: 1 addition & 11 deletions generators/chaincode/templates/javascript/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# <%= spdxAndLicense // SPDX-License-Identifier: Apache-2.0 %>
#

coverage
15 changes: 1 addition & 14 deletions generators/chaincode/templates/javascript/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* <%= spdxAndLicense // SPDX-License-Identifier: Apache-2.0 %>
*/

module.exports = {
Expand Down
Loading

0 comments on commit 9a0a798

Please sign in to comment.