Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Target Management » Project Dependencies for RSE Remote Maven Project
Project Dependencies for RSE Remote Maven Project [message #829328] Mon, 26 March 2012 06:30 Go to next message
Missing name Missing name is currently offline Missing name Missing name
Messages: 4
Registered: November 2011
Junior Member
Hello,

I am working with RSE to edit Java code remotely. Most of my remote projects use Maven as the build tool.

The problem is that Eclipse cannot find any of the dependencies, as the Maven plugin doesn't seem to play nice with RSE.

The .project file created by RSE has basically nothing in it.

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>ppa-jeremym-l.slac.stanford.edu_hps-java</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>

And, by default, it doesn't make any .classpath file at all.

So is there a way to specify/import these Maven dependencies somehow?

When I attempt to activate Maven under "Configure" I get a rather cryptic "NullPointerException", and then nothing seems to work. I'm assuming this is because the Maven plugin and most of the rest of Eclipse are designed to work with local file systems and so probably can't even find my pom file.

Can anyone lay out my options for getting these dependencies into the remote project? I'm fine with executing external commands, but I don't think specifying all the dependencies manually in the project menu is going to work, as there are too many, unless it can somehow be done automatically. Project dependencies have the same down side. The projects I need to build have a really complex dependency tree, so I can't just link to a couple other projects and be done with it.

Right now, Eclipse does not even find the Java system libraries that ship with the JRE, e.g. says packages like "java.util" cannot be found, even when I manually add javanature to the .project file. So something seems off there.

Would I be able to use 'mvn eclipse:eclipse' to get this working? So far that doesn't seem to do it.

I just started playing with this, so perhaps I'm missing something obvious. The RSE documentation doesn't seem to be much help though, as I can't find any mention of specifying Java dependencies and the like.

Thanks for any advice or tips you can give me on this issue.

--Jeremy

[Updated on: Mon, 26 March 2012 06:43]

Report message to a moderator

Re: Project Dependencies for RSE Remote Maven Project [message #830432 is a reply to message #829328] Tue, 27 March 2012 16:09 Go to previous messageGo to next message
David McKnight is currently offline David McKnight
Messages: 244
Registered: July 2009
Senior Member
When you use RSE to edit a remote file, a cached version of the file gets
stored in the RemoteSystemTempFiles project (the project is filtered out of
the Project Explorer view but you can see it by changing the view filters).
When you say you add a java nature to the .project file, are you saying you
added the nature to the RemoteSystemTempFiles project?


"Missing name Mising name" <forums-noreply@xxxxxxxx> wrote in message
news:jkp2e2$7qb$1@xxxxxxxxe.org...
> Hello,
>
> I am working with RSE to edit Java code remotely. Most of my remote
> projects use Maven as the build tool.
> The problem is that Eclipse cannot find any of the dependencies, as the
> Maven plugin doesn't seem to play nice with RSE.
>
> Is there a way to specify/import these dependencies? When I attempt to
> activate Maven under "Configure" I get a rather cryptic
> "NullPointerException", and then nothing seems to work. I'm assuming this
> is because the Maven plugin and all the rest of Eclipse's dependency
> management code are designed to work with local and not remote file
> systems.
>
> Can anyone lay out my options for doing this? I'm fine with executing
> external commands, but I don't think specifying all dependencies manually
> in the project menu is going to work, as there are too many, unless it can
> somehow be done automatically.
>
> Right now, Eclipse does not even find the Java system libraries that ship
> with the JRE, e.g. says packages like "java.util" cannot be found, even
> when I manually add javanature to the .project file.
>
> Anyone have any ideas here? Creative hacks are welcome, too, if this
> isn't something that is built-in to RSE.
>
> I am also open to using other tools besides RSE, though I really like this
> thing, so I'd like to get this particular problem solved.
>
> Thanks!
>
> --Jeremy
Re: Project Dependencies for RSE Remote Maven Project [message #832907 is a reply to message #830432] Fri, 30 March 2012 18:48 Go to previous messageGo to next message
Missing name Missing name is currently offline Missing name Missing name
Messages: 4
Registered: November 2011
Junior Member
Hi, Dave. Thanks for the reply.

No, I edited the remote copy of .project in the project's root directory. I didn't do anything with the RemoteSystemTempFiles, as I wasn't even sure of its function. Do you have a suggested solution/hack that would use this directory? How do I change the filter views to see these files?

Re: Project Dependencies for RSE Remote Maven Project [message #834881 is a reply to message #832907] Mon, 02 April 2012 14:18 Go to previous messageGo to next message
David McKnight is currently offline David McKnight
Messages: 244
Registered: July 2009
Senior Member
As a hack, you could try updating the .project for RemoteSystemTempFiles
project to get the required editor support (you may also need to add a
..classpath file).

To see the RemoteSystemTempFiles project, from the Project Explorer, go to
the view menu and select the "Customize View..." action. In the dialog,
under the Filters tab, scroll down to "RSE Internal Projects" and uncheck
the item.


"Missing name Mising name" <forums-noreply@xxxxxxxx> wrote in message
news:jl4v5s$utk$1@xxxxxxxxe.org...
> Hi, Dave. Thanks for the reply.
>
> No, I edited the remote copy of .project in the project's root directory.
> I didn't do anything with the RemoteSystemTempFiles, as I wasn't even sure
> of its function. Do you have a suggested solution/hack that would use
> this directory? How do I change the filter views to see these files?
>
>
Re: Project Dependencies for RSE Remote Maven Project [message #916507 is a reply to message #829328] Wed, 19 September 2012 05:06 Go to previous messageGo to next message
William Heger is currently offline William Heger
Messages: 2
Registered: September 2012
Junior Member
Is there a resolution to this post because it's precisely what I need right now.

I have a functioning RSE set-up, but how do I now:

1. get m2eclipse or eclipse otherwise to treat the dependencies stored on the remote system's repo to be treated as project dependencies.

2. lesser concern, how can I now trigger maven builds on the remote server from eclipse.

I can always script the build over ssh, but the dependency management is crucial obviously.
Re: Project Dependencies for RSE Remote Maven Project [message #916522 is a reply to message #916507] Wed, 19 September 2012 05:41 Go to previous messageGo to next message
Missing name Missing name is currently offline Missing name Missing name
Messages: 4
Registered: November 2011
Junior Member
Hi, William.

I never did figure out a resolution to this problem. When using RSE, I typically have a terminal open and run 'mvn' manually to do the builds from the project's directory on the remote host. In other words, I bypass the Eclipse Maven plugin entirely, as it seems to only work correctly with local projects. I do not even enable Maven nature on the project, as it will then just constantly cause errors to pop up when it tries to update or build.

I corresponded a bit with the maintainers of RSE about this issue, and I was told that doing dependency management is not part of the scope of that project.

I think the problem here is that the Maven plugin, or all Eclipse plugins for that matter, does not see files in an RSE project like it does local ones. I realize this is vague. I don't have a great understanding of the internals here. The capability for doing dependency management is probably something that would need to be added to the part of RSE which manages remote projects. I don't think it has anything like this capability right now.

Perhaps there is something that can be done to work around this using the 'RemoteSystemTempFiles' project, as referenced in some of the replies here. I never investigated this.
Re: Project Dependencies for RSE Remote Maven Project [message #916603 is a reply to message #916522] Wed, 19 September 2012 08:12 Go to previous messageGo to next message
William Heger is currently offline William Heger
Messages: 2
Registered: September 2012
Junior Member
Thank you so much for getting back to me and although I'm sad to hear it, you are at least saving me from stumbling down the same path.

I really never criticize an OSS project, but I'm so disappointed that this isn't an aim of RSE. If tooling the remote system to build from a "client Eclipse" using something as general as maven isn't an aim of the project, I'm really not clear what RSE is going for.

Sorry for the whinging, but if Eclipse was able to simply attach to build servers, a litany of problems around configuration management, continuous integration, cross-compilation, compilation time, etc. could be solved in one fell swoop. And once you have the deep access that RSE advertises, it seems like that should be possible.

Thanks anyway,
-Will
Re: Project Dependencies for RSE Remote Maven Project [message #988241 is a reply to message #916603] Thu, 29 November 2012 04:31 Go to previous message
Ryan Compton is currently offline Ryan Compton
Messages: 1
Registered: November 2012
Junior Member
Hi, I was having this problem as well.

Eventually I got around it by mounting the remote Maven project's directory with sshfs and then importing the mounted pom.xml directly (ignoring everything about the RSE).

I can still use Eclipse for syntax/error highlighting just fine. I run my code from an ssh shell (which is my preference anyway).

I needed to download all my Maven dependencies to my laptop on the first run as well as add jars to the laptops local repository, but that was all straightforward.
Previous Topic:FTP disconnect from a non-available host gets stuck
Next Topic:Remote XML validation
Goto Forum:
  


Current Time: Tue Oct 21 17:06:54 GMT 2014

Powered by FUDForum. Page generated in 0.01879 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software