GithubHelp home page GithubHelp logo

Comments (7)

mickaelistria avatar mickaelistria commented on June 10, 2024

I'm surprised you only notice it now. I thought your whole plans were build around this feature and the fact that .classpath was actually containing info to do "test" scope dependency resolution.
How do you want to see it supported specifically? I'm not sure anything is needed beyond everything we already discussed (eg building a kind of "test" scope and dependency resolution result that takes into account the .classpath content to be used by compilation and surefire execution)?

from tycho.

laeubi avatar laeubi commented on June 10, 2024

I only was aware about test source-folder and newer saw this before and just found that eclipse already supports this while trying to prepare an enhancement request for JDT ;-)

How do you want to see it supported specifically? I'm not sure anything is needed beyond everything we already discussed (eg building a kind of "test" scope and dependency resolution result that takes into account the .classpath content to be used by compilation and surefire execution)?

If it can be done easily later on I won't complain 👍 at least currently only source-folder are checked for the test attributes and the same needs to happen for classpath-container accordingly

So what I would expect would be the following:

  • I have a project with a plain source folder and a test folder
  • I have a plain classpathcontainer and this is available to the compile and test-compile mojo
  • I have a "test" classpathcontainer that is only available to the test-compile mojo but not to the compile-mojo

from tycho.

laeubi avatar laeubi commented on June 10, 2024

A source of confusion might be that "source-folders" are also stored in the .classpath-file.... (they are called classpathentries there).

So yes my plans are build around that feature but I have not noticed until now that "con" can have generic test attribute as well as "src" types.

from tycho.

mickaelistria avatar mickaelistria commented on June 10, 2024

I have a "test" classpathcontainer that is only available to the test-compile mojo but not to the compile-mojo

More specifically, do I get right that what you want at the moment is to have the JUnit container ( #49 ) annotated as tests in .classpath, and thus the Tycho JUnit requirements added to the compiler classpath and tycho-surefire-plugin target?

from tycho.

laeubi avatar laeubi commented on June 10, 2024

Actually this needs to be added to the "test-compile" classpath, only just like in maven where I have a scope of "test" versus "compile". tycho-surefire-plugin would mostly using test+compile scopes.

At the moment JUNIT containers are added as "default" classpathcontainers but I created https://bugs.eclipse.org/bugs/show_bug.cgi?id=572820 to make it more visible that these are also possible as "test" container.

I also think this is more to prevent users from accidentally using test-dependecies in regular code for the compile part so the compiler complains about missing references.

So another task would probably for to change in "computeclasspath" to distinguish between both class spaces.

from tycho.

akurtakov avatar akurtakov commented on June 10, 2024

Is this one fixed now? If not what is still pending here?

from tycho.

laeubi avatar laeubi commented on June 10, 2024

This is not fixed yet, actually there is only limited support for test dependencies but sources are still compiled regardless of the classpath scope if I remember correctly.

from tycho.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.