Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync main branch with Apache main branch #88

Merged
merged 9 commits into from
Nov 18, 2024
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ local/
!.github
!.git-blame-ignore-revs
!.openrewrite
!.rat-excludes
nbproject
*.ipr
*.iws
Expand Down
28 changes: 28 additions & 0 deletions DISCLAIMER-BINARY
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!--
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.
-->

## Disclaimer for (Test) Binaries

The following binaries are included in this project for testing purposes only:

efesto/efesto-core/efesto-common-api/src/test/resources/TestJar.jar : a compressed JSON file for test
efesto/efesto-core/efesto-common-core/src/test/resources/TestJar.jar : a compressed JSON file for test
efesto/efesto-core/efesto-runtime-manager/efesto-runtime-manager-core/src/test/resources/TestJar.jar : a compressed JSON file for test

These files are used to validate the functionality and reliability of Apache KIE. They are not intended for production use or distribution beyond the scope of testing within this project.
44 changes: 44 additions & 0 deletions LICENSE-Apache-2.0.txt → LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -200,3 +200,47 @@
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.

------------------------------------------------------------------------------------
for drools-drl/drools-drl-parser/src/main/antlr4/org/drools/drl/parser/antlr4/JavaLexer.g4
drools-drl/drools-drl-parser/src/main/antlr4/org/drools/drl/parser/antlr4/JavaParser.g4

[The "BSD licence"]
Copyright (c) 2013 Terence Parr, Sam Harwell
Copyright (c) 2017 Ivan Kochurkin (upgrade to Java 8)
Copyright (c) 2021 Michał Lorek (upgrade to Java 11)
Copyright (c) 2022 Michał Lorek (upgrade to Java 17)
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

------------------------------------------------------------------------------------
for drools-decisiontables/src/main/java/org/drools/decisiontable/parser/csv/CsvLineParser.java

Inner logic adapted from a C++ original that was Copyright (C) 1999
Lucent Technologies Excerpted from 'The Practice of Programming' by Brian
Kernighan and Rob Pike.

Included by permission of the http://tpop.awl.com/ web site, which says:
"You may use this code for any purpose, as long as you leave the
copyright notice and book citation attached."
20 changes: 1 addition & 19 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,5 @@ This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).

The Initial Developer of some parts of the framework, which are copied from, derived from, or
inspired by KIE (Knowledge Is Everthing) group, is Red Hat, Inc (https://www.redhat.com/).
inspired by KIE (Knowledge Is Everything) group, is Red Hat, Inc (https://www.redhat.com/).
Copyright Red Hat, Inc. and/or its affiliates.. All Rights Reserved.

This product also includes the following third-party components:

* lunr 2.3.9
Downloaded from: https://lunrjs.com/
License: MIT

* Saxon-HE
Downloaded from: https://www.saxonica.com/
License: Mozilla Public License 2.0

* search-ui
Downloaded from: https://gitlab.com/antora/antora-lunr-extension
License: Mozilla Public License 2.0

* JavaParser, JavaLexer
Downloaded from: https://github.com/antlr/grammars-v4/tree/master/java/java
License: BSD License
2 changes: 1 addition & 1 deletion build-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<version.com.h2database>2.2.220</version.com.h2database>
<version.com.networknt.json-schema-validator>1.0.86</version.com.networknt.json-schema-validator>
<version.com.sun.xml.bind>4.0.4</version.com.sun.xml.bind>
<version.com.thoughtworks.xstream>1.4.20</version.com.thoughtworks.xstream>
<version.com.thoughtworks.xstream>1.4.21</version.com.thoughtworks.xstream>
<version.guru.nidi>0.18.0</version.guru.nidi>
<version.info.picocli>4.7.5</version.info.picocli>
<version.io.micrometer>1.12.2</version.io.micrometer>
Expand Down
Binary file not shown.
Binary file removed drools-compiler/src/test/resources/KAModelTest.jar
Binary file not shown.
Binary file not shown.
Binary file removed drools-compiler/src/test/resources/primespoc.jar
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,21 +1,3 @@
/**
* 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.
*/
package org.drools.decisiontable.parser.csv;

import java.util.ArrayList;
Expand Down
19 changes: 0 additions & 19 deletions drools-docs/supplemental-ui/css/search.css
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
/*
* 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.
*/

/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -871,48 +871,6 @@ private void unsetPrivateKeyProperties() {
KeyStoreHelper.reInit();
}

/**
* In this case we are dealing with facts which are not on the systems classpath.
*/
@Test
public void testSerializabilityWithJarFacts() throws Exception {
MapBackedClassLoader loader = new MapBackedClassLoader( this.getClass().getClassLoader() );

JarInputStream jis = new JarInputStream( this.getClass().getResourceAsStream( "/billasurf.jar" ) );

JarEntry entry = null;
byte[] buf = new byte[1024];
int len = 0;
while ( (entry = jis.getNextJarEntry()) != null ) {
if ( !entry.isDirectory() ) {
ByteArrayOutputStream out = new ByteArrayOutputStream();
while ( (len = jis.read( buf )) >= 0 ) {
out.write( buf,
0,
len );
}
loader.addResource( entry.getName(),
out.toByteArray() );
}
}

String drl = "package foo.bar \n" +
"import com.billasurf.Board\n" +
"rule 'MyGoodRule' \n dialect 'mvel' \n when " +
" Board() " +
"then \n" +
" System.err.println(42); \n" +
"end\n";


KnowledgeBuilderConfiguration kbuilderConf = KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration(null, loader);

Collection<KiePackage> kpkgs = loadKnowledgePackagesFromString(kbuilderConf, drl);

kpkgs = SerializationHelper.serializeObject( kpkgs, loader );

}

@Test
public void testEmptyRule() throws Exception {
String rule = "package org.drools.compiler.test;\n";
Expand Down
28 changes: 28 additions & 0 deletions drools-test-coverage/drools-test-coverage-jars/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!--
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.
-->

## drools-test-coverage-jars
This project is to build jars that are used in `drools-test-coverage` project. So we can avoid having jar binaries in the codebase.

### How to add a jar project
If the jar is not a kjar, you can simply add the jar project under this project. `surf` project is an example.

If the jar has a fixed version while requires the current version for dependency or plugin (e.g. jar version is `1.0.0`, but requires `999-SNAPSHOT` kie-maven-plugin to build the kjar), use `drools-test-coverage-jars-with-invoker` to build the jar with maven-invoker-plugin. Place the jar project under `src/it`. `kie-poject-simple` is an example.

In both cases, you would need to copy the jar file to the target test project using `copy-rename-maven-plugin`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

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.

-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>drools-test-coverage-jars</artifactId>
<groupId>org.drools.testcoverage</groupId>
<version>999-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>drools-test-coverage-jars-with-invoker</artifactId>

<name>Drools :: Test Coverage :: Jars for tests built by invoker</name>

<properties>
<java.module.name>org.drools.compiler.integrationtests.jars.with.invoker</java.module.name>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<org.kie.version>${project.version}</org.kie.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-maven-plugin</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-maven-plugin</artifactId>
<exclusions>
<exclusion>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-util</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

<build>
<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
<configuration>
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
<streamLogs>true</streamLogs>
<goal>clean</goal>
<goal>package</goal>
</configuration>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>

</plugins>
</build>
</project>
Loading
Loading