Skip to content

Added non-working sample test for JBoss7 with empty web.xml #413

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

Closed
wants to merge 1 commit into from
Closed

Added non-working sample test for JBoss7 with empty web.xml #413

wants to merge 1 commit into from

Conversation

rage-shadowman
Copy link

A non-working sample using JBoss7 and RESTEasy with an empty web.xml file per issue #412

Everything starts up fine, you can hit the resources (ie: localhost:port/sample/api/lowercase) and api-docs returns some information which does not include the Api resources.

@fehguy
Copy link
Contributor

fehguy commented Jan 8, 2014

I'm getting this error when building:

fehguy:jboss7-empty-web-xml tony$ mvn clean package
[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.wordnik:jboss7-empty-web-xml_2.10-ear:ear:1.3.2-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-ear-plugin is missing. @ line 17, column 18
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] jboss7-empty-web-xml
[INFO] jboss7-empty-web-xml_2.10-war
[INFO] jboss7-empty-web-xml_2.10-ear
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building jboss7-empty-web-xml 1.3.2-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ jboss7-empty-web-xml_2.10 ---
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building jboss7-empty-web-xml_2.10-war 1.3.2-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for xalan:xalan:jar:2.7.1.jbossorg-2 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] jboss7-empty-web-xml .............................. SUCCESS [0.133s]
[INFO] jboss7-empty-web-xml_2.10-war ..................... FAILURE [0.530s]
[INFO] jboss7-empty-web-xml_2.10-ear ..................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------

Ideas? Is there a repository in your settings.xml that I need to add?

@fehguy
Copy link
Contributor

fehguy commented Jan 8, 2014

I've resolved the dependency issue with this explicit dependecy:

<dependency>
   <groupId>xalan</groupId>
   <artifactId>xalan</artifactId>
   <version>2.7.1</version>
</dependency>

Can you please tell me how you start up the app?

@rage-shadowman
Copy link
Author

I ran it through IntelliJ IDEA.

However, you should also be able to just copy the target/exploded/jboss7-empty-web-xml_2.10-ear.ear directory into the jboss7 standalone/deployments directory and create a file called jboss7-empty-web-xml_2.10-ear.dodeploy (also inside standalone/deployments) to start it up.

@rage-shadowman
Copy link
Author

PS - I found what was causing my problem. The 0.9.8 version of reflections library that swagger depends on can't handle the URL JBoss7 returns for the classpath of a class in a WAR's WEB-INF/classes directory ("vfs:/..."), but they added some more URL type handlers in 0.9.9-RC1 which fix the issue. So if you force a dependency on org.reflections:reflections:0.9.9-RC1 it will work. So rather than return an empty list of classes, the Scanner now finds all of my Api annotated resources.

@fehguy
Copy link
Contributor

fehguy commented Mar 8, 2015

I think we can close this out as the issue was reflections.

@fehguy fehguy closed this Mar 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants