From 1cab6e48cb61edd78e9f535691ddb26dd4a4f767 Mon Sep 17 00:00:00 2001 From: rfeng Date: Mon, 5 Oct 2009 19:37:26 +0000 Subject: Move resource bundles to a package Set DynamicImport-Package * so that the Monitor can find resource bundles git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@821983 13f79535-47bb-0310-9956-ffa450edef68 --- java/sca/modules/monitor/META-INF/MANIFEST.MF | 1 + .../tuscany/sca/monitor/MonitorTestCase.java | 9 ++++---- .../tuscany-monitor-test-messages.properties | 24 ++++++++++++++++++++++ .../tuscany-monitor-test-messages_it.properties | 24 ++++++++++++++++++++++ .../tuscany-monitor-test-messages.properties | 24 ---------------------- .../tuscany-monitor-test-messages_it.properties | 24 ---------------------- 6 files changed, 54 insertions(+), 52 deletions(-) create mode 100644 java/sca/modules/monitor/src/test/resources/org/apache/tuscany/sca/monitor/tuscany-monitor-test-messages.properties create mode 100644 java/sca/modules/monitor/src/test/resources/org/apache/tuscany/sca/monitor/tuscany-monitor-test-messages_it.properties delete mode 100644 java/sca/modules/monitor/src/test/resources/tuscany-monitor-test-messages.properties delete mode 100644 java/sca/modules/monitor/src/test/resources/tuscany-monitor-test-messages_it.properties (limited to 'java/sca') diff --git a/java/sca/modules/monitor/META-INF/MANIFEST.MF b/java/sca/modules/monitor/META-INF/MANIFEST.MF index 161cbe7a8c..47de9d5253 100644 --- a/java/sca/modules/monitor/META-INF/MANIFEST.MF +++ b/java/sca/modules/monitor/META-INF/MANIFEST.MF @@ -9,6 +9,7 @@ Bundle-ManifestVersion: 2 Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt Bundle-Description: Apache Tuscany SCA Monitor Import-Package: org.apache.tuscany.sca.monitor;version="2.0.0" +DynamicImport-Package: * Bundle-SymbolicName: org.apache.tuscany.sca.monitor Bundle-DocURL: http://www.apache.org/ Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6 diff --git a/java/sca/modules/monitor/src/test/java/org/apache/tuscany/sca/monitor/MonitorTestCase.java b/java/sca/modules/monitor/src/test/java/org/apache/tuscany/sca/monitor/MonitorTestCase.java index 6e5fcd9015..b0d9ffb8ce 100644 --- a/java/sca/modules/monitor/src/test/java/org/apache/tuscany/sca/monitor/MonitorTestCase.java +++ b/java/sca/modules/monitor/src/test/java/org/apache/tuscany/sca/monitor/MonitorTestCase.java @@ -31,6 +31,7 @@ import org.junit.Test; */ public class MonitorTestCase { + private static final String MESSAGES = "org.apache.tuscany.sca.monitor.tuscany-monitor-test-messages"; private static MonitorFactory monitorFactory; @BeforeClass @@ -53,7 +54,7 @@ public class MonitorTestCase { problem = monitor.createProblem(this.getClass().getName(), - "tuscany-monitor-test-messages", + MESSAGES, Severity.WARNING, dummyModelObject, "MESSAGE1"); @@ -63,7 +64,7 @@ public class MonitorTestCase { problem = monitor.createProblem(this.getClass().getName(), - "tuscany-monitor-test-messages", + MESSAGES, Severity.WARNING, dummyModelObject, "MESSAGE2", @@ -72,7 +73,7 @@ public class MonitorTestCase { problem = monitor.createProblem(this.getClass().getName(), - "tuscany-monitor-test-messages", + MESSAGES, Severity.WARNING, dummyModelObject, "MESSAGE3", @@ -85,7 +86,7 @@ public class MonitorTestCase { problem = monitor.createProblem(this.getClass().getName(), - "tuscany-monitor-test-messages", + MESSAGES, Severity.ERROR, dummyModelObject, "MESSAGE4", diff --git a/java/sca/modules/monitor/src/test/resources/org/apache/tuscany/sca/monitor/tuscany-monitor-test-messages.properties b/java/sca/modules/monitor/src/test/resources/org/apache/tuscany/sca/monitor/tuscany-monitor-test-messages.properties new file mode 100644 index 0000000000..523263da40 --- /dev/null +++ b/java/sca/modules/monitor/src/test/resources/org/apache/tuscany/sca/monitor/tuscany-monitor-test-messages.properties @@ -0,0 +1,24 @@ +# +# +# 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. +# +# +MESSAGE1 = This is a test message with no params +MESSAGE2 = This is a test message with a string param {0} +MESSAGE3 = This is a test message with numbers {0}, {1}, {2} +MESSAGE4 = This is a test message with exception diff --git a/java/sca/modules/monitor/src/test/resources/org/apache/tuscany/sca/monitor/tuscany-monitor-test-messages_it.properties b/java/sca/modules/monitor/src/test/resources/org/apache/tuscany/sca/monitor/tuscany-monitor-test-messages_it.properties new file mode 100644 index 0000000000..523263da40 --- /dev/null +++ b/java/sca/modules/monitor/src/test/resources/org/apache/tuscany/sca/monitor/tuscany-monitor-test-messages_it.properties @@ -0,0 +1,24 @@ +# +# +# 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. +# +# +MESSAGE1 = This is a test message with no params +MESSAGE2 = This is a test message with a string param {0} +MESSAGE3 = This is a test message with numbers {0}, {1}, {2} +MESSAGE4 = This is a test message with exception diff --git a/java/sca/modules/monitor/src/test/resources/tuscany-monitor-test-messages.properties b/java/sca/modules/monitor/src/test/resources/tuscany-monitor-test-messages.properties deleted file mode 100644 index 523263da40..0000000000 --- a/java/sca/modules/monitor/src/test/resources/tuscany-monitor-test-messages.properties +++ /dev/null @@ -1,24 +0,0 @@ -# -# -# 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. -# -# -MESSAGE1 = This is a test message with no params -MESSAGE2 = This is a test message with a string param {0} -MESSAGE3 = This is a test message with numbers {0}, {1}, {2} -MESSAGE4 = This is a test message with exception diff --git a/java/sca/modules/monitor/src/test/resources/tuscany-monitor-test-messages_it.properties b/java/sca/modules/monitor/src/test/resources/tuscany-monitor-test-messages_it.properties deleted file mode 100644 index 523263da40..0000000000 --- a/java/sca/modules/monitor/src/test/resources/tuscany-monitor-test-messages_it.properties +++ /dev/null @@ -1,24 +0,0 @@ -# -# -# 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. -# -# -MESSAGE1 = This is a test message with no params -MESSAGE2 = This is a test message with a string param {0} -MESSAGE3 = This is a test message with numbers {0}, {1}, {2} -MESSAGE4 = This is a test message with exception -- cgit v1.2.3