Anonymous avatar Anonymous committed 9d3e2f1

Don't throw exception from ResourceFinder.find(), and update pom

git-svn-id: http://svn.opensymphony.com/svn/xwork/trunk@1961 e221344d-f017-0410-9bd5-d282ab1896d7

Comments (0)

Files changed (2)

                 </configuration>
             </plugin>
             <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>bundle-manifest</id>
-                        <phase>process-classes</phase>
-                        <goals>
-                            <goal>manifest</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-
-            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-shade-plugin</artifactId>
                 <version>1.2</version>
                                     <artifact>commons-lang:commons-lang</artifact>
                                     <includes>
                                         <include>org/apache/commons/lang/StringUtils.class</include>
+                                        <include>org/apache/commons/lang/ObjectUtils*.class</include>
                                         <include>org/apache/commons/lang/StringEscapeUtils.class</include>
                                         <include>org/apache/commons/lang/exception/NestableRuntimeException.class</include>
                                         <include>org/apache/commons/lang/exception/Nestable.class</include>
                     </execution>
                 </executions>
             </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Export-Package>org.apache.commons.lang.xwork.*,com.opensymphony.xwork2.*</Export-Package>
+                    </instructions>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>bundle-manifest</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>manifest</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
         <defaultGoal>install</defaultGoal>
     </build>

src/java/com/opensymphony/xwork2/util/finder/ResourceFinder.java

     public URL find(String uri) throws IOException {
         String fullUri = path + uri;
 
-        URL resource = getResource(fullUri);
-        if (resource == null) {
-            throw new IOException("Could not find resource '" + fullUri + "'");
-        }
-
-        return resource;
+        return getResource(fullUri);
     }
 
     public List<URL> findAll(String uri) throws IOException {
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.