Re: Don't add dependency?

2006-11-26 Thread jiangshachina
Hi, > Additionally, at the begging of the project, I set all dependencies in > only one pom. > At that time, all was OK. It sounds that the relation was very clean and > simple. > But now, why I have to encounter so ambiguous relationship?! Now, I have to return to the original POMs. Then all is

Re: Don't add dependency?

2006-11-26 Thread jiangshachina
Hi Wendy, > Correct. Optional dependencies are not transitive. If jta is > optional for Spring, and you want it, you'll need to declare it. I had done. I declared jta-1.0.1B.jar as dependency(not dependency management) explicitly. > Early in this thread you posted a pom snippet that used > , an

Re: Don't add dependency?

2006-11-26 Thread Wendy Smoak
On 11/25/06, jiangshachina <[EMAIL PROTECTED]> wrote: For example, on jta artifact. others POM declares jta-1.0.B.jar as dependency directly, and spring-parent.pom(Spring artifacts' parent POM) declares jta as optional. Then jta-1.0.B.jar wasn't in WEB-INF/lib, too. Correct. Optional dependen

Re: Don't add dependency?

2006-11-25 Thread jiangshachina
Hi Wendy, > For example, on jta artifact. > others POM declares jta-1.0.B.jar as dependency directly, > and spring-parent.pom(Spring artifacts' parent POM) declares jta as > optional. > Then jta-1.0.B.jar wasn't in WEB-INF/lib, too. I think I was wrong on optinal I removed all of optional on jta

Re: Don't add dependency?

2006-11-25 Thread jiangshachina
Hi Wendy, > These poms are incorrect -- servlet-api shouldn't be in compile scope. I see. > Another way that will work is to declare the servlet-api dependency in > your own project and properly mark it 'provided'. Since Maven uses > the "closest" definition for each artifact, that one will win.

Re: Don't add dependency?

2006-11-25 Thread Wendy Smoak
On 11/25/06, jiangshachina <[EMAIL PROTECTED]> wrote: For example, on servlet-api artiface. I declare servlet-api-2.4.jar in others POM, but commons-loggin(in Apache POM) has transitive dependency servlet-api-2.3.jar. Both of them are compile scope. These poms are incorrect -- servlet-api shou

RE: Don't add dependency?

2006-11-25 Thread jiangshachina
Hello, I encountered a similar trouble. I have a Web application, which is built on Struts, Spring and Hibernate. At beginning, I added all of dependencies in one POM, then my real application project extends the POM(artifact). But since more and more artifacts are depended. The POM is more and mo

RE: Don't add dependency?

2006-11-22 Thread jiangshachina
Hi Jörg, Thanks very much! You released one of my agony. a cup of Java, cheers! Sha Jiang Jörg Schaible wrote: > > jiangshachina wrote on Wednesday, November 22, 2006 2:38 AM: > >> Hi guys, >> I found the key. >> >> In management-1.0.pom, I excludes jta from hibernate dependency. >> At begin

RE: Don't add dependency?

2006-11-21 Thread Jörg Schaible
jiangshachina wrote on Wednesday, November 22, 2006 2:38 AM: > Hi guys, > I found the key. > > In management-1.0.pom, I excludes jta from hibernate dependency. > At beginning, I didn't use jta-1.0.1B, but j2ee-1.4.jar, because > jta-1.0.1B.jar isn't at central repository. > But jta is transitive

Re: Don't add dependency?

2006-11-21 Thread jiangshachina
Hi, I have four tests just now. [1]I added following artifact to dependency asm asm 1.5.3 then run "mvn package", asm-1.5.3.jar was in WEB-INF/lib [2]I added following scripts to pom.xml javax.transaction jta 15 obviously, there isn't jta-15.jar

Re: Don't add dependency?

2006-11-21 Thread jiangshachina
Hi, I'm sorry that I didin't represent myself clearly. I have installed jta by manual, and jta-1.0.1B.jar is in my local repository now. If the jar file isn't existent, my build would be failed. a cup of Java, cheers! Sha Jiang Bengt-Erik Fröberg-2 wrote: > > Hi > > Check out this, it should

Re: Don't add dependency?

2006-11-21 Thread jiangshachina
Hi Dawn, Thanks for your reply. I have three POM files, and all of them are very simply. I show the snippets of them. managment-1.0.pom just includes dependency management. 4.0.0 mygroup management pom 1.0 javax.transaction

Re: Don't add dependency?

2006-11-21 Thread Bengt-Erik Fröberg
Hi Check out this, it should be the reason jta isn't added you have to install it manually! http://maven.apache.org/guides/mini/guide-coping-with-sun-jars.html Greetings, 2006/11/21, jiangshachina <[EMAIL PROTECTED]>: Hi guys, I have a Web application project. I added javax.transaction

Re: Don't add dependency?

2006-11-21 Thread jiangshachina
Hi guys, I found the key. In management-1.0.pom, I excludes jta from hibernate dependency. At beginning, I didn't use jta-1.0.1B, but j2ee-1.4.jar, because jta-1.0.1B.jar isn't at central repository. But jta is transitive dependency of yy another dependency hibernate-3.0.jar, so I excludes it. S

Re: Don't add dependency?

2006-11-21 Thread dawn.angelito
Hi Sha Jiang, Did you declare this dependency in your pom? If so, please show us a snippet of your pom.xml. Thanks, Dawn jiangshachina wrote: > > Hi guys, > I have a Web application project. > I added javax.transaction:jta:jta-1.0.1B.jar to dependency, > but in fact my project doesn't need th