|
|
|
Re: More Settings for Projects Import Task [message #1403997 is a reply to message #1403936] |
Tue, 29 July 2014 04:58 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
Johannes,
Comments below.
On 28/07/2014 6:13 PM, Johannes Dorn wrote:
> Thanks for your reply. Having looked at the code myself, i agree it
> looks like it shouldn't copy anything.
> With a closer look at the imported project, i see that it didn't
> really copy it but instead created a new .project file with the
> correct project name.
There wasn't one before right? You guys normally rely on Maven import
to create the .project files (though it would seem better to me to
include them in your repo.)
> This new file has a few more empty properties like <nature>.
Yes, we can know nothing about what's expected of the project (though I
supposed the Maven import normally use information from the pom.xml or
some such thing).
>
> I've attached a minimal setup that demonstrates the problem i have.
> http://www.codetrails.com/sites/default/files/import.setup
>
> This setup clone a public git repository (from our Code Recommenders
> Snipmatch) and puts the clone into the
> ${installation.location/ws/.recommenders/snipmatch/repositories/REPONAME}
> Then the Projects Import task looks at
> ${installation.location/ws/.recommenders/snipmatch/repositories/}
> nested locations.
>
> What i end up with is a new folder "Code Recommenders Snippets" in
> {installation.location/ws} folder which has the aforementioned
> .project file, but not the additional contents of the cloned project.
> Namely, a ".git" folder, a ".gitignore" file and a "snippets" folder
> which contains .json files.
Hmm, this code looks suspicious:
if (Platform.getLocation().isPrefixOf(locationPath))
{
locationPath = null;
}
I'll have to ask Eike why this is here and what the intent is, but I
think it's supposed to check if the project is already directly in the
root folder of the workspace itself, i.e., the default location for a
new project. From what you've described, your project is physically
nested in the workspace, but not at the root. In any case, it's clear
that this guard isn't quite right and will lead to exactly the type of
problem you're describing. Please open a bugzilla.
>
> For my purposes, it wouldn't do to have those files and folders in the
> new project folder, though. The imported project has to be a reference.
Yes of course, so that it's under git control.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Powered by
FUDForum. Page generated in 0.03358 seconds