You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Kenji Nakamura <na...@gmail.com> on 2006/03/23 21:39:04 UTC
Absolute file path as dependency in plan
Hi,
I'm working on upgrading from M5 to 1.0 release.
For development, I used absolute file URI for dependencies in plans. It
worked well in M5, but got the following error when I deploy in 1.0 release.
deployGBean:
[java] No ModuleID or TargetModuleID provided. Attempting to guess
based
[java] on the content of the plan.
[java]
[java] Attempting to use ModuleID 'com/palamida/ipamp/Dispatcher'
[java]
[java] Stopped com/foo/ibar/Dispatcher
[java]
[java] Unloaded com/foo/bar/Dispatcher
[java]
[java] Uninstalled com/foo/bar/Dispatcher
[java]
[java] Error: Operation failed:
[java]
org.apache.geronimo.kernel.repository.MissingDependencyException:
[java] uri
[java]
file:/Users/kenjin/foo/dev1/engineering/sandbox/kenjin/bar/trunk/modules//dispatcher/target/eclipse-classes/
[java] not found in repository
[java]
[java] uri
[java]
file:/Users/kenjin/foo/dev1/engineering/sandbox/kenjin/bar/trunk/modules//dispatcher/target/eclipse-classes/
[java] not found in repository
It was VERY useful with the combination of Eclipse's dynamic code
replacement to reduce the frequency of bouncing Geronimo.
Is it no longer supported?? Is there any other way to specify a directory on
file system as a dependency instead of jars in respository?
The flagment of the plan file looks like this;
<configuration configId="com/foo/bar/Dispatcher" inverseClassloading="false"
xmlns="http://geronimo.apache.org/xml/ns/deployment-1.0">
<import>
<uri>geronimo/j2ee-security/1.0/car</uri>
</import>
<dependency>
<uri>file:/Users/kenjin/foo/dev1/engineering/sandbox/kenjin/bar/trunk/modules//dispatcher/target/eclipse-classes/</uri>
</dependency>
<dependency>
<uri>file:/Users/kenjin/foo/dev1/engineering/sandbox/kenjin/bar/trunk/modules//dispatcher-api/target/eclipse-classes/</uri>
</dependency>
<dependency>
<uri>file:/Users/kenjin/foo/dev1/engineering/sandbox/kenjin/bar/trunk/modules//security/target/eclipse-classes/</uri>
</dependency>
<dependency>
<uri>file:/Users/kenjin/foo/dev1/engineering/sandbox/kenjin/bar/trunk/modules//util/target/eclipse-classes/</uri>
</dependency>
<dependency>
<uri>foo/ant-patch/1.5.4-1.0/jar</uri>
</dependency>
Thanks in advance,
--
Kenj Nakamura
Re: Absolute file path as dependency in plan
Posted by Kenji Nakamura <na...@gmail.com>.
David,
I came up with an idea to use JAR class-path extension mechanism to point
eclipse classes from repository JAR file.
First, create a dummy JAR file containing only a MANIFEST.MF with Class-Path
entries something like this.
Manifest-Version: 1.0
Class-Path: ../../../../../../../modules/dispatcher/target/eclipse-cla
sses/ ../../../../../../../modules/dispatcher-api/target/eclipse-clas
ses/ ../../../../../../../modules/security/target/eclipse-classes/ ..
/../../../../../../modules/util/target/eclipse-classes/ ../../../../.
./../../modules/app-core/target/eclipse-classes/ ../../../../../../..
/modules/workspace-api/target/eclipse-classes/ ../../../../../../../m
odules/signatures-api/target/eclipse-classes/ ../../../../../../../mo
dules/codebase/target/eclipse-classes/ ../../../../../../../modules/s
ignatures/target/eclipse-classes/ ../../../../../../../modules/snapsh
ot/target/eclipse-classes/ ../../../../../../../modules/locator/targe
t/eclipse-classes/ ../../../../../../../modules/workspace/target/ecli
pse-classes/ ../../../../../../../modules/scanner/target/eclipse-clas
ses/
Created-By: 1.5.0_05 (Apple Computer, Inc.)
Then, deploy the JAR into repository just as same as regular JAR, and point
the file as dependency in plan.xml.
I confirmed the code changes made in Eclipse is reflected simply by
stop/starting the GBean. No need to bounce Geronimo.
If Geronimo is launched in debug mode from Eclipse, dynamic code replacement
may work, I haven't tried though.
The caveat of the approach is the classpath must be relative from the dummy
JAR file, but it should be pretty easy to generate the entry automatically
as a part of building process.
I hope this trick helps for those who're looking for better integration
between Geronimo and Eclipse (or other IDEs).
Thanks,
Kenji
On 3/23/06, David Jencks <da...@yahoo.com> wrote:
>
>
> On Mar 23, 2006, at 3:49 PM, Kenji Nakamura wrote:
>
> David,
>
> AFAIK, Eclipse output directory must be under the project, so it is
> impossible to move the destination under geronimo's repository directory
> unless resorting to symbolic link. I'm reluctant to use such a brute force
> way since we need to support different dev environment (win32, osx, etc.)
> Geronimo Eclipse plugin seems to archive and export to repository on code
> changes, but I believe it is less transparent than the current approach I
> take.
>
>
> I'm pretty sure that the geronimo 1.0 repository can only deal with packed
> jar files in its repository, so if I'm correct even a symbolic link won't
> work. What you are doing in M5 looks pretty handy :-)
>
> I think that sometime in the future we can support something even more
> integrated with eclipse by including an additional EclipseRepository that
> locates artifacts identified by groupId/artifactId/version/type in the
> eclipse project itself. This will let you use the same dependencies in your
> geronimo plan in development and production, and let eclipse manage the
> actual classes. However this is some time off in the future.
>
>
> Besides, I've read users-ML on Feb. 10 that Aaron Mulder mentioned the
> default value of 4th path is "jar" when omitted, so I'm wondering if the
> dependency definition you gave me would be interpreted as
> "repository/kenjin/util- 1.0.jar" instead of "repository/kenjin/util/1.0"
> directory. Which is correct?
>
>
>
> In a maven 1 style repo, the artifact would be a jar at
> repository/kenjin/jars/util-1.0.jar
>
> As mentioned above, I think it has to be an actual jar file, although you
> could try having a directory there with that name (including the .jar).
>
> I'm afraid that with g 1.0 you will have to jar up your classes and put
> the jars into the geronimo repo. However, please let us know if I am wrong
> and you can use an unpacked directory or a link of some kind to the eclipse
> location.
>
> thanks
> david jencks
>
>
>
> I'll try Eclipse plugin if it is impossible to configure GBean to pick up
> Eclipse's class output directory.
>
> Thanks,
>
> Kenji
>
> On 3/23/06, David Jencks < david_jencks@yahoo.com> wrote:
> >
> >
> > On Mar 23, 2006, at 12:39 PM, Kenji Nakamura wrote:
> >
> > Hi,
> >
> > I'm working on upgrading from M5 to 1.0 release.
> >
> > For development, I used absolute file URI for dependencies in plans. It
> > worked well in M5, but got the following error when I deploy in 1.0release.
> >
> >
> > deployGBean:
> > [java] No ModuleID or TargetModuleID provided. Attempting to
> > guess based
> > [java] on the content of the plan.
> > [java]
> > [java] Attempting to use ModuleID
> > 'com/palamida/ipamp/Dispatcher'
> > [java]
> > [java] Stopped com/foo/ibar/Dispatcher
> > [java]
> > [java] Unloaded com/foo/bar/Dispatcher
> > [java]
> > [java] Uninstalled com/foo/bar/Dispatcher
> > [java]
> > [java] Error: Operation failed:
> > [java]
> > org.apache.geronimo.kernel.repository.MissingDependencyException:
> > [java] uri
> > [java]
> > file:/Users/kenjin/foo/dev1/engineering/sandbox/kenjin/bar/trunk/modules//dispatcher/target/eclipse-classes/
> > [java] not found in repository
> > [java]
> > [java] uri
> > [java]
> > file:/Users/kenjin/foo/dev1/engineering/sandbox/kenjin/bar/trunk/modules//dispatcher/target/eclipse-classes/
> > [java] not found in repository
> >
> > It was VERY useful with the combination of Eclipse's dynamic code
> > replacement to reduce the frequency of bouncing Geronimo.
> > Is it no longer supported?? Is there any other way to specify a
> > directory on file system as a dependency instead of jars in respository?
> >
> >
> > I don't think that it was intentional that this worked in M5 :-)
> >
> > You need to put your dependencies into the geronimo repository,
> > possibly renaming them so they each have a version, and refer to them using
> >
> > <dependency>
> > <groupId>kenjin</groupId>
> > <artifactId>util</artifactId>
> > <version>1.0</version>
> > </dependency>
> >
> > (Or the all-on -one line format, but I recommend this one -- the other
> > is not going to work in 1.1.)
> >
> > We're working on another way to support using the classes eclipse knows
> > about, hopefully it will be available shortly after or in 1.1. The new
> > way should let you use the same plan for development and production, so you
> > wouldn't need to change the dependencies.
> >
> > thanks
> > david jencks
> >
> > The flagment of the plan file looks like this;
> >
> > <configuration configId="com/foo/bar/Dispatcher"
> > inverseClassloading="false" xmlns="
> > http://geronimo.apache.org/xml/ns/deployment-1.0">
> > <import>
> > <uri>geronimo/j2ee-security/1.0/car</uri>
> > </import>
> >
> > <dependency>
> > <uri>
> > file:/Users/kenjin/foo/dev1/engineering/sandbox/kenjin/bar/trunk/modules//dispatcher/target/eclipse-classes/</uri>
> >
> > </dependency>
> > <dependency>
> > <uri>
> > file:/Users/kenjin/foo/dev1/engineering/sandbox/kenjin/bar/trunk/modules//dispatcher-api/target/eclipse-classes/
> > </uri>
> > </dependency>
> > <dependency>
> > <uri>
> > file:/Users/kenjin/foo/dev1/engineering/sandbox/kenjin/bar/trunk/modules//security/target/eclipse-classes/
> > </uri>
> > </dependency>
> > <dependency>
> > <uri>file:/Users/kenjin/foo/dev1/engineering/sandbox/kenjin/bar/trunk/modules//util/target/eclipse-classes/
> > </uri>
> > </dependency>
> > <dependency>
> > <uri>foo/ant-patch/1.5.4-1.0/jar</uri>
> > </dependency>
> >
> > Thanks in advance,
> >
> >
> > --
> > Kenj Nakamura
> >
> >
> >
>
>
> --
> Kenj Nakamura
>
>
>
--
Kenj Nakamura
Re: Absolute file path as dependency in plan
Posted by David Jencks <da...@yahoo.com>.
On Mar 23, 2006, at 3:49 PM, Kenji Nakamura wrote:
> David,
>
> AFAIK, Eclipse output directory must be under the project, so it is
> impossible to move the destination under geronimo's repository
> directory unless resorting to symbolic link. I'm reluctant to use
> such a brute force way since we need to support different dev
> environment (win32, osx, etc.) Geronimo Eclipse plugin seems to
> archive and export to repository on code changes, but I believe it
> is less transparent than the current approach I take.
I'm pretty sure that the geronimo 1.0 repository can only deal with
packed jar files in its repository, so if I'm correct even a symbolic
link won't work. What you are doing in M5 looks pretty handy :-)
I think that sometime in the future we can support something even
more integrated with eclipse by including an additional
EclipseRepository that locates artifacts identified by groupId/
artifactId/version/type in the eclipse project itself. This will let
you use the same dependencies in your geronimo plan in development
and production, and let eclipse manage the actual classes. However
this is some time off in the future.
>
> Besides, I've read users-ML on Feb. 10 that Aaron Mulder mentioned
> the default value of 4th path is "jar" when omitted, so I'm
> wondering if the dependency definition you gave me would be
> interpreted as "repository/kenjin/util- 1.0.jar" instead of
> "repository/kenjin/util/1.0" directory. Which is correct?
>
In a maven 1 style repo, the artifact would be a jar at repository/
kenjin/jars/util-1.0.jar
As mentioned above, I think it has to be an actual jar file, although
you could try having a directory there with that name (including
the .jar).
I'm afraid that with g 1.0 you will have to jar up your classes and
put the jars into the geronimo repo. However, please let us know if
I am wrong and you can use an unpacked directory or a link of some
kind to the eclipse location.
thanks
david jencks
>
> I'll try Eclipse plugin if it is impossible to configure GBean to
> pick up Eclipse's class output directory.
>
> Thanks,
>
> Kenji
>
> On 3/23/06, David Jencks < david_jencks@yahoo.com> wrote:
>
> On Mar 23, 2006, at 12:39 PM, Kenji Nakamura wrote:
>
>> Hi,
>>
>> I'm working on upgrading from M5 to 1.0 release.
>>
>> For development, I used absolute file URI for dependencies in
>> plans. It worked well in M5, but got the following error when I
>> deploy in 1.0 release.
>>
>> deployGBean:
>> [java] No ModuleID or TargetModuleID provided. Attempting
>> to guess based
>> [java] on the content of the plan.
>> [java]
>> [java] Attempting to use ModuleID 'com/palamida/ipamp/
>> Dispatcher'
>> [java]
>> [java] Stopped com/foo/ibar/Dispatcher
>> [java]
>> [java] Unloaded com/foo/bar/Dispatcher
>> [java]
>> [java] Uninstalled com/foo/bar/Dispatcher
>> [java]
>> [java] Error: Operation failed:
>> [java]
>> org.apache.geronimo.kernel.repository.MissingDependencyException:
>> [java] uri
>> [java] file:/Users/kenjin/foo/dev1/engineering/sandbox/
>> kenjin/bar/trunk/modules//dispatcher/target/eclipse-classes/
>> [java] not found in repository
>> [java]
>> [java] uri
>> [java] file:/Users/kenjin/foo/dev1/engineering/sandbox/
>> kenjin/bar/trunk/modules//dispatcher/target/eclipse-classes/
>> [java] not found in repository
>>
>> It was VERY useful with the combination of Eclipse's dynamic code
>> replacement to reduce the frequency of bouncing Geronimo.
>> Is it no longer supported?? Is there any other way to specify a
>> directory on file system as a dependency instead of jars in
>> respository?
>>
>
> I don't think that it was intentional that this worked in M5 :-)
>
> You need to put your dependencies into the geronimo repository,
> possibly renaming them so they each have a version, and refer to
> them using
>
> <dependency>
> <groupId>kenjin</groupId>
> <artifactId>util</artifactId>
> <version>1.0</version>
> </dependency>
>
> (Or the all-on -one line format, but I recommend this one -- the
> other is not going to work in 1.1.)
>
> We're working on another way to support using the classes eclipse
> knows about, hopefully it will be available shortly after or in
> 1.1. The new way should let you use the same plan for development
> and production, so you wouldn't need to change the dependencies.
>
> thanks
> david jencks
>
>> The flagment of the plan file looks like this;
>>
>> <configuration configId="com/foo/bar/Dispatcher"
>> inverseClassloading="false" xmlns=" http://geronimo.apache.org/xml/
>> ns/deployment-1.0">
>> <import>
>> <uri>geronimo/j2ee-security/1.0/car</uri>
>> </import>
>>
>> <dependency>
>> <uri>file:/Users/kenjin/foo/dev1/engineering/sandbox/kenjin/
>> bar/trunk/modules//dispatcher/target/eclipse-classes/</uri>
>> </dependency>
>> <dependency>
>> <uri>file:/Users/kenjin/foo/dev1/engineering/sandbox/kenjin/
>> bar/trunk/modules//dispatcher-api/target/eclipse-classes/</uri>
>> </dependency>
>> <dependency>
>> <uri>file:/Users/kenjin/foo/dev1/engineering/sandbox/kenjin/
>> bar/trunk/modules//security/target/eclipse-classes/</uri>
>> </dependency>
>> <dependency>
>> <uri>file:/Users/kenjin/foo/dev1/engineering/sandbox/kenjin/
>> bar/trunk/modules//util/target/eclipse-classes/ </uri>
>> </dependency>
>> <dependency>
>> <uri>foo/ant-patch/1.5.4-1.0/jar</uri>
>> </dependency>
>>
>> Thanks in advance,
>>
>>
>> --
>> Kenj Nakamura
>
>
>
>
> --
> Kenj Nakamura
Re: Absolute file path as dependency in plan
Posted by Kenji Nakamura <na...@gmail.com>.
David,
AFAIK, Eclipse output directory must be under the project, so it is
impossible to move the destination under geronimo's repository directory
unless resorting to symbolic link. I'm reluctant to use such a brute force
way since we need to support different dev environment (win32, osx, etc.)
Geronimo Eclipse plugin seems to archive and export to repository on code
changes, but I believe it is less transparent than the current approach I
take.
Besides, I've read users-ML on Feb. 10 that Aaron Mulder mentioned the
default value of 4th path is "jar" when omitted, so I'm wondering if the
dependency definition you gave me would be interpreted as
"repository/kenjin/util- 1.0.jar" instead of "repository/kenjin/util/1.0"
directory. Which is correct?
I'll try Eclipse plugin if it is impossible to configure GBean to pick up
Eclipse's class output directory.
Thanks,
Kenji
On 3/23/06, David Jencks <da...@yahoo.com> wrote:
>
>
> On Mar 23, 2006, at 12:39 PM, Kenji Nakamura wrote:
>
> Hi,
>
> I'm working on upgrading from M5 to 1.0 release.
>
> For development, I used absolute file URI for dependencies in plans. It
> worked well in M5, but got the following error when I deploy in 1.0release.
>
>
> deployGBean:
> [java] No ModuleID or TargetModuleID provided. Attempting to
> guess based
> [java] on the content of the plan.
> [java]
> [java] Attempting to use ModuleID 'com/palamida/ipamp/Dispatcher'
> [java]
> [java] Stopped com/foo/ibar/Dispatcher
> [java]
> [java] Unloaded com/foo/bar/Dispatcher
> [java]
> [java] Uninstalled com/foo/bar/Dispatcher
> [java]
> [java] Error: Operation failed:
> [java]
> org.apache.geronimo.kernel.repository.MissingDependencyException:
> [java] uri
> [java]
> file:/Users/kenjin/foo/dev1/engineering/sandbox/kenjin/bar/trunk/modules//dispatcher/target/eclipse-classes/
> [java] not found in repository
> [java]
> [java] uri
> [java]
> file:/Users/kenjin/foo/dev1/engineering/sandbox/kenjin/bar/trunk/modules//dispatcher/target/eclipse-classes/
> [java] not found in repository
>
> It was VERY useful with the combination of Eclipse's dynamic code
> replacement to reduce the frequency of bouncing Geronimo.
> Is it no longer supported?? Is there any other way to specify a directory
> on file system as a dependency instead of jars in respository?
>
>
> I don't think that it was intentional that this worked in M5 :-)
>
> You need to put your dependencies into the geronimo repository, possibly
> renaming them so they each have a version, and refer to them using
>
> <dependency>
> <groupId>kenjin</groupId>
> <artifactId>util</artifactId>
> <version>1.0</version>
> </dependency>
>
> (Or the all-on -one line format, but I recommend this one -- the other is
> not going to work in 1.1.)
>
> We're working on another way to support using the classes eclipse knows
> about, hopefully it will be available shortly after or in 1.1. The new
> way should let you use the same plan for development and production, so you
> wouldn't need to change the dependencies.
>
> thanks
> david jencks
>
> The flagment of the plan file looks like this;
>
> <configuration configId="com/foo/bar/Dispatcher"
> inverseClassloading="false" xmlns="
> http://geronimo.apache.org/xml/ns/deployment-1.0">
> <import>
> <uri>geronimo/j2ee-security/1.0/car</uri>
> </import>
>
> <dependency>
> <uri>
> file:/Users/kenjin/foo/dev1/engineering/sandbox/kenjin/bar/trunk/modules//dispatcher/target/eclipse-classes/</uri>
>
> </dependency>
> <dependency>
> <uri>
> file:/Users/kenjin/foo/dev1/engineering/sandbox/kenjin/bar/trunk/modules//dispatcher-api/target/eclipse-classes/
> </uri>
> </dependency>
> <dependency>
> <uri>
> file:/Users/kenjin/foo/dev1/engineering/sandbox/kenjin/bar/trunk/modules//security/target/eclipse-classes/
> </uri>
> </dependency>
> <dependency>
> <uri>file:/Users/kenjin/foo/dev1/engineering/sandbox/kenjin/bar/trunk/modules//util/target/eclipse-classes/
> </uri>
> </dependency>
> <dependency>
> <uri>foo/ant-patch/1.5.4-1.0/jar</uri>
> </dependency>
>
> Thanks in advance,
>
>
> --
> Kenj Nakamura
>
>
>
--
Kenj Nakamura
Re: Absolute file path as dependency in plan
Posted by David Jencks <da...@yahoo.com>.
On Mar 23, 2006, at 12:39 PM, Kenji Nakamura wrote:
> Hi,
>
> I'm working on upgrading from M5 to 1.0 release.
>
> For development, I used absolute file URI for dependencies in
> plans. It worked well in M5, but got the following error when I
> deploy in 1.0 release.
>
> deployGBean:
> [java] No ModuleID or TargetModuleID provided. Attempting
> to guess based
> [java] on the content of the plan.
> [java]
> [java] Attempting to use ModuleID 'com/palamida/ipamp/
> Dispatcher'
> [java]
> [java] Stopped com/foo/ibar/Dispatcher
> [java]
> [java] Unloaded com/foo/bar/Dispatcher
> [java]
> [java] Uninstalled com/foo/bar/Dispatcher
> [java]
> [java] Error: Operation failed:
> [java]
> org.apache.geronimo.kernel.repository.MissingDependencyException:
> [java] uri
> [java] file:/Users/kenjin/foo/dev1/engineering/sandbox/
> kenjin/bar/trunk/modules//dispatcher/target/eclipse-classes/
> [java] not found in repository
> [java]
> [java] uri
> [java] file:/Users/kenjin/foo/dev1/engineering/sandbox/
> kenjin/bar/trunk/modules//dispatcher/target/eclipse-classes/
> [java] not found in repository
>
> It was VERY useful with the combination of Eclipse's dynamic code
> replacement to reduce the frequency of bouncing Geronimo.
> Is it no longer supported?? Is there any other way to specify a
> directory on file system as a dependency instead of jars in
> respository?
>
I don't think that it was intentional that this worked in M5 :-)
You need to put your dependencies into the geronimo repository,
possibly renaming them so they each have a version, and refer to them
using
<dependency>
<groupId>kenjin</groupId>
<artifactId>util</artifactId>
<version>1.0</version>
</dependency>
(Or the all-on -one line format, but I recommend this one -- the
other is not going to work in 1.1.)
We're working on another way to support using the classes eclipse
knows about, hopefully it will be available shortly after or in 1.1.
The new way should let you use the same plan for development and
production, so you wouldn't need to change the dependencies.
thanks
david jencks
> The flagment of the plan file looks like this;
>
> <configuration configId="com/foo/bar/Dispatcher"
> inverseClassloading="false" xmlns=" http://geronimo.apache.org/xml/
> ns/deployment-1.0">
> <import>
> <uri>geronimo/j2ee-security/1.0/car</uri>
> </import>
>
> <dependency>
> <uri>file:/Users/kenjin/foo/dev1/engineering/sandbox/kenjin/bar/
> trunk/modules//dispatcher/target/eclipse-classes/</uri>
> </dependency>
> <dependency>
> <uri>file:/Users/kenjin/foo/dev1/engineering/sandbox/kenjin/bar/
> trunk/modules//dispatcher-api/target/eclipse-classes/</uri>
> </dependency>
> <dependency>
> <uri>file:/Users/kenjin/foo/dev1/engineering/sandbox/kenjin/bar/
> trunk/modules//security/target/eclipse-classes/</uri>
> </dependency>
> <dependency>
> <uri>file:/Users/kenjin/foo/dev1/engineering/sandbox/kenjin/bar/
> trunk/modules//util/target/eclipse-classes/</uri>
> </dependency>
> <dependency>
> <uri>foo/ant-patch/1.5.4-1.0/jar</uri>
> </dependency>
>
> Thanks in advance,
>
>
> --
> Kenj Nakamura