{"id":1802,"date":"2011-06-23T07:45:04","date_gmt":"2011-06-23T12:45:04","guid":{"rendered":"http:\/\/www.andygibson.net\/blog\/?p=1802"},"modified":"2012-04-23T08:08:57","modified_gmt":"2012-04-23T13:08:57","slug":"jstl-missing-from-maven-repositories","status":"publish","type":"post","link":"https:\/\/www.andygibson.net\/blog\/quickbyte\/jstl-missing-from-maven-repositories\/","title":{"rendered":"JSTL 1.2 Missing From Maven Repositories"},"content":{"rendered":"<p>It seems in the last few weeks or so the Maven JSTL dependency has vanished from at least the central repository. This has caused a <a href=\"http:\/\/www.google.com\/search?q=jstl%201.2%20missing\">number of issues<\/a> around the web.<br \/>\n<!--more--><br \/>\nOracle has released the separate API and implementation dependencies which is really how they should be broken down. Now, instead of having one <code>javax.servlet.jstl<\/code> dependency you will use the following :<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;dependency&gt;\r\n    &lt;groupId&gt;javax.servlet.jsp.jstl&lt;\/groupId&gt;\r\n    &lt;artifactId&gt;jstl-api&lt;\/artifactId&gt;\r\n    &lt;version&gt;1.2&lt;\/version&gt;\r\n&lt;\/dependency&gt;\r\n\r\n&lt;dependency&gt;\r\n    &lt;groupId&gt;org.glassfish.web&lt;\/groupId&gt;\r\n    &lt;artifactId&gt;jstl-impl&lt;\/artifactId&gt;\r\n    &lt;version&gt;1.2&lt;\/version&gt;\r\n&lt;\/dependency&gt;\r\n<\/pre>\n<p>If you are running code in a container that already contains JSTL you will just use the <code>jstl-api<\/code> dependency with a <code>scope<\/code> of <code>provided<\/code>. This way your code has access to the API that will be provided by the container.<\/p>\n<p>For those of you using the Knappsack archetypes or using the JBoss Java EE 6 API pom, or no doubt some other dependencies that use <code>javax.servlet.jstl<\/code>, you will have problems because the Java EE 6 pom relies on the <code>javax.servlet.jstl<\/code> dependency. The answer here is to exclude it from the Java EE 6 dependency and add it separately using the api dependencies described above.<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;dependency&gt;\r\n    &lt;groupId&gt;org.jboss.spec&lt;\/groupId&gt;\r\n    &lt;artifactId&gt;jboss-javaee-6.0&lt;\/artifactId&gt;\r\n    &lt;version&gt;1.0.0.Final&lt;\/version&gt;\r\n    &lt;scope&gt;provided&lt;\/scope&gt;\r\n    &lt;type&gt;pom&lt;\/type&gt;\r\n    &lt;exclusions&gt;\r\n        &lt;exclusion&gt;\r\n            &lt;groupId&gt;javax.servlet&lt;\/groupId&gt;\r\n            &lt;artifactId&gt;jstl&lt;\/artifactId&gt;\r\n        &lt;\/exclusion&gt;\r\n    &lt;\/exclusions&gt;\r\n\r\n&lt;\/dependency&gt;\r\n\r\n&lt;dependency&gt;\r\n    &lt;groupId&gt;javax.servlet.jsp.jstl&lt;\/groupId&gt;\r\n    &lt;artifactId&gt;jstl-api&lt;\/artifactId&gt;\r\n    &lt;version&gt;1.2&lt;\/version&gt;\r\n    &lt;scope&gt;provided&lt;\/scope&gt;\r\n&lt;\/dependency&gt;\r\n<\/pre>\n<p>I&#8217;m surprised that they would eliminate the pom like that, but it may have been due to licensing issues for the reference implementation which I believe has been an issue for some of the standard Java EE APIs and the reason that there is no real definitive deployment of the APIs and we have to mix and match API dependencies from different sources unless you are using the <a href=\"http:\/\/www.andygibson.net\/blog\/quickbyte\/jboss-java-ee-6-spec-dependency-in-maven\/\">JBoss Java EE 6 dependency<\/a> to solve the problem.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It seems in the last few weeks or so the Maven JSTL dependency has vanished from at least the central repository. This has caused a number of issues around the web.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[74],"tags":[6,72,50],"_links":{"self":[{"href":"https:\/\/www.andygibson.net\/blog\/wp-json\/wp\/v2\/posts\/1802"}],"collection":[{"href":"https:\/\/www.andygibson.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.andygibson.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.andygibson.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.andygibson.net\/blog\/wp-json\/wp\/v2\/comments?post=1802"}],"version-history":[{"count":6,"href":"https:\/\/www.andygibson.net\/blog\/wp-json\/wp\/v2\/posts\/1802\/revisions"}],"predecessor-version":[{"id":1913,"href":"https:\/\/www.andygibson.net\/blog\/wp-json\/wp\/v2\/posts\/1802\/revisions\/1913"}],"wp:attachment":[{"href":"https:\/\/www.andygibson.net\/blog\/wp-json\/wp\/v2\/media?parent=1802"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.andygibson.net\/blog\/wp-json\/wp\/v2\/categories?post=1802"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.andygibson.net\/blog\/wp-json\/wp\/v2\/tags?post=1802"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}