I'm using Scala IDE 2.0.1 and SBT 0.11.2 to start with Akka 2.0.1. My build.sbt looks like this:
name := "akka"
version := "0.1"
scalaVersion := "2.9.2"
resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"
libraryDependencies += "com.typesafe.akka" % "akka-actor" % "2.0.1"
As you can see, there's nothing spectacular.
Now how can I tell Eclipse to use the artifact with the sources classifier for the akka-actor library?
In SBT, I can use update-classifiers to download sources and Javadocs to the Ivy repository, but even if I do this before running the eclipse command from the sbteclipse plugin then Eclipse still does not know the sources. Of course, I could do this manually, but this doesn't scale well for more libraries.
I have also tried to use the IvyDE plugin with the deliver-local command. While this integrates the dependency management, it doesn't seem to help with the sources.
Any clues?
Edit: This is the ivy.xml generated from deliver-local:
<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0" xmlns:e="http://ant.apache.org/ivy/extra">
<info organisation="default" module="akka_2.9.2" revision="0.1" status="release" publication="20120506225613">
<description>
akka
</description>
</info>
<configurations>
<conf name="compile" visibility="public" description=""/>
<conf name="runtime" visibility="public" description="" extends="compile"/>
<conf name="test" visibility="public" description="" extends="runtime"/>
<conf name="provided" visibility="public" description=""/>
<conf name="optional" visibility="public" description=""/>
<conf name="sources" visibility="public" description=""/>
<conf name="docs" visibility="public" description=""/>
<conf name="pom" visibility="public" description=""/>
</configurations>
<publications>
<artifact name="akka_2.9.2" type="pom" ext="pom" conf="pom"/>
<artifact name="akka_2.9.2" type="jar" ext="jar" conf="compile"/>
<artifact name="akka_2.9.2" type="src" ext="jar" conf="sources" e:classifier="sources"/>
<artifact name="akka_2.9.2" type="doc" ext="jar" conf="docs" e:classifier="javadoc"/>
</publications>
<dependencies>
<dependency org="org.scala-lang" name="scala-library" rev="2.9.2" conf="compile->default(compile)"/>
<dependency org="com.typesafe.akka" name="akka-actor" rev="2.0.1" conf="compile->default(compile)"/>
<exclude org="org.scala-lang" module="scala-library" artifact="*" type="jar" ext="*" matcher="exact"/>
<exclude org="org.scala-lang" module="scala-compiler" artifact="*" type="jar" ext="*" matcher="exact"/>
<override org="org.scala-lang" module="scala-library" matcher="exact" rev="2.9.2"/>
<override org="org.scala-lang" module="scala-compiler" matcher="exact" rev="2.9.2"/>
</dependencies>
</ivy-module>
I'm new to Ivy, so this doesn't tell me much. I just figure that it mentions sources and javadocs, but somehow the IvyDE doesn't pick it up.
You can put
EclipseKeys.withSource := true
to your build.sbt, which lets sbteclipse download all sources and makes them accessible within Eclipse. Note, this will download all sources from all configured dependencies. I have no idea how to tell sbt to download only the sources for single dependencies.
Finally I found a solution to let sbt download the sources and tell Eclipse where to find them.
Add in build.sbt:
EclipseKeys.withSource := true
Then run:
rm -rf ~/.ivy2/cache/
sbt update-classifiers
sbt eclipse
The weird part is that if you already downloaded the dependencies in ivy, you have them in cache and you won't be able to download the sources for them.
I managed to get this working finally.
I had to use an external ivy settings file:
<ivysettings>
<properties environment="env" />
<settings defaultResolver="play" defaultResolveMode="dynamic" />
<caches defaultCacheDir="${env.PLAY_HOME}/repository/cache" />
<resolvers>
<chain name="play">
<ibiblio name="typesafe-releases" m2compatible="true" root="http://repo.typesafe.com/typesafe/releases" />
<ibiblio name="sonatype-oss-releases" m2compatible="true" root="http://oss.sonatype.org/content/repositories/releases" />
<filesystem name="local-filesystem">
<ivy pattern="${env.PLAY_HOME}/repository/local/[organization]/[module]/[revision]/ivys/ivy.xml" />
<artifact pattern="${env.PLAY_HOME}/repository/local/[organization]/[module]/[revision]/[type]s/[module](-[classifier]).[ext]" />
</filesystem>
<ibiblio name="central-uk" m2compatible="true" root="http://uk.maven.org/maven2" />
<ibiblio name="typesafe-snapshots" m2compatible="true" root="http://repo.typesafe.com/typesafe/snapshots" />
<ibiblio name="sonatype-oss-snapshots" m2compatible="true" root="http://oss.sonatype.org/content/repositories/snapshots" />
</chain>
</resolvers>
</ivysettings>
And add:
externalIvySettings(baseDirectory(_ / "ivysettings.xml"))
to my Build.scala.
The order of the resolvers in the chain proved to be important, because if Ivy finds a jar but no sources it won't check the other resolvers for sources/javadoc. The repository in the local Play install doesn't have sources or javadoc in.
This gets me source attachments for most of the jars in my dependencies when IvyDE resolves in Eclipse.
I find that it's easier to give IvyDE and sbt different ivy cache directories. Yes, it takes more space, but sbt by default doesn't download sources. And once sbt has loaded the cache without sources, IvyDE won't add them. You can tell sbt to fetch them, but for me it's easier just to use more disk space and use two different caches.
I do this by leaving sbt at the default, and setting IvyDE to use this file in Preferences > Ivy > Settings tab > Ivy settings file:
<ivysettings>
<settings defaultResolver="nexus" />
<property
name="nexus-public"
value="http://localhost:8081/nexus/content/groups/public" />
<resolvers>
<ibiblio
name="nexus"
m2compatible="true"
root="${nexus-public}" />
</resolvers>
<caches defaultCacheDir="${user.home}/.ivy2eclipse" />
</ivysettings>
That points to my local nexus server, so'll you'll need to modify it for your environment.
Well, I have given up on this and returned to NetBeans 7.1.2 + Scala plugin + Maven. This combination is much better integrated and works out of the box without tinkering.
Related
I have a setup of Apache Ivy(Version 2.4.0) and Netbeans IDE(8.0.2). I have not been able to resolve dependencies for full blown maven projects(For example:org.glassfish.jersey). Apache Ivy successfully resolves dependencies for more specific modules like (org.glassfish.jersey.core).
Non working Example:
<dependency org="org.glassfish.jersey" name="project" rev="2.13" conf="solrj->*"/>
Working Examples:
<dependency org="org.apache.solr" name="solr-solrj" rev="5.0.0" conf="solrj->default"/>
<dependency org="org.glassfish.jersey.core" name="jersey-server" rev="2.13" conf="JerseyCore-2.13->default,optional"/>
<dependency org="org.glassfish.jersey.core" name="jersey-client" rev="2.13" conf="JerseyCore-2.13->default,optional"/>
<dependency org="org.glassfish.jersey.core" name="jersey-common" rev="2.13" conf="JerseyCore-2.13->default,optional"/>
ivy.xml
<ivy-module version="2.0">
<info organisation="org.sonatype.nexus.examples" module="simple-project" revision="1.0.0-SNAPSHOT"/>
<configurations>
<conf name="solrj" description="Jars from the SOLRJ Library Collection"/>
</configurations>
<dependencies>
<dependency org="org.glassfish.jersey" name="project" rev="2.13" conf="solrj->*"/>
<dependency org="org.apache.solr" name="solr-solrj" rev="5.0.0" conf="solrj->default"/>
</dependencies>
ivysettings.xml
<ivysettings>
<settings defaultResolver="ibiblio"/>
<resolvers>
<ibiblio name="ibiblio" m2compatible="true"/>
</resolvers>
build.xml(Just the IVY Part).
<!-- Resolve all the dependencies that we declared in the build.xml file.
Resolving means that ivy will download the jar file from the MAVEN 2 Repository
and put them under the directory that you specify in the build.xml file.
In my case this is where all the jar files will be downloaded "C:\Users\ajalgaon\Accurev\solrj\lib" -->
<target name="init">
<ivy:settings file="ivysettings.xml" />
<ivy:resolve/>
<ivy:report todir="prebuilt/ivy-report" graph="false"/>
<ivy:retrieve conf="solrj" pattern="prebuilt/jars/solrj-lib/[artifact].[ext]"/>
</target>
Apache IVY Successfully resolves dependencies for the solr-solrj module. But it does not resolve dependency for "org.glassfish.jersey". Apache IVY Does not resolve dependencies for anything that has the attribute name="project" in the ivy.xml file. Kindly let me know if I need to post more information here. Thanks a lot in advance.
Cannot reproduce your issue.
Example
├── build.xml
├── ivy.xml
└── target
├── ivy-reports
│ ├── ivy-report.css
│ └── org.sonatype.nexus.examples-simple-project-solrj.html
└── jars
├── commons-io.jar
├── httpclient.jar
├── httpcore.jar
├── httpmime.jar
├── noggit.jar
├── slf4j-api.jar
├── solr-solrj.jar
├── stax2-api.jar
├── woodstox-core-asl.jar
└── zookeeper.jar
ivy.xml
<ivy-module version="2.0">
<info organisation="org.sonatype.nexus.examples" module="simple-project" revision="1.0.0-SNAPSHOT"/>
<configurations>
<conf name="solrj" description="Jars from the SOLRJ Library Collection"/>
</configurations>
<dependencies>
<dependency org="org.glassfish.jersey" name="project" rev="2.13" conf="solrj->*"/>
<dependency org="org.apache.solr" name="solr-solrj" rev="5.0.0" conf="solrj->default"/>
</dependencies>
</ivy-module>
build.xml
<project name="demo" default="resolve" xmlns:ivy="antlib:org.apache.ivy.ant">
<property name="build.dir" location="target"/>
<available classname="org.apache.ivy.Main" property="ivy.installed"/>
<target name="resolve" depends="install-ivy" description="Use ivy to resolve classpaths">
<ivy:resolve/>
<ivy:report todir='${build.dir}/ivy-reports' graph='false' xml='false'/>
<ivy:retrieve conf="solrj" pattern="${build.dir}/jars/[artifact].[ext]"/>
</target>
<target name="install-ivy" description="Install ivy" unless="ivy.installed">
<mkdir dir="${user.home}/.ant/lib"/>
<get dest="${user.home}/.ant/lib/ivy.jar" src="http://search.maven.org/remotecontent?filepath=org/apache/ivy/ivy/2.4.0/ivy-2.4.0.jar"/>
<fail message="Ivy has been installed. Run the build again"/>
</target>
<target name="clean" description="Cleanup build files">
<delete dir="${build.dir}"/>
</target>
<target name="clean-all" depends="clean" description="Additionally purge ivy cache">
<ivy:cleancache/>
</target>
</project>
I have an ivy dependency management to work both under eclipse and with ant.
How should I configure the test dependencies to be available for eclipse?
my current configuration is:
<configurations>
...
<conf name="test" visibility="public"/>
</configurations>
<dependencies>
...
<dependency org="org.testng" name="testng" rev="6.7" conf="test->provided" transitive="false"/>
</dependencies>
With that configuration TestNG is not "retrieved". I'm using IvyDE, and 'Select every configuration' is set.
I'm using IvyDE with Eclipse Indigo. I've got an ivy.xml file that looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0" xmlns:e="http://ant.apache.org/ivy/extra">
<info organisation="com.restphone" module="javasignatureparser_2.10" revision="0.3-SNAPSHOT" status="integration" publication="20121208180225">
<description>
JavaSignatureParser
</description>
</info>
<configurations>
<conf name="compile" visibility="public" description=""/>
<conf name="runtime" visibility="public" description="" extends="compile"/>
<conf name="test" visibility="public" description="" extends="runtime"/>
<conf name="provided" visibility="public" description=""/>
<conf name="optional" visibility="public" description=""/>
<conf name="sources" visibility="public" description=""/>
<conf name="docs" visibility="public" description=""/>
<conf name="pom" visibility="public" description=""/>
</configurations>
<dependencies defaultconfmapping="*->default,sources" >
<dependency org="org.scalaz" name="scalaz-core_2.10.0-RC3" rev="7.0.0-M5" conf="compile->default(compile);sources->default(compile)"/>
</dependencies>
</ivy-module>
The IvyIDE container has a source attachment for scala-library (a transitive dependency, not listed in the ivy.xml code), but no source attachment for scalaz-core.
If I look in the local ivy cache (where the container has the files), I see:
C:\Users\james\.ivy2\cache\org.scalaz\scalaz-core_2.10.0-RC3
bundles
scalaz-core_2.10.0-RC3-7.0.0-M5.jar
sources
scalaz-core_2.10.0-RC3-7.0.0-M5-sources.jar
Any idea why IvyIDE can't figure out how to use scalaz-core_2.10.0-RC3-7.0.0-M5-sources.jar?
There's an ivy configuration file in /cygdrive/C/Users/james/.ivy2/cache/org.scalaz/scalaz-core_2.10.0-RC3/ivy-7.0.0-M5.xml that says the type of the artifact is a "bundle" - is that related?
<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0" xmlns:m="http://ant.apache.org/ivy/maven">
<info organisation="org.scalaz"
module="scalaz-core_2.10.0-RC3"
revision="7.0.0-M5"
status="release"
publication="20121123051347"
>
<license name="BSD-style" url="http://www.opensource.org/licenses/bsd-license.php" />
<description homepage="http://scalaz.org">
scalaz-core
</description>
</info>
<configurations>
<conf name="default" visibility="public" description="runtime dependencies and master artifact can be used with this conf" extends="runtime,master"/>
<conf name="master" visibility="public" description="contains only the artifact published by this module itself, with no transitive dependencies"/>
<conf name="compile" visibility="public" description="this is the default scope, used if none is specified. Compile dependencies are available in all classpaths."/>
<conf name="provided" visibility="public" description="this is much like compile, but indicates you expect the JDK or a container to provide it. It is only available on the compilation classpath, and is not transitive."/>
<conf name="runtime" visibility="public" description="this scope indicates that the dependency is not required for compilation, but is for execution. It is in the runtime and test classpaths, but not the compile classpath." extends="compile"/>
<conf name="test" visibility="private" description="this scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases." extends="runtime"/>
<conf name="system" visibility="public" description="this scope is similar to provided except that you have to provide the JAR which contains it explicitly. The artifact is always available and is not looked up in a repository."/>
<conf name="sources" visibility="public" description="this configuration contains the source artifact of this module, if any."/>
<conf name="javadoc" visibility="public" description="this configuration contains the javadoc artifact of this module, if any."/>
<conf name="optional" visibility="public" description="contains all optional dependencies"/>
</configurations>
<publications>
<artifact name="scalaz-core_2.10.0-RC3" type="bundle" ext="jar" conf="master"/>
</publications>
<dependencies>
<dependency org="org.scala-lang" name="scala-library" rev="2.10.0-RC3" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
</dependencies>
</ivy-module>
Update: things just got a little stranger. If I remove that scalaz-core_2.10.0-RC3/ivy-7.0.0-M5.xml file, then change a line in ivy.xml, that file gets downloaded again - AND ITS NOT THE SAME. Sometimes, I get more lines in the file! Like this:
<publications>
<artifact name="scalaz-core_2.10.0-RC3" type="bundle" ext="jar" conf="master"/>
<artifact name="scalaz-core_2.10.0-RC3" type="source" ext="jar" conf="sources" m:classifier="sources"/>
<artifact name="scalaz-core_2.10.0-RC3" type="javadoc" ext="jar" conf="javadoc" m:classifier="javadoc"/>
</publications>
Type is related, the IvyDE determines if the sources exist using the 'sources type'.
In the 'sources types', in the tab Source/Javadoc in the IvyDE managed library. The default ones are 'source'.
What you show in the ivy.xml of the resolved artifacts, it shows that the type is bundle which will not be considered a source artifacts.
However, I tried to resolve myself with a very default configuration (I just installed Eclipse and IvyDE to an empty project), and the resolved ivy file for scalaz-core:
<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0" xmlns:m="http://ant.apache.org/ivy/maven">
<info organisation="org.scalaz"
module="scalaz-core_2.10.0-RC3"
revision="7.0.0-M5"
status="release"
publication="20121123141347"
>
<license name="BSD-style" url="http://www.opensource.org/licenses/bsd-license.php" />
<description homepage="http://scalaz.org">
scalaz-core
</description>
</info>
<publications>
<artifact name="scalaz-core_2.10.0-RC3" type="bundle" ext="jar" conf="master"/>
<artifact name="scalaz-core_2.10.0-RC3" type="source" ext="jar" conf="sources" m:classifier="sources"/>
<artifact name="scalaz-core_2.10.0-RC3" type="javadoc" ext="jar" conf="javadoc" m:classifier="javadoc"/>
</publications>
<dependencies>
<dependency org="org.scala-lang" name="scala-library" rev="2.10.0-RC3" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
</dependencies>
I removed the configuration section for clarity.
Are you sure you are downloading from the maven2 repository:
http://repo1.maven.org/maven2/
Maybe they changed it in the last 10 hours.
I would try adding bundle to the 'source types' if I were you. Not sure about the ramification though.
I'm trying to build a restful server using Apache Jersey. I'm developing in Eclipse Indigo and using Ivy for dependency management with this ivy.xml file
<?xml version="1.0" encoding="UTF-8"?>
<!--=========================================================================-->
<!--
-->
<!--=========================================================================-->
<ivy-module version="2.2">
<info organisation="com.mypackage" module="mymodule"/>
<dependencies>
<dependency org="com.sun.jersey" name="jersey-servlet" rev="1.12"/>
</dependencies>
</ivy-module>
This resolves fine calling ivy from ant, but from IvyDE I get this error
Some projects fail to be resolved
Impossible to resolve dependencies of com.mypackage#mymodule;working#Samsung-Windows
unresolved dependency: org.jboss.weld#weld-spi;1.1.4.Final: not found
unresolved dependency: javax.annotation#jsr250-api;${jsr250.api.version}: not found
unresolved dependency: org.jboss.weld#weld-api;1.1.4.Final: not found
unresolved dependency: javax.inject#javax.inject;${atinject.api.version}: not found
unresolved dependency: org.jboss.spec.javax.interceptor#jboss-interceptors-api_1.1_spec;${interceptor.api.version}: not found
To me the ${atinject.api.version} looks like it is somehow not resolving variables correctly somewhere.
My understanding of Ivy is very superficial, so I don't have any good ideas.
Both IvyDE and ant are using the same ivysettings.xml file (at least, I believe they are).
<?xml version="1.0" encoding="UTF-8"?>
<!--=========================================================================-->
<!--=========================================================================-->
<ivysettings>
<settings defaultResolver="ibiblio"/>
<resolvers>
<ibiblio name="ibiblio" m2compatible="true"/>
<ibiblio name="maven2" m2compatible="true"/>
<ibiblio name="java-net-maven1" root="http://download.java.net/maven/1" pattern="${java.net.maven.pattern}" m2compatible="false"/>
<ibiblio name="java-net-maven2" root="http://download.java.net/maven/2/" m2compatible="true"/>
</resolvers>
</ivysettings>
Any direction would be great.
Thanks a lot in advance.
Edit: Adding portion of Build.xml
I'm using apache-ivy-2.2.0 although the output claims:
[ivy:configure] :: Apache Ivy 2.3.0-rc1 - 20120416000235 :: http://ant.apache.org/ivy/ ::
This is the build.xml:
<?xml version="1.0"?>
<project name="IvyTest" default="ivy.retrieve" xmlns:ivy="antlib:org.apache.ivy.ant">
<description>
IvyTest
</description>
<!--=====================================================================-->
<!-- Properties -->
<!--=====================================================================-->
<!-- General properties. -->
<property name="bin" location="bin" />
<property name="lib" location="lib" />
<property name="lib.ivy" location="${lib}/ivy-managed" />
<property name="ivy.version" value="2.2.0" />
<property name="ivy.home" location="${bin}/apache-ivy-${ivy.version}" />
<available property="ivy.installed" file="${ivy.home}/ivy-${ivy.version}.jar" />
<property name="ant.build.javac.source" value="1.7" />
<property name="ant.build.javac.target" value="1.7" />
<!--=====================================================================-->
<!-- Targets: Ivy -->
<!--=====================================================================-->
<!--============================ ivy.download ===========================-->
<target name="ivy.download" unless="ivy.installed">
<mkdir dir="${ivy.home}"/>
<get src="http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.version}/ivy-${ivy.version}.jar" dest="${ivy.home}/ivy-${ivy.version}.jar" usetimestamp="true"/>
</target>
<!--============================ ivy.init ===============================-->
<target name="ivy.init" depends="ivy.download">
<taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpath="${ivy.home}/ivy-${ivy.version}.jar"/>
</target>
<!--============================ ivy.resolve ============================-->
<target name="ivy.resolve" description="Resolve dependencies with Ivy" depends="ivy.configure">
<ivy:resolve />
</target>
<!--============================ ivy.retrieve ===========================-->
<target name="ivy.retrieve" description="Retrieve dependencies with Ivy" depends="ivy.configure">
<ivy:retrieve log="verbose" pattern="${lib.ivy}/[artifact]-[revision].[ext]" type="jar,bundle" sync="true"/>
</target>
<!--============================ ivy.configure ==========================-->
<target name="ivy.configure" description="Configure Ivy settings file" depends="ivy.init">
<ivy:configure file="ivysettings.xml"/>
</target>
<!--============================ ivy.clean ==============================-->
<target name="ivy.clean" description="Cleans the Ivy cache" depends="ivy.init">
<ivy:cleancache />
</target>
</project>
By default ivy will download dependencies from Maven Central, so unless you're using your own Maven repository manager you won't need an ivy settings file.
Having said that it's good practice to declare one and the following works fine for me:
<ivysettings>
<settings defaultResolver="central"/>
<resolvers>
<ibiblio name="central" m2compatible="true"/>
</resolvers>
</ivysettings>
Notice it's a lot simpler than your example. The old java.net repositories are not really used anymore, most (if not all) of their content has been migrated to Maven Central.
As an update to your original question:
I also had the situation that I could resolve on the console using ant resolve but IvyDe (under Eclipse 4.2) was giving me the error "Impossible to resolve dependencies [...]"
Lead through this post I managed to edit IvyDE's settings (Workspace Preferences -> Ivy -> Settings) and add an ivysettings.properties file with this content:
ivy.home=${user.home}/.ant
ivy.jar.dir=${ivy.home}/lib
ivy.jar.file=${ivy.jar.dir}/ivy.jar
From now on everything worked fine.
I cant seem to get to work. I am using icefaces and a very simple with two columns. One with actions such as remove and the other with a string (representing a regular expression). In order for the remove action to remove the right row, I am trying to link it to the actual element with an :
<html xmlns:ice="http://www.icesoft.com/icefaces/component"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:m="http://www.mitre.org/asias/jsf">
<ui:composition>
<ice:dataTable binding="#{binding}"
value="#{binding.editableRows}"
var="item">
<ice:column>
<f:facet name="header">
<ice:commandLink styleClass="linkBlue"
action="#{binding.addEditableRow}">
<ice:outputText value="Add" />
</ice:commandLink>
</f:facet>
<ice:commandLink styleClass="linkBlue"
action="#{binding.removeEditableRow}">
<f:propertyActionListener value="#{item}" target="#{binding.actionRow}" />
<ice:outputText value="Remove" />
</ice:commandLink>
</ice:column>
<ice:column>
<f:facet name="header">
<ice:outputText value="Regular Expression" />
</f:facet>
<ice:inputText value="#{item.object}" size="100" />
</ice:column>
</ice:dataTable>
</ui:composition>
</html>
Everything I have found on this says that I need JSF 1.2. I am using JSF 1.2. Here is the apache Ivy config file I am using to manage my dependencies:
<ivy-module version="2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
<info organisation="org.mitre.asias" module="testwebproject" />
<configurations defaultconfmapping="default->default">
<conf name="default" visibility="public" description="needed for deployment" extends="runtime,master" />
<conf name="master" visibility="public" description="only this artifact" />
<conf name="runtime" visibility="public" description="libraries only needed at runtime" extends="compile" />
<conf name="provided" visibility="public" description="provided by container, not needed for deployment" />
<conf name="test" visibility="private" description="needed for testing" />
<conf name="compile" visibility="public" description="needed for compilation" />
<conf name="sources" visibility="public" description="the source artifact, if any."/>
<conf name="javadoc" visibility="public" description="the javadoc artifact, if any."/>
<conf name="optional" visibility="public" description="contains all optional dependencies"/>
<conf name="ide" visibility="public" description="all libraries, sources, and javadoc needed for ide" extends="master,compile,provided,test,sources,javadoc" />
</configurations>
<dependencies>
<dependency org="commons-lang" name="commons-lang" rev="2.4" conf="compile->compile(*),master(*);runtime->runtime(*)" />
<dependency org="commons-logging" name="commons-logging" rev="1.1.1" conf="compile->compile(*),master(*);runtime->runtime(*)" />
<dependency org="log4j" name="log4j" rev="1.2.16" conf="compile->compile(*),master(*);runtime->runtime(*)" />
<dependency org="org.slf4j" name="slf4j-log4j12" rev="1.6.1" conf="compile->compile(*),master(*);runtime->runtime(*)" />
<dependency org="javax.el" name="el-api" rev="2.1.2-b05" conf="provided->compile(*),provided(*),runtime(*),master(*)" />
<dependency org="javax.servlet" name="servlet-api" rev="2.5" conf="provided->compile(*),provided(*),runtime(*),master(*)" />
<dependency org="javax.servlet" name="jsp-api" rev="2.0" conf="provided->compile(*),provided(*),runtime(*),master(*)" />
<dependency org="org.icefaces" name="icefaces" rev="1.8.2" conf="compile->compile(*),master(*);runtime->runtime(*)" />
<dependency org="org.icefaces" name="icefaces-comps" rev="1.8.2" conf="compile->compile(*),master(*);runtime->runtime(*)" />
<dependency org="org.icefaces" name="icefaces-facelets" rev="1.8.2" conf="compile->compile(*),master(*);runtime->runtime(*)" />
<dependency org="javax.faces" name="jsf-api" rev="1.2_13" conf="compile->compile(*),master(*);runtime->runtime(*)" />
<dependency org="javax.faces" name="jsf-impl" rev="1.2_13" conf="compile->compile(*),master(*);runtime->runtime(*)" />
<dependency org="com.sun.facelets" name="jsf-facelets" rev="1.1.14" conf="compile->compile(*),master(*);runtime->runtime(*)" />
<dependency org="junit" name="junit" rev="4.8.1" conf="test->default" />
<exclude module="servlet-api" conf="default" />
<exclude module="el-api" conf="default" />
<exclude module="jsp-api" conf="default" />
</dependencies>
</ivy-module>
I am using eclipse with IvyDE to manage that library and a Tomcat server instance running with "Use workspace metadata" selected. Is there some eclipse or tomcat thing that might be injecting the wrong version of JSF? When I look at the jsf-impl jar that is included by Ivy, I do see that there are com.sun.faces.taglib.jsf_core.SetPropertyActionListenerImpl and SetPropertyActionListenerTag in that jar. It is my understanding that those should be all that is needed. Any Ideas? Am I missing something, or just plain going crazy?
EDIT:
Now I'm getting really frustrated. Per the suggestion from BalusC I updated my faces-config.xml to use the 1.2 schema definition instead of the 1.1 dtd. This did not help. So I search around for more information. I find another stackoverflow article pertaining to (this issue), however there was no resolution other than getting a new version of jsf-facelets.jar (of which the new/old version is not listed). I am using the latest version available on repo1.maven.org/maven2 (1.1.14). So no go on that front. My new questions are, why would facelets have anything to do with this? Its a part of the JSF core is it not? I notice that in my jsf-impl-1.2_13.jar::META-INF/jsf_core.tld, there is a tag for setPropertyActionListener:
<tag>
...
<name>setPropertyActionListener</name>
<tag-class>com.sun.faces.taglib.jsf_core.SetPropertyActionListenerTag</tag-class>
<body-content>empty</body-content>
...
</tag>
On top of that, this can be found in my jsf-facelets-1.1.14.jar::com/sun/facelets/tag/jsf/core/CoreLibrary.java:
...
this.addTagHandler("setPropertyActionListener", SetPropertyActionListenerHandler.class);
...
It looks like my included libraries should be sufficient. Any idea what is going on here? Do I need to go back and get a degree in JSF to be able to write a simple facelet?
Ensure that the root declaration of your faces-config.xml is declared as per JSF 1.2 specification.
<faces-config version="1.2"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
Further, the binding="#{binding}" in your datatable really doesn't look right since #{binding} seems to be a managed bean.
I really hate to answer my own question, especially since it was such a simple mistake, but sometimes we just have to fess up and accept the public humiliation. Anyway, long story short, its:
<f:setPropertyActionListener value="#{item}" target="#{binding.actionRow}" />
not
<f:propertyActionListener value="#{item}" target="#{binding.actionRow}" />
Hopefully, this will help someone else in the future...