Babak, thanks for the good tips using -Papt. I think I know what's going on my env now.
When I run command line "mvn idea:idea", the profile "apt" IS picked up since I am using JDK7. When I do this, I can open the project in Intellij and everything works fine now! What I had trouble before is because I did not run "mvn idea:idea", but simply open the camel/pom.xml from my Intellij IDEA (this is how I normally open most of typical Maven project and they work fine, even with multi-modules). However this method will not enable the camel "apt" profile for some odd reason, and thus all the @UriParam is un-resolvable. Perhaps this is just Intellij bug or some sort. So I am good now. I don't have to manually adjust any classpath in IDE if I first run "mvn idea:idea" first. Thanks! -- Zemian On Sat, Aug 10, 2013 at 4:13 PM, Babak Vahdat <babak.vah...@swissonline.ch>wrote: > I used to have the same problem with eclipse BUT using Java 6 for which > I've > added a "note" about it while ago (see the green box below): > > http://camel.apache.org/building.html > > That said your Java 7 build seems to be pretty old which may cause this > problem (I've got > /Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/jre) > > Can you try setting the apt profile explicitly to see if that would help: > > mvn -Papt idea:clean idea:idea > > Babak > > > saltnlight5 wrote > > Hi Babak, > > > > I use these: > > > > zemian@ZEMIANs-iMac:~/projects/camel > > bash> mvn -version > > Apache Maven 3.0.4 (r1232337; 2012-01-17 03:44:56-0500) > > Maven home: /Users/zemian/apps/maven > > Java version: 1.7.0_11, vendor: Oracle Corporation > > Java home: > > /Library/Java/JavaVirtualMachines/jdk1.7.0_11.jdk/Contents/Home/jre > > Default locale: en_US, platform encoding: UTF-8 > > OS name: "mac os x", version: "10.8.4", arch: "x86_64", family: "mac" > > > > > > > > On Sat, Aug 10, 2013 at 10:01 AM, Babak Vahdat > > < > > > babak.vahdat@ > > > >wrote: > > > >> Hi > >> > >> Which Java version do you use for building, 6 or 7? > >> > >> Babak > >> > >> Am 10.08.2013 um 14:51 schrieb Zemian Deng < > > > saltnlight5@ > > > >: > >> > >> > Willem, > >> > > >> > I will vote to make spi-annotation non-optional in camel-core since it > >> only > >> > has 4 classes, and they are already used in quite of few sub modules. > >> > > >> > But if you stick to optional in camel-core, then any modules that uses > >> > @UriParam should has a hard dependency on spi-annotation, not > optional. > >> We > >> > should add spi-annotation in camel-jms/pom.xml as regular dependency. > >> Here > >> > is a list of modules that I can see using @UriParam: > >> > > >> > camel-jms > >> > camel-salesforce > >> > camel-sap-netweaver > >> > camel-sjms > >> > camel-sql > >> > camel-ssh > >> > camel-twitter > >> > camel-weather > >> > camel-yammer > >> > > >> > Same need to be check on other annotations usage, which I haven't > >> check. > >> > > >> > > >> > > >> > On Sat, Aug 10, 2013 at 3:08 AM, Willem jiang < > > > willem.jiang@ > > > > >wrote: > >> > > >> >> > >> >> How about add the spi-annotation dependency as optional in the > >> >> camel-jms/pom.xml? > >> >> > >> >> -- > >> >> Willem Jiang > >> >> > >> >> Red Hat, Inc. > >> >> FuseSource is now part of Red Hat > >> >> Web: http://www.fusesource.com | http://www.redhat.com > >> >> Blog: http://willemjiang.blogspot.com > >> (http://willemjiang.blogspot.com/ > >> ) > >> >> (English) > >> >> http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) > >> >> Twitter: willemjiang > >> >> Weibo: 姜宁willem > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> On Wednesday, August 7, 2013 at 9:01 AM, saltnlight5 wrote: > >> >> > >> >>> Hi, > >> >>> > >> >>> I have a question on camel pom usage. > >> >>> > >> >>> In camel-core/pom.xml, the spi-annotations dependency is added as > >> >>> > > <optional> > > true > > </optional> > > , however other modules such as > >> >> camel-jms/pom.xml > >> >>> do not include this dependency explicitly. Is that intentional? How > >> does > >> >>> camel-jms resolve this spi-annotations jar if it's only optional > from > >> the > >> >>> core? > >> >>> > >> >>> When I use IntelliJ IDE to open the camel project, and it complains > >> the > >> >>> @UriParam is not resolvable in JmsEndpoint.java until I add this > >> >>> spi-annotations into camel-jms/pom.xml. I wonder if any of you > >> experience > >> >>> this, or just my misunderstanding of the maven usage? > >> >>> > >> >>> Zemian > >> >>> > >> >>> > >> >>> > >> >>> -- > >> >>> View this message in context: > >> >> > >> > http://camel.465427.n5.nabble.com/About-the-spi-annotations-dependency-tp5736873.html > >> >>> Sent from the Camel Development mailing list archive at Nabble.com ( > >> >> http://Nabble.com). > >> >> > >> >> > >> >> > >> >> > >> > > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/About-the-spi-annotations-dependency-tp5736873p5737074.html > Sent from the Camel Development mailing list archive at Nabble.com. >