Skip to content

Add BND configuration to log4j-1.2-api #1825

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

Merged
merged 2 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions log4j-1.2-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,24 @@
<docLabel>Log4j 1.2 Documentation</docLabel>
<projectDir>/log4j12-api</projectDir>
<module.name>org.apache.log4j</module.name>

<!--
~ OSGi and JPMS options
-->
<bnd-module-name>org.apache.log4j</bnd-module-name>
<bnd-extra-package-options>
<!-- JMX support -->
com.sun.jdmk.comm;resolution:=optional,
<!-- JMS is optional -->
javax.jms;version="[1.1,3)";resolution:=optional,
<!-- Log4j Core is optional -->
org.apache.logging.log4j.core.*;resolution:=optional
</bnd-extra-package-options>
<bnd-extra-module-options>
<!-- Log4j Core is not transitive -->
org.apache.logging.log4j.core;transitive=false;static=true
</bnd-extra-module-options>
<Fragment-Host>org.apache.logging.log4j.core</Fragment-Host>
</properties>
<dependencies>
<!-- Used for JMS appenders (needs an implementation of course) -->
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* 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.
*/
@Open("org.apache.logging.log4j.core")
package org.apache.log4j.builders.appender;

import aQute.bnd.annotation.jpms.Open;
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* 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.
*/
@Open("org.apache.logging.log4j.core")
package org.apache.log4j.builders.filter;

import aQute.bnd.annotation.jpms.Open;
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* 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.
*/
@Open("org.apache.logging.log4j.core")
package org.apache.log4j.builders.layout;

import aQute.bnd.annotation.jpms.Open;
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* 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.
*/
@ExportTo("org.apache.logging.log4j.core")
@Open("org.apache.logging.log4j.core")
package org.apache.log4j.builders;

import aQute.bnd.annotation.jpms.ExportTo;
import aQute.bnd.annotation.jpms.Open;
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* 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.
*/
@Open("org.apache.logging.log4j.core")
package org.apache.log4j.builders.rewrite;

import aQute.bnd.annotation.jpms.Open;
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* 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.
*/
@Open("org.apache.logging.log4j.core")
package org.apache.log4j.builders.rolling;

import aQute.bnd.annotation.jpms.Open;
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,9 @@
/**
* Log4j 1.x compatibility layer.
*/
@ExportTo("org.apache.logging.log4j.core")
@Open("org.apache.logging.log4j.core")
package org.apache.log4j.config;

import aQute.bnd.annotation.jpms.ExportTo;
import aQute.bnd.annotation.jpms.Open;
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@
/**
* Log4j 1.x compatibility layer.
*/
@Export
package org.apache.log4j.helpers;

import org.osgi.annotation.bundle.Export;
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@
/**
* This package lets you manage log4j settings using JMX. It is unfortunately not of production quality.
*/
@Export
package org.apache.log4j.jmx;

import org.osgi.annotation.bundle.Export;
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* 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.
*/
@Export
package org.apache.log4j.or.jms;

import org.osgi.annotation.bundle.Export;
20 changes: 20 additions & 0 deletions log4j-1.2-api/src/main/java/org/apache/log4j/or/package-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* 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.
*/
@Export
package org.apache.log4j.or;

import org.osgi.annotation.bundle.Export;
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@
/**
* Log4j 1.x compatibility layer.
*/
@Export
package org.apache.log4j;

import org.osgi.annotation.bundle.Export;
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* 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.
*/
@Export
package org.apache.log4j.pattern;

import org.osgi.annotation.bundle.Export;
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* 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.
*/
@Export
package org.apache.log4j.rewrite;

import org.osgi.annotation.bundle.Export;
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@
/**
* Log4j 1.x compatibility layer.
*/
@Export
package org.apache.log4j.spi;

import org.osgi.annotation.bundle.Export;
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* 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.
*/
@Export
package org.apache.log4j.varia;

import org.osgi.annotation.bundle.Export;
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@
/**
* Log4j 1.x compatibility layer.
*/
@Export
package org.apache.log4j.xml;

import org.osgi.annotation.bundle.Export;
1 change: 0 additions & 1 deletion log4j-api-java9/src/assembly/java9.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
<directory>${project.build.outputDirectory}</directory>
<outputDirectory>/classes/META-INF/versions/9</outputDirectory>
<includes>
<include>module-info.class</include>
<include>org/apache/logging/log4j/util/Base64Util.class</include>
<include>org/apache/logging/log4j/util/ProcessIdUtil.class</include>
<include>org/apache/logging/log4j/util/StackLocator.class</include>
Expand Down
37 changes: 0 additions & 37 deletions log4j-api-java9/src/main/java/module-info.java

This file was deleted.

This file was deleted.

Loading