Once agian thanks Dave for qyuick response. That's what I did to install manually the jar files in repo.
Are you saying that I could use any random group ids and artifacts ids to install my jar files in local repo as long as it those match with my pom file ? So I had lets suppose common-logging-1.2 jar file but I did not know the group id and artifact id for this jar file so I search for this jar file on maven web site and found group id(gid) and artifact id(aid)[some times there are more group ids for same artifact id, how do you decide in that case ??) and use those gid/aid to install jar file manually. I never created pom file manually but when I issued mvn install then maven downloaded the pom files for jar files itself and then some of those pom files have dependencies on other jar files and at end I ended up with many un needed jar files.. Am I making any sense ? Once again big thanks for all help. You people are awesome. Thanks, Petr --- On Wed, 10/29/08, David C. Hicks <[EMAIL PROTECTED]> wrote: > From: David C. Hicks <[EMAIL PROTECTED]> > Subject: Re: How to convert Eclipse project to maven project > To: "Maven Users List" <users@maven.apache.org> > Date: Wednesday, October 29, 2008, 8:50 AM > Ah. I see where you went wrong. It's not even that > complicated. Use > the following command to add your jar files to your local > repository: > > mvn install:install-file -Dfile=<path-to-file> > -DgroupId=<group-id> > -DartifactId=<artifact-id> -Dversion=<version> > -Dpackaging=<packaging> > > Example: mvn install:install-file -Dfile=myjar.jar > -DgroupId=myjar > -DartifactId=myjar -Dversion=1.0 -Dpackaging=jar > > Then, in your pom.xml you would refer to this new > artifact/dependency > like this: (using the same example) > > <dependency> > <groupId>myjar</groupId> > <artifactId>myjar</artifactId> > <version>1.0</version> > </dependency> > > Then, your build will pick up the jar you want it to use. > Good luck! > Dave > > > > Petr V. wrote: > > Thanks Dave for such a quick response. > > > > I started from jar files w/o pom files. So I went to > maven repository web site http://www.mvnrepository.com/ and > search for those jars. Some of those jars were available > under different groups ids but same artifact id like > saax-api-1.3.jar is found under javax.xml as javax.xml.soap > as well. I picked the most appropriate one using educated > guesses. May be that is causing some trouble. How can I find > out the correct version of group ids and artifacts ids :-( > > > > Thanks, > > > > Petr > > > > > > --- On Wed, 10/29/08, David C. Hicks > <[EMAIL PROTECTED]> wrote: > > > > > >> From: David C. Hicks <[EMAIL PROTECTED]> > >> Subject: Re: How to convert Eclipse project to > maven project > >> To: "Maven Users List" > <users@maven.apache.org> > >> Date: Wednesday, October 29, 2008, 7:01 AM > >> Unless you specified the proper versions and > classifiers for > >> your > >> dependencies, then Maven is likely to find the > ones that > >> are available > >> in the primary repository. Assuming that you used > Maven to > >> install your > >> jar files into your local repository, make sure > that your > >> pom.xml > >> specifies the same groupId, artifactId, and > version that > >> you used when > >> you did that installation. Otherwise, Maven > won't find > >> them and will go > >> looking for anything else that matches your > pom.xml. > >> > >> I hope that's helpful. > >> Dave > >> > >> > >> Petr V. wrote: > >> > >>> I have simple web services demo which I > created in > >>> > >> Eclipse and added external jar files to project. I > am able > >> to run it successfully unit tests in eclipse IDE. > >> > >>> Now I have moved the code to maven project and > added > >>> > >> dependencies tho those jar files in my pom file. > And now the > >> maven project fails complaining > >> "java.lang.NoClassDefFoundError: > >> > com/sun/xml/fastinfoset/stax/StAXDocumentParser". > >> > >>> I installed all jars files manually in my > totally new > >>> > >> maven repo but maven first downloads pom files for > those > >> manually installed jars and then download other > jar files > >> which are defined as dependencies in those new > downloaded > >> pom files. I do not want any of those newly > downloaded jar > >> files. I know my manually installed jar files are > good > >> enough to run the project (as shown in eclipse) > but maven is > >> doing some thing stupid amd making my project fail > at run > >> time complaining of missing class files. > >> > >>> How could I resolve this issue in most > cleanest way.I > >>> > >> hope that I am able to explain problem clearly. > >> > >>> Any help would be really appreciated. > >>> > >>> Thanks, > >>> > >>> Petr > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >> > --------------------------------------------------------------------- > >> To unsubscribe, e-mail: > [EMAIL PROTECTED] > >> For additional commands, e-mail: > >> [EMAIL PROTECTED] > >> > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]