This is interesting for me also because I am trying to tackle a similar issue for improving how the JBuilder plugin generates JB project files. In JB, a project can reference dependent "libraries". A library is a configuration file that can reference classes, jars and optionally source files. A library can also declare dependencies on other libraries. JBuilder then builds its project classpath from the entire tree of all referenced libraries. Any library that defines java source files will be included in JBuilders symbol completion, etc. Library definitions are stored in the user's home directory where they can be shared among projects.
So, my first take at solving this is to generate the JB project file and iterate over each of the project's dependencies. I then convert each dependency into a reference to a JB library definition of the same name. If the library has not been defined yet, I create a basic library definition that just references the jar in the local repo. From the pom dependency there is no way for me to determine whether the source code for the dependency/library exists on the local workstation and there is no way to determine if the library has dependencies of its own. After creating the JB project file, I then create a library definition file for the maven project that can be referenced by other projects. This library definition will overwrite any basic/jar-only library definition and contains all of the source and dependency info. Therefore, I am hoping that the user will be able to go to each maven project on their workstation, run the JBuilder plugin, and result in a full set of JB project and library definitions. Libraries that they are not building locally will just reference the jar in the local repo. Libraries that they are building locally will contain full source and dependency info. Now, my second idea is to somehow take advantage of the ability to deploy pom's to the remote repo. I do not see any place these are used in the Maven code, but I think it is an avenue to obtain full info on a dependency. Ideally, it would be cool to somehow convert a Dependency object into a full Project object by downloading the dependency's pom from the repo. Then there could be a mechanism for traversing the entire tree of Projects, rather than the current 2-level Project/parent - Dependency/child structure. -------------------------------------- David Zeleznik ILOG - Changing the rules of business mailto:[EMAIL PROTECTED] http://www.ilog.com -------------------------------------- > -----Original Message----- > From: Mark H. Wilkinson [mailto:[EMAIL PROTECTED] > Sent: Friday, March 28, 2003 2:37 PM > To: Maven Users List > Subject: Re: inter-project dependencies for the Eclipse plugin > > > On Fri, 2003-03-28 at 19:12, Jeffrey D. Brekke wrote: > > This is very interesting. We have 36 projects, all with > > interdependencies ( some build, some test, some runtime ) and to have > > the reactor/maven maintain the eclipse projects like this would be > > cool. Is there a dep heirarchy in eclipse where like a project dep is > > used if present before a jar dep? Then we could just put both deps in > > the project. > > In Eclipse if you have a number of separate projects open in your > workspace you can specify dependencies between them, so you can say that > project 'foo' depends on project 'bar' in the same workspace. This > results in bar being on the classpath when foo is compiled. It also > helps to tie together the internal model that Eclipse uses - you can > click on a symbol in the foo project and it'll take you to the source in > the bar project or show you the javadoc for example. If you were > depending on a jar file you'd have to associate a source directory with > the jar file to get this to work. > > What I tend to do is break a system down into modules, each of which is > a separate project with (typically) one source tree in each project. I > would then use Eclipse's classpath editor to specify for each project > which other projects were required. > > At the moment there doesn't seem to be a way to model this kind of > dependency in the maven project model - dependencies are more-or-less > assumed to be versioned jar files. I think it would be useful to have a > way to model this kind of dependency hierarchy, if only so project files > for IDEs work more cleanly. > > I don't know whether this kind of dependency information would be of use > when building multiple projects under reactor - presumably that can work > with jar file dependencies? > > -Mark. > > > --------------------------------------------------------------------- > 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]