Skip to content

Commit 46a672c

Browse files
committed
Add BND configuration to Core dependants
1 parent c317e9f commit 46a672c

File tree

58 files changed

+759
-20
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+759
-20
lines changed

log4j-api-test/pom.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,30 @@
3030
<log4jParentDir>${basedir}/..</log4jParentDir>
3131
<docLabel>API Documentation</docLabel>
3232
<projectDir>/api</projectDir>
33+
34+
<!--
35+
~ OSGi and JPMS options
36+
-->
37+
<bnd-module-name>org.apache.logging.log4j.test</bnd-module-name>
38+
<bnd-extra-package-options>
39+
<!-- Both JUnit 4 and JUnit 5 are not required -->
40+
org.junit.*;resolution:=optional,
41+
org.hamcrest.*;resolution:=optional,
42+
org.junitpioneer.*;resolution:=optional,
43+
org.apache.maven.*;resolution:=optional,
44+
org.codehaus.plexus.util.*;resolution:=optional,
45+
</bnd-extra-package-options>
46+
<bnd-extra-module-options>
47+
<!-- Non-transitive static modules -->
48+
junit;transitive=false,
49+
maven.core;substitute="maven-core";transitive=false,
50+
maven.model;substitute="maven-model";transitive=false,
51+
maven.model.builder;substitute="maven-model-builder";transitive=false,
52+
org.hamcrest;transitive=false,
53+
org.junit.jupiter.api;transitive=false,
54+
org.junitpioneer;transitive=false
55+
</bnd-extra-module-options>
56+
<Fragment-Host>org.apache.logging.log4j.core</Fragment-Host>
3357
</properties>
3458
<dependencies>
3559
<dependency>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache license, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the license for the specific language governing permissions and
15+
* limitations under the license.
16+
*/
17+
@Export
18+
package org.apache.logging.log4j.test.junit;
19+
20+
import org.osgi.annotation.bundle.Export;
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache license, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the license for the specific language governing permissions and
15+
* limitations under the license.
16+
*/
17+
@Export
18+
package org.apache.logging.log4j.test;
19+
20+
import org.osgi.annotation.bundle.Export;
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache license, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the license for the specific language governing permissions and
15+
* limitations under the license.
16+
*/
17+
@Export
18+
package org.apache.logging.log4j.test.util;
19+
20+
import org.osgi.annotation.bundle.Export;

log4j-cassandra/pom.xml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,16 @@
3030
<log4jParentDir>${basedir}/..</log4jParentDir>
3131
<docLabel>Cassandra Documentation</docLabel>
3232
<projectDir>/log4j-cassandra</projectDir>
33-
<module.name>org.apache.logging.log4j.cassandra</module.name>
33+
34+
<!--
35+
~ OSGi and JPMS options
36+
-->
37+
<bnd-extra-module-options>
38+
<!-- Standardize name -->
39+
cassandra.driver.core;substitute="cassandra-driver-core"
40+
</bnd-extra-module-options>
41+
42+
<Fragment-Host>org.apache.logging.log4j.core</Fragment-Host>
3443

3544
<!-- cassandra-all breaks with a newer version -->
3645
<!-- at least this version has one CVE less than the one suggested by Cassandra -->

log4j-cassandra/src/main/java/org/apache/logging/log4j/cassandra/package-info.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,9 @@
2020
* @see <a href="https://logging.apache.org/log4j/2.x/manual/appenders.html#CassandraAppender">Cassandra Appender manual</a>
2121
* @since 2.8
2222
*/
23+
@Export
24+
@Open("org.apache.logging.log4j.core")
2325
package org.apache.logging.log4j.cassandra;
26+
27+
import aQute.bnd.annotation.jpms.Open;
28+
import org.osgi.annotation.bundle.Export;

log4j-core-test/pom.xml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,32 @@
3030
<log4jParentDir>${basedir}/..</log4jParentDir>
3131
<docLabel>Core Documentation</docLabel>
3232
<projectDir>/core</projectDir>
33+
34+
<!--
35+
~ OSGi and JPMS options
36+
-->
37+
<bnd-module-name>org.apache.logging.log4j.core.test</bnd-module-name>
38+
<bnd-extra-package-options>
39+
<!-- Both JUnit 4 and JUnit 5 are not required -->
40+
org.junit.*;resolution:=optional,
41+
org.hamcrest.*;resolution:=optional,
42+
org.junitpioneer.*;resolution:=optional,
43+
com.google.monitoring.*;resolution:=optional,
44+
javax.tools;resolution:=optional,
45+
org.assertj.*;resolution:=optional,
46+
org.awaitility.*;resolution:=optional,
47+
org.springframework.mock.*;resolution:=optional
48+
</bnd-extra-package-options>
49+
<bnd-extra-module-options>
50+
<!-- Non-transitive modules -->
51+
junit;transitive=false,
52+
org.hamcrest;transitive=false,
53+
org.junit.jupiter.api;transitive=false,
54+
<!-- Name changes -->
55+
org.assertj.core;substitute="assertj-core",
56+
java.allocation.instrumenter;substitute="java-allocation-instrumenter",
57+
spring.test;substitute="spring-test"
58+
</bnd-extra-module-options>
3359
</properties>
3460
<dependencies>
3561
<!-- Pull in useful test classes from API -->
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache license, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the license for the specific language governing permissions and
15+
* limitations under the license.
16+
*/
17+
@Export
18+
package org.apache.logging.log4j.core.test.appender.db.jdbc;
19+
20+
import org.osgi.annotation.bundle.Export;
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache license, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the license for the specific language governing permissions and
15+
* limitations under the license.
16+
*/
17+
@Export
18+
package org.apache.logging.log4j.core.test.appender;
19+
20+
import org.osgi.annotation.bundle.Export;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache license, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the license for the specific language governing permissions and
15+
* limitations under the license.
16+
*/
17+
@Export
18+
package org.apache.logging.log4j.core.test.appender.rolling.action;
19+
20+
import org.osgi.annotation.bundle.Export;

log4j-core-test/src/main/java/org/apache/logging/log4j/core/test/categories/package-info.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,7 @@
1919
* JUnit test categories. Unit tests should not specify a category as most tests are unit tests. For performance and
2020
* integration tests, an appropriate category interface should be specified.
2121
*/
22+
@Export
2223
package org.apache.logging.log4j.core.test.categories;
24+
25+
import org.osgi.annotation.bundle.Export;
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache license, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the license for the specific language governing permissions and
15+
* limitations under the license.
16+
*/
17+
@Export
18+
package org.apache.logging.log4j.core.test.hamcrest;
19+
20+
import org.osgi.annotation.bundle.Export;

log4j-core-test/src/main/java/org/apache/logging/log4j/core/test/junit/package-info.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,7 @@
1919
* JUnit helper classes and TestRules.
2020
* @see org.junit.rules.TestRule
2121
*/
22+
@Export
2223
package org.apache.logging.log4j.core.test.junit;
24+
25+
import org.osgi.annotation.bundle.Export;
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache license, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the license for the specific language governing permissions and
15+
* limitations under the license.
16+
*/
17+
@Export
18+
package org.apache.logging.log4j.core.test.layout;
19+
20+
import org.osgi.annotation.bundle.Export;
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache license, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the license for the specific language governing permissions and
15+
* limitations under the license.
16+
*/
17+
@Export
18+
package org.apache.logging.log4j.core.test.net.mock;
19+
20+
import org.osgi.annotation.bundle.Export;
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache license, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the license for the specific language governing permissions and
15+
* limitations under the license.
16+
*/
17+
@Export
18+
package org.apache.logging.log4j.core.test.net.ssl;
19+
20+
import org.osgi.annotation.bundle.Export;
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache license, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the license for the specific language governing permissions and
15+
* limitations under the license.
16+
*/
17+
@Export
18+
package org.apache.logging.log4j.core.test;
19+
20+
import org.osgi.annotation.bundle.Export;
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache license, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the license for the specific language governing permissions and
15+
* limitations under the license.
16+
*/
17+
@Export
18+
package org.apache.logging.log4j.core.test.smtp;
19+
20+
import org.osgi.annotation.bundle.Export;
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache license, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the license for the specific language governing permissions and
15+
* limitations under the license.
16+
*/
17+
@Export
18+
package org.apache.logging.log4j.core.test.util;
19+
20+
import org.osgi.annotation.bundle.Export;

log4j-couchdb/pom.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@
3030
<log4jParentDir>${basedir}/..</log4jParentDir>
3131
<docLabel>CouchDB Documentation</docLabel>
3232
<projectDir>/log4j-couchdb</projectDir>
33-
<module.name>org.apache.logging.log4j.couchdb</module.name>
33+
34+
<!--
35+
~ OSGi and JPMS options
36+
-->
37+
<Fragment-Host>org.apache.logging.log4j.core</Fragment-Host>
3438
</properties>
3539

3640
<dependencies>

0 commit comments

Comments
 (0)