You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by "Lacton (JIRA)" <ji...@apache.org> on 2008/08/04 23:44:44 UTC

[jira] Created: (BUILDR-122) eclipse task should not check for directory existence

eclipse task should not check for directory existence
-----------------------------------------------------

                 Key: BUILDR-122
                 URL: https://issues.apache.org/jira/browse/BUILDR-122
             Project: Buildr
          Issue Type: Bug
          Components: IDE
    Affects Versions: 1.3.3
         Environment: buildr trunk revision 682463
            Reporter: Lacton
            Priority: Minor


The eclipse task checks for source directories' existence when generating the .classpath file. Source folders that get generated later (e.g., during the build) are missing from the .classpath file.

Proposed fix: remove the two "if File.exist? project.path_to(path)" lines in the FileTask for '.classpath' in eclipse.rb.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (BUILDR-122) eclipse task should not check for directory existence

Posted by "Lacton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-122?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lacton updated BUILDR-122:
--------------------------

    Attachment: BUILDR-122.spec.patch

'BUILDR-122.spec.patch' adds to eclipse_spec.rb the example given in 'building.textile'.

<quote>
For example, let's run the APT tool on our annotated source code before
compiling it:

{{{!ruby
compile.from apt
}}}

When you call @apt@ on a project, it returns a file task that points to the
@target/generated/apt@ directory.
</quote>

This new test case will fail, because directory 'target/generated/apt' does not exist yet.

> eclipse task should not check for directory existence
> -----------------------------------------------------
>
>                 Key: BUILDR-122
>                 URL: https://issues.apache.org/jira/browse/BUILDR-122
>             Project: Buildr
>          Issue Type: Bug
>          Components: IDE
>    Affects Versions: 1.3.3
>         Environment: buildr trunk revision 682463
>            Reporter: Lacton
>            Priority: Minor
>         Attachments: BUILDR-122.spec.patch
>
>
> The eclipse task checks for source directories' existence when generating the .classpath file. Source folders that get generated later (e.g., during the build) are missing from the .classpath file.
> Proposed fix: remove the two "if File.exist? project.path_to(path)" lines in the FileTask for '.classpath' in eclipse.rb.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-122) eclipse task should not check for directory existence

Posted by "Assaf Arkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12620495#action_12620495 ] 

Assaf Arkin commented on BUILDR-122:
------------------------------------

In the past, compile.sources would always include src/main/java, back when we only supported Java, so it was necessary to test for existence.  That's no longer true, and resources.source doesn't return src/main/resources either, unless it exists.

So assume that if compile.sources or resources.source return a path, that path is supposed to exist.  The sticky part is, as with apt, you may need to run a task to generate it.  Running that task from the eclipse task would work when you set the project up, but it could vanish if you run buildr clean (or even buildr build could remove it and fail to re-create it).


> eclipse task should not check for directory existence
> -----------------------------------------------------
>
>                 Key: BUILDR-122
>                 URL: https://issues.apache.org/jira/browse/BUILDR-122
>             Project: Buildr
>          Issue Type: Bug
>          Components: IDE
>    Affects Versions: 1.3.3
>         Environment: buildr trunk revision 682463
>            Reporter: Lacton
>            Priority: Minor
>         Attachments: BUILDR-122.spec.patch
>
>
> The eclipse task checks for source directories' existence when generating the .classpath file. Source folders that get generated later (e.g., during the build) are missing from the .classpath file.
> Proposed fix: remove the two "if File.exist? project.path_to(path)" lines in the FileTask for '.classpath' in eclipse.rb.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (BUILDR-122) eclipse task should not check for directory existence

Posted by "Alex Boisvert (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-122?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alex Boisvert updated BUILDR-122:
---------------------------------

    Fix Version/s: 1.3.3

> eclipse task should not check for directory existence
> -----------------------------------------------------
>
>                 Key: BUILDR-122
>                 URL: https://issues.apache.org/jira/browse/BUILDR-122
>             Project: Buildr
>          Issue Type: Bug
>          Components: IDE
>    Affects Versions: 1.3.3
>         Environment: buildr trunk revision 682463
>            Reporter: Lacton
>            Priority: Minor
>             Fix For: 1.3.3
>
>         Attachments: BUILDR-122.spec.patch
>
>
> The eclipse task checks for source directories' existence when generating the .classpath file. Source folders that get generated later (e.g., during the build) are missing from the .classpath file.
> Proposed fix: remove the two "if File.exist? project.path_to(path)" lines in the FileTask for '.classpath' in eclipse.rb.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-122) eclipse task should not check for directory existence

Posted by "Lacton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12620177#action_12620177 ] 

Lacton commented on BUILDR-122:
-------------------------------

I had another idea. The eclipse task could still check for directory existence, but if a directory does not exist, it could invoke the corresponding file task. That way, the buildfile gets a chance to create the generated directory.

What do you think?

> eclipse task should not check for directory existence
> -----------------------------------------------------
>
>                 Key: BUILDR-122
>                 URL: https://issues.apache.org/jira/browse/BUILDR-122
>             Project: Buildr
>          Issue Type: Bug
>          Components: IDE
>    Affects Versions: 1.3.3
>         Environment: buildr trunk revision 682463
>            Reporter: Lacton
>            Priority: Minor
>         Attachments: BUILDR-122.spec.patch
>
>
> The eclipse task checks for source directories' existence when generating the .classpath file. Source folders that get generated later (e.g., during the build) are missing from the .classpath file.
> Proposed fix: remove the two "if File.exist? project.path_to(path)" lines in the FileTask for '.classpath' in eclipse.rb.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-122) eclipse task should not check for directory existence

Posted by "Alex Boisvert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12619932#action_12619932 ] 

Alex Boisvert commented on BUILDR-122:
--------------------------------------

Ok, thanks for both of your inputs.   I'll do some sanity checks on the project where I had the directory issue previously -- need to migrate it from Buildr 1.2.10 to 1.3-trunk first -- and then make the necessary changes in the Eclipse task.

> eclipse task should not check for directory existence
> -----------------------------------------------------
>
>                 Key: BUILDR-122
>                 URL: https://issues.apache.org/jira/browse/BUILDR-122
>             Project: Buildr
>          Issue Type: Bug
>          Components: IDE
>    Affects Versions: 1.3.3
>         Environment: buildr trunk revision 682463
>            Reporter: Lacton
>            Priority: Minor
>         Attachments: BUILDR-122.spec.patch
>
>
> The eclipse task checks for source directories' existence when generating the .classpath file. Source folders that get generated later (e.g., during the build) are missing from the .classpath file.
> Proposed fix: remove the two "if File.exist? project.path_to(path)" lines in the FileTask for '.classpath' in eclipse.rb.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-122) eclipse task should not check for directory existence

Posted by "Nathan Hamblen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12619863#action_12619863 ] 

Nathan Hamblen commented on BUILDR-122:
---------------------------------------

It's the same for resources; 'src/main/resources' is only added if it exists. I think the check could come out in eclipse.rb; I only included it in my patch since it was there in the original code (for resources, at least). There may have been a time when the eclipse task needed to check for existence of those default paths, but that doesn't seem to be the case now.

> eclipse task should not check for directory existence
> -----------------------------------------------------
>
>                 Key: BUILDR-122
>                 URL: https://issues.apache.org/jira/browse/BUILDR-122
>             Project: Buildr
>          Issue Type: Bug
>          Components: IDE
>    Affects Versions: 1.3.3
>         Environment: buildr trunk revision 682463
>            Reporter: Lacton
>            Priority: Minor
>         Attachments: BUILDR-122.spec.patch
>
>
> The eclipse task checks for source directories' existence when generating the .classpath file. Source folders that get generated later (e.g., during the build) are missing from the .classpath file.
> Proposed fix: remove the two "if File.exist? project.path_to(path)" lines in the FileTask for '.classpath' in eclipse.rb.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (BUILDR-122) eclipse task should not check for directory existence

Posted by "Alex Boisvert (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-122?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alex Boisvert resolved BUILDR-122.
----------------------------------

    Resolution: Fixed

Patch applied.  Thanks for your patience :)

boisvert@boog:~/svn/buildr-trunk$ svn commit -m "BUILDR-122: eclipse task should not check for directory existence"
Sending        lib/buildr/ide/eclipse.rb
Sending        spec/eclipse_spec.rb
Transmitting file data ..
Committed revision 688192.


> eclipse task should not check for directory existence
> -----------------------------------------------------
>
>                 Key: BUILDR-122
>                 URL: https://issues.apache.org/jira/browse/BUILDR-122
>             Project: Buildr
>          Issue Type: Bug
>          Components: IDE
>    Affects Versions: 1.3.3
>         Environment: buildr trunk revision 682463
>            Reporter: Lacton
>            Priority: Minor
>             Fix For: 1.3.3
>
>         Attachments: BUILDR-122.spec.patch
>
>
> The eclipse task checks for source directories' existence when generating the .classpath file. Source folders that get generated later (e.g., during the build) are missing from the .classpath file.
> Proposed fix: remove the two "if File.exist? project.path_to(path)" lines in the FileTask for '.classpath' in eclipse.rb.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-122) eclipse task should not check for directory existence

Posted by "Alex Boisvert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12619735#action_12619735 ] 

Alex Boisvert commented on BUILDR-122:
--------------------------------------

The "if File.exist?" condition is currently there for a reason.   Some projects don't have any source folders but since Buildr reports one by default, we don't add those to the Eclipse project to avoid unnecessary warnings.

Should Buildr report a source directory even if a project doesn't have one?

> eclipse task should not check for directory existence
> -----------------------------------------------------
>
>                 Key: BUILDR-122
>                 URL: https://issues.apache.org/jira/browse/BUILDR-122
>             Project: Buildr
>          Issue Type: Bug
>          Components: IDE
>    Affects Versions: 1.3.3
>         Environment: buildr trunk revision 682463
>            Reporter: Lacton
>            Priority: Minor
>
> The eclipse task checks for source directories' existence when generating the .classpath file. Source folders that get generated later (e.g., during the build) are missing from the .classpath file.
> Proposed fix: remove the two "if File.exist? project.path_to(path)" lines in the FileTask for '.classpath' in eclipse.rb.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-122) eclipse task should not check for directory existence

Posted by "Lacton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12624946#action_12624946 ] 

Lacton commented on BUILDR-122:
-------------------------------

Alex,

Have you run into any issues while upgrading your eclipse project?

> eclipse task should not check for directory existence
> -----------------------------------------------------
>
>                 Key: BUILDR-122
>                 URL: https://issues.apache.org/jira/browse/BUILDR-122
>             Project: Buildr
>          Issue Type: Bug
>          Components: IDE
>    Affects Versions: 1.3.3
>         Environment: buildr trunk revision 682463
>            Reporter: Lacton
>            Priority: Minor
>             Fix For: 1.3.3
>
>         Attachments: BUILDR-122.spec.patch
>
>
> The eclipse task checks for source directories' existence when generating the .classpath file. Source folders that get generated later (e.g., during the build) are missing from the .classpath file.
> Proposed fix: remove the two "if File.exist? project.path_to(path)" lines in the FileTask for '.classpath' in eclipse.rb.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-122) eclipse task should not check for directory existence

Posted by "Lacton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12624989#action_12624989 ] 

Lacton commented on BUILDR-122:
-------------------------------

Great, thank you. :)

I applied BUILDR-123's patch just after.

> eclipse task should not check for directory existence
> -----------------------------------------------------
>
>                 Key: BUILDR-122
>                 URL: https://issues.apache.org/jira/browse/BUILDR-122
>             Project: Buildr
>          Issue Type: Bug
>          Components: IDE
>    Affects Versions: 1.3.3
>         Environment: buildr trunk revision 682463
>            Reporter: Lacton
>            Priority: Minor
>             Fix For: 1.3.3
>
>         Attachments: BUILDR-122.spec.patch
>
>
> The eclipse task checks for source directories' existence when generating the .classpath file. Source folders that get generated later (e.g., during the build) are missing from the .classpath file.
> Proposed fix: remove the two "if File.exist? project.path_to(path)" lines in the FileTask for '.classpath' in eclipse.rb.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-122) eclipse task should not check for directory existence

Posted by "Alex Boisvert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12624977#action_12624977 ] 

Alex Boisvert commented on BUILDR-122:
--------------------------------------

I haven't had time to upgrade+test with said project but do not want to hold this up any longer.  I'll apply the patch.

> eclipse task should not check for directory existence
> -----------------------------------------------------
>
>                 Key: BUILDR-122
>                 URL: https://issues.apache.org/jira/browse/BUILDR-122
>             Project: Buildr
>          Issue Type: Bug
>          Components: IDE
>    Affects Versions: 1.3.3
>         Environment: buildr trunk revision 682463
>            Reporter: Lacton
>            Priority: Minor
>             Fix For: 1.3.3
>
>         Attachments: BUILDR-122.spec.patch
>
>
> The eclipse task checks for source directories' existence when generating the .classpath file. Source folders that get generated later (e.g., during the build) are missing from the .classpath file.
> Proposed fix: remove the two "if File.exist? project.path_to(path)" lines in the FileTask for '.classpath' in eclipse.rb.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-122) eclipse task should not check for directory existence

Posted by "Lacton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12619846#action_12619846 ] 

Lacton commented on BUILDR-122:
-------------------------------

What do you mean by "Buildr reports one by default"?

In compile_spec, I read
<code>
  it 'should be empty if no sources in default directory' do
    compile_task.sources.should be_empty
  end
</code>

It seems to me a project without any source folder is reported as such by the compile task.

> Should Buildr report a source directory even if a project doesn't have one?

I think it depends on what we mean by 'having' a source folder. I feel it can mean either that a source folder exists, or that a source folder has been defined by the user in her buildfile.

> eclipse task should not check for directory existence
> -----------------------------------------------------
>
>                 Key: BUILDR-122
>                 URL: https://issues.apache.org/jira/browse/BUILDR-122
>             Project: Buildr
>          Issue Type: Bug
>          Components: IDE
>    Affects Versions: 1.3.3
>         Environment: buildr trunk revision 682463
>            Reporter: Lacton
>            Priority: Minor
>
> The eclipse task checks for source directories' existence when generating the .classpath file. Source folders that get generated later (e.g., during the build) are missing from the .classpath file.
> Proposed fix: remove the two "if File.exist? project.path_to(path)" lines in the FileTask for '.classpath' in eclipse.rb.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.