Skip to content

Commit

Permalink
SEAMINTL-27 Prevent Joda related classes from loading if jar not present
Browse files Browse the repository at this point in the history
Add @requires to packages containing classes that require the joda time libraries.
As it is an optional dependency, this will prevent the need for anyone to specifically include it if they
do not wish to use it.
  • Loading branch information
kenfinnigan committed Mar 13, 2011
1 parent 5c64fcd commit e91c5f6
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/pom.xml
Expand Up @@ -21,6 +21,10 @@
<artifactId>cdi-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.seam.solder</groupId>
<artifactId>seam-solder</artifactId>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
Expand Down
@@ -0,0 +1,23 @@
/*
* JBoss, Home of Professional Open Source
* Copyright 2010, Red Hat Middleware LLC, and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* 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.
*/
@Requires({ "org.joda.time.DateTimeZone" })
package org.jboss.seam.international.datetimezone;

import org.jboss.seam.solder.core.Requires;

@@ -0,0 +1,23 @@
/*
* JBoss, Home of Professional Open Source
* Copyright 2010, Red Hat Middleware LLC, and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* 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.
*/
@Requires({ "org.joda.time.DateTimeZone" })
package org.jboss.seam.international.datetimezone;

import org.jboss.seam.solder.core.Requires;

0 comments on commit e91c5f6

Please sign in to comment.