You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "nicolas de loof (JIRA)" <ji...@codehaus.org> on 2008/04/22 08:56:57 UTC

[jira] Created: (MECLIPSE-440) unit tests depends on local configuration and artifacts in local repository

unit tests depends on local configuration and artifacts in local repository
---------------------------------------------------------------------------

                 Key: MECLIPSE-440
                 URL: http://jira.codehaus.org/browse/MECLIPSE-440
             Project: Maven 2.x Eclipse Plugin
          Issue Type: Task
          Components: Core : Workspace settings
    Affects Versions: 2.5.2
            Reporter: nicolas de loof


My local repository contans -sources.jar for junit and servlet-api.

I then have failing tests :
  testProject13(org.apache.maven.plugin.eclipse.EclipsePluginTest)
  testProject22(org.apache.maven.plugin.eclipse.EclipsePluginTest)
  testProject28(org.apache.maven.plugin.eclipse.EclipsePluginTest)
  testProject29(org.apache.maven.plugin.eclipse.EclipsePluginTest)
  testProject30(org.apache.maven.plugin.eclipse.EclipsePluginTest)
...

All of them fail beacuse the .classpath contains link to the sources archive :

Checking .classpath, line #3 expected:<...servlet-api-2.3.jar"[]/>> but was:<...servlet-api-2.3.jar"[ sourcepath="M2_REPO/javax/servlet/servlet-api/2.3/servlet-api-2.3-sources.jar"]/>>


An option would be to package with the plugin test resource a repository containing fake (0byte) artifacts, and use it as local repo with offline mode set, so that the available artifacts are fully under control.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MECLIPSE-440) unit tests depends on local configuration and artifacts in local repository

Posted by "Barrie Treloar (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MECLIPSE-440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=148149#action_148149 ] 

Barrie Treloar commented on MECLIPSE-440:
-----------------------------------------

Is this still an issue?

EclipsePluginTest does not exist anymore.

The choices are:
* EclipsePluginUnitTest
* EclipsePluginIT

EclipsePluginUnitTest does not contain testProjectXX but EclipsePluginIT does.

EclipsePluginIT does not use local repos but a static one as part of the subversion repository which is copied into target/test-classes/m2repo.

I don't think you will have this problem anymore.
Can you confirm and close if it is ok?

> unit tests depends on local configuration and artifacts in local repository
> ---------------------------------------------------------------------------
>
>                 Key: MECLIPSE-440
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-440
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Task
>          Components: Core : Workspace settings
>    Affects Versions: 2.6
>            Reporter: nicolas de loof
>
> My local repository contans -sources.jar for junit and servlet-api.
> I then have failing tests :
>   testProject13(org.apache.maven.plugin.eclipse.EclipsePluginTest)
>   testProject22(org.apache.maven.plugin.eclipse.EclipsePluginTest)
>   testProject28(org.apache.maven.plugin.eclipse.EclipsePluginTest)
>   testProject29(org.apache.maven.plugin.eclipse.EclipsePluginTest)
>   testProject30(org.apache.maven.plugin.eclipse.EclipsePluginTest)
> ...
> All of them fail beacuse the .classpath contains link to the sources archive :
> Checking .classpath, line #3 expected:<...servlet-api-2.3.jar"[]/>> but was:<...servlet-api-2.3.jar"[ sourcepath="M2_REPO/javax/servlet/servlet-api/2.3/servlet-api-2.3-sources.jar"]/>>
> An option would be to package with the plugin test resource a repository containing fake (0byte) artifacts, and use it as local repo with offline mode set, so that the available artifacts are fully under control.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MECLIPSE-440) unit tests depends on local configuration and artifacts in local repository

Posted by "Arnaud Heritier (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MECLIPSE-440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=148159#action_148159 ] 

Arnaud Heritier commented on MECLIPSE-440:
------------------------------------------

It's always an issue.
For example, in some ITs the classpath generated will depend if you already download sources of dependencies or not.
I'm trying to add the downloadSources=true in all ITs but it's no real solution

> unit tests depends on local configuration and artifacts in local repository
> ---------------------------------------------------------------------------
>
>                 Key: MECLIPSE-440
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-440
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Task
>          Components: Core : Workspace settings
>    Affects Versions: 2.6
>            Reporter: nicolas de loof
>
> My local repository contans -sources.jar for junit and servlet-api.
> I then have failing tests :
>   testProject13(org.apache.maven.plugin.eclipse.EclipsePluginTest)
>   testProject22(org.apache.maven.plugin.eclipse.EclipsePluginTest)
>   testProject28(org.apache.maven.plugin.eclipse.EclipsePluginTest)
>   testProject29(org.apache.maven.plugin.eclipse.EclipsePluginTest)
>   testProject30(org.apache.maven.plugin.eclipse.EclipsePluginTest)
> ...
> All of them fail beacuse the .classpath contains link to the sources archive :
> Checking .classpath, line #3 expected:<...servlet-api-2.3.jar"[]/>> but was:<...servlet-api-2.3.jar"[ sourcepath="M2_REPO/javax/servlet/servlet-api/2.3/servlet-api-2.3-sources.jar"]/>>
> An option would be to package with the plugin test resource a repository containing fake (0byte) artifacts, and use it as local repo with offline mode set, so that the available artifacts are fully under control.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira