You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Scott Carey (JIRA)" <ji...@codehaus.org> on 2011/01/26 19:33:58 UTC

[jira] Created: (MRRESOURCES-53) use of remote resources plugin breaks ability to use test-jar artifacts

use of remote resources plugin breaks ability to use test-jar artifacts
-----------------------------------------------------------------------

                 Key: MRRESOURCES-53
                 URL: http://jira.codehaus.org/browse/MRRESOURCES-53
             Project: Maven 2.x Remote Resources Plugin
          Issue Type: Bug
    Affects Versions: 1.1
            Reporter: Scott Carey
            Priority: Critical
         Attachments: project.zip

I have a dead simple project configuration that breaks if I inherit from org.apache:apache . If I disable the remote resources plugin portion, it works.  

The plugin is trying to resolve a test-jar artifact during the compile phase, but such an artifact does not exist until the test-compile phase.

To reproduce: unpack the project provided.  run 'mvn clean compile'.   that will fail.  test-compile will work.  If you install, then compile will work because it will find the test-jar in the local repo.  You must not have any related snapshot artifacts in the local repo related to this project to reproduce.

If you break the inheritance to the apache parent, it will work.  Or, you can override the usage of the remote resources plugin and disable it to get the project to function.

It seems to work if I assign the plugin to operate in a late phase -- such as prepare-package.  Perhaps all that is required is that the plugin operate in as late a phase as it can by default?  
If it must operate in compile however, it cannot look for dependencies that are not generated until test-compile such as test-jar types.


-- 
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] Issue Comment Edited: (MRRESOURCES-53) use of remote resources plugin breaks ability to use test-jar artifacts

Posted by "Steven Bethard (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MRRESOURCES-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=253719#action_253719 ] 

Steven Bethard edited comment on MRRESOURCES-53 at 2/1/11 8:49 AM:
-------------------------------------------------------------------

I'm pretty confident it's in the {{maven-jar-plugin}} because I can provoke this issue without the remote resources plugin using the {{maven-exec-plugin}} or even just the {{maven-surefire-plugin}}: http://jira.codehaus.org/browse/MEXEC-91.

Both of these issues should probably be merged and assigned to the {{maven-jar-plugin}} but I don't know how to do that. Hopefully a real maven committer will come by some time soon and do that.

      was (Author: steven.bethard):
    I'm not pretty confident it's in the {{maven-jar-plugin}} because I can provoke this issue without the remote resources plugin using the {{maven-exec-plugin}} or even just the {{maven-surefire-plugin}}: http://jira.codehaus.org/browse/MEXEC-91.

Both of these issues should probably be merged and assigned to the {{maven-jar-plugin}} but I don't know how to do that. Hopefully a real maven committer will come by some time soon and do that.
  
> use of remote resources plugin breaks ability to use test-jar artifacts
> -----------------------------------------------------------------------
>
>                 Key: MRRESOURCES-53
>                 URL: http://jira.codehaus.org/browse/MRRESOURCES-53
>             Project: Maven 2.x Remote Resources Plugin
>          Issue Type: Bug
>    Affects Versions: 1.1
>            Reporter: Scott Carey
>            Priority: Critical
>         Attachments: project.zip
>
>
> I have a dead simple project configuration that breaks if I inherit from org.apache:apache . If I disable the remote resources plugin portion, it works.  
> The plugin is trying to resolve a test-jar artifact during the compile phase, but such an artifact does not exist until the test-compile phase.
> To reproduce: unpack the project provided.  run 'mvn clean compile'.   that will fail.  test-compile will work.  If you install, then compile will work because it will find the test-jar in the local repo.  You must not have any related snapshot artifacts in the local repo related to this project to reproduce.
> If you break the inheritance to the apache parent, it will work.  Or, you can override the usage of the remote resources plugin and disable it to get the project to function.
> It seems to work if I assign the plugin to operate in a late phase -- such as prepare-package.  Perhaps all that is required is that the plugin operate in as late a phase as it can by default?  
> If it must operate in compile however, it cannot look for dependencies that are not generated until test-compile such as test-jar types.

-- 
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: (MRRESOURCES-53) use of remote resources plugin breaks ability to use test-jar artifacts

Posted by "Scott Carey (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MRRESOURCES-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=253535#action_253535 ] 

Scott Carey commented on MRRESOURCES-53:
----------------------------------------

I can confirm that changing the configuration to:

{code:xml}
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-remote-resources-plugin</artifactId>
        <version>1.1</version>
        <goals>
          <goal>process</goal>
        </goals>
        <configuration>
          <resourceBundles>
            <resourceBundle>org.apache:apache-jar-resource-bundle:1.4</resourceBundle>
          </resourceBundles>
        </configuration>
      </plugin>
{code}

avoids the problem. 

I can override the parent's execution and replace it like so, and this works:

{code:xml}
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-remote-resources-plugin</artifactId>
        <version>1.1</version>
        <executions>
          <execution>
            <phase>none</phase>
          </execution>
        </executions>
        <goals>
          <goal>process</goal>
        </goals>
        <configuration>
          <resourceBundles>
            <resourceBundle>org.apache:apache-jar-resource-bundle:1.4</resourceBundle>
          </resourceBundles>
        </configuration>
      </plugin>
{code}

That is one tricky bug to work around.  I'm lucky I only need one execution. Any idea if it is in the remote resources plugin or somewhere else?  


> use of remote resources plugin breaks ability to use test-jar artifacts
> -----------------------------------------------------------------------
>
>                 Key: MRRESOURCES-53
>                 URL: http://jira.codehaus.org/browse/MRRESOURCES-53
>             Project: Maven 2.x Remote Resources Plugin
>          Issue Type: Bug
>    Affects Versions: 1.1
>            Reporter: Scott Carey
>            Priority: Critical
>         Attachments: project.zip
>
>
> I have a dead simple project configuration that breaks if I inherit from org.apache:apache . If I disable the remote resources plugin portion, it works.  
> The plugin is trying to resolve a test-jar artifact during the compile phase, but such an artifact does not exist until the test-compile phase.
> To reproduce: unpack the project provided.  run 'mvn clean compile'.   that will fail.  test-compile will work.  If you install, then compile will work because it will find the test-jar in the local repo.  You must not have any related snapshot artifacts in the local repo related to this project to reproduce.
> If you break the inheritance to the apache parent, it will work.  Or, you can override the usage of the remote resources plugin and disable it to get the project to function.
> It seems to work if I assign the plugin to operate in a late phase -- such as prepare-package.  Perhaps all that is required is that the plugin operate in as late a phase as it can by default?  
> If it must operate in compile however, it cannot look for dependencies that are not generated until test-compile such as test-jar types.

-- 
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] (MRRESOURCES-53) use of remote resources plugin breaks ability to use test-jar artifacts

Posted by "Scott Carey (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRRESOURCES-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=288065#comment-288065 ] 

Scott Carey commented on MRRESOURCES-53:
----------------------------------------

The maven-remote-resources-plugin is pulling test artifacts from 'mvn clean compile'.  I don't know why.

bq. But what are you trying to do?

The same thing you are trying to do.
Use the Apache parent project at the top level parent.  This adds license info to make an Apache compliant release jar.
http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-remote-resources-plugin/1.2.1/maven-remote-resources-plugin-1.2.1.pom
parent ->
http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-plugins/19/maven-plugins-19.pom
parent ->
http://repo1.maven.org/maven2/org/apache/maven/maven-parent/19/maven-parent-19.pom
parent ->
http://repo1.maven.org/maven2/org/apache/apache/9/apache-9.pom

apache's parent pom uses the maven-remote-resources-plugin.  This breaks any build that uses test-jar artifacts.
I don't know enough to point blame at the plugin or the parent pom.

This is the common bit to Apache Avro, and Apache Maven via Apache's parent that breaks projects that use test-jar artifacts and try to 'mvn clean compile':

{code:xml}<!-- We want to package up license resources in the JARs produced -->
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-remote-resources-plugin</artifactId>
  <executions>
    <execution>
      <goals>
        <goal>process</goal>
      </goals>
      <configuration>
        <resourceBundles>
          <resourceBundle>org.apache:apache-jar-resource-bundle:1.4</resourceBundle>
        </resourceBundles>
      </configuration>
    </execution>
  </executions>
</plugin>{code}

As noted before, if this is changed to  set the configuration at the plugin level rather than inside executions, it works fine.  That is what makes me feel like this is a bug in the plugin or how maven works in general.  I am not sure what the expected difference in behavior is expected to be other than how it works with command-line usage.


                
> use of remote resources plugin breaks ability to use test-jar artifacts
> -----------------------------------------------------------------------
>
>                 Key: MRRESOURCES-53
>                 URL: https://jira.codehaus.org/browse/MRRESOURCES-53
>             Project: Maven 2.x Remote Resources Plugin
>          Issue Type: Bug
>    Affects Versions: 1.1
>            Reporter: Scott Carey
>            Priority: Critical
>         Attachments: project.zip
>
>
> I have a dead simple project configuration that breaks if I inherit from org.apache:apache . If I disable the remote resources plugin portion, it works.  
> The plugin is trying to resolve a test-jar artifact during the compile phase, but such an artifact does not exist until the test-compile phase.
> To reproduce: unpack the project provided.  run 'mvn clean compile'.   that will fail.  test-compile will work.  If you install, then compile will work because it will find the test-jar in the local repo.  You must not have any related snapshot artifacts in the local repo related to this project to reproduce.
> If you break the inheritance to the apache parent, it will work.  Or, you can override the usage of the remote resources plugin and disable it to get the project to function.
> It seems to work if I assign the plugin to operate in a late phase -- such as prepare-package.  Perhaps all that is required is that the plugin operate in as late a phase as it can by default?  
> If it must operate in compile however, it cannot look for dependencies that are not generated until test-compile such as test-jar types.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRRESOURCES-53) use of remote resources plugin breaks ability to use test-jar artifacts

Posted by "Scott Carey (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRRESOURCES-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=287975#comment-287975 ] 

Scott Carey commented on MRRESOURCES-53:
----------------------------------------

I can confirm that it still fails if updated to use version 10 of the apache parent.

It fails if maven-jar-plugin is updated to 2.3.2

It fails if maven-resources-plugin is updated to 2.5

It fails if the maven-remote-resources-plugin is version 1.1, with the execution override (to none) missing so that it executes.

It fails if using maven-remote-resources-plugin 1.2.1

It succeeds if the maven-remote-resources-plugin is explicitly disabled (execution -> none).
I have not re-validated that moving the resource bundle configuration from inside the execution to plugin global scope fixes it (my comments from Jan 26 and 30 2011)


                
> use of remote resources plugin breaks ability to use test-jar artifacts
> -----------------------------------------------------------------------
>
>                 Key: MRRESOURCES-53
>                 URL: https://jira.codehaus.org/browse/MRRESOURCES-53
>             Project: Maven 2.x Remote Resources Plugin
>          Issue Type: Bug
>    Affects Versions: 1.1
>            Reporter: Scott Carey
>            Priority: Critical
>         Attachments: project.zip
>
>
> I have a dead simple project configuration that breaks if I inherit from org.apache:apache . If I disable the remote resources plugin portion, it works.  
> The plugin is trying to resolve a test-jar artifact during the compile phase, but such an artifact does not exist until the test-compile phase.
> To reproduce: unpack the project provided.  run 'mvn clean compile'.   that will fail.  test-compile will work.  If you install, then compile will work because it will find the test-jar in the local repo.  You must not have any related snapshot artifacts in the local repo related to this project to reproduce.
> If you break the inheritance to the apache parent, it will work.  Or, you can override the usage of the remote resources plugin and disable it to get the project to function.
> It seems to work if I assign the plugin to operate in a late phase -- such as prepare-package.  Perhaps all that is required is that the plugin operate in as late a phase as it can by default?  
> If it must operate in compile however, it cannot look for dependencies that are not generated until test-compile such as test-jar types.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRRESOURCES-53) use of remote resources plugin breaks ability to use test-jar artifacts

Posted by "Scott Carey (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRRESOURCES-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=287974#comment-287974 ] 

Scott Carey commented on MRRESOURCES-53:
----------------------------------------

In the base pom.xml:

{quote}
<!-- if this override is set, the project builds, if it is
         commented out, it fails. -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-remote-resources-plugin</artifactId>
        <version>1.1</version>
        <executions>
          <execution>
            <phase>none</phase>
            <goals>
              <goal>process</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
{quote}

It works 'out of the box' because that section is not commented out.  I just tested it and it works in maven 3.0.1, 3.0.2, and 3.0.3.

It does NOT work if you comment out that version override and inherit it all from the parent.  It breaks with maven 3.0.1, 3.0.2, and 3.0.3.

There is still a bug, though I have not tried updating all the version references to the latest.

'mvn versions:display-plugin-updates' prints out:
[INFO] The following plugin updates are available:
[INFO]   maven-jar-plugin ..................................... 2.3.1 -> 2.3.2
[INFO]   maven-remote-resources-plugin .......................... 1.1 -> 1.2.1
[INFO]   maven-resources-plugin ................................. 2.4.3 -> 2.5

and the apache parent has been revved from version 8 to 10.



                
> use of remote resources plugin breaks ability to use test-jar artifacts
> -----------------------------------------------------------------------
>
>                 Key: MRRESOURCES-53
>                 URL: https://jira.codehaus.org/browse/MRRESOURCES-53
>             Project: Maven 2.x Remote Resources Plugin
>          Issue Type: Bug
>    Affects Versions: 1.1
>            Reporter: Scott Carey
>            Priority: Critical
>         Attachments: project.zip
>
>
> I have a dead simple project configuration that breaks if I inherit from org.apache:apache . If I disable the remote resources plugin portion, it works.  
> The plugin is trying to resolve a test-jar artifact during the compile phase, but such an artifact does not exist until the test-compile phase.
> To reproduce: unpack the project provided.  run 'mvn clean compile'.   that will fail.  test-compile will work.  If you install, then compile will work because it will find the test-jar in the local repo.  You must not have any related snapshot artifacts in the local repo related to this project to reproduce.
> If you break the inheritance to the apache parent, it will work.  Or, you can override the usage of the remote resources plugin and disable it to get the project to function.
> It seems to work if I assign the plugin to operate in a late phase -- such as prepare-package.  Perhaps all that is required is that the plugin operate in as late a phase as it can by default?  
> If it must operate in compile however, it cannot look for dependencies that are not generated until test-compile such as test-jar types.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRRESOURCES-53) use of remote resources plugin breaks ability to use test-jar artifacts

Posted by "Robert Scholte (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRRESOURCES-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=287955#comment-287955 ] 

Robert Scholte commented on MRRESOURCES-53:
-------------------------------------------

Is this still a problem with maven-reomote-resources-1.2.1?
I tried the project with Maven 3 and had no problem to run {{mvn clean compile}}, so is this example-project still valid to reproduce the issue?

                
> use of remote resources plugin breaks ability to use test-jar artifacts
> -----------------------------------------------------------------------
>
>                 Key: MRRESOURCES-53
>                 URL: https://jira.codehaus.org/browse/MRRESOURCES-53
>             Project: Maven 2.x Remote Resources Plugin
>          Issue Type: Bug
>    Affects Versions: 1.1
>            Reporter: Scott Carey
>            Priority: Critical
>         Attachments: project.zip
>
>
> I have a dead simple project configuration that breaks if I inherit from org.apache:apache . If I disable the remote resources plugin portion, it works.  
> The plugin is trying to resolve a test-jar artifact during the compile phase, but such an artifact does not exist until the test-compile phase.
> To reproduce: unpack the project provided.  run 'mvn clean compile'.   that will fail.  test-compile will work.  If you install, then compile will work because it will find the test-jar in the local repo.  You must not have any related snapshot artifacts in the local repo related to this project to reproduce.
> If you break the inheritance to the apache parent, it will work.  Or, you can override the usage of the remote resources plugin and disable it to get the project to function.
> It seems to work if I assign the plugin to operate in a late phase -- such as prepare-package.  Perhaps all that is required is that the plugin operate in as late a phase as it can by default?  
> If it must operate in compile however, it cannot look for dependencies that are not generated until test-compile such as test-jar types.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MRRESOURCES-53) use of remote resources plugin breaks ability to use test-jar artifacts

Posted by "Scott Carey (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MRRESOURCES-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=253041#action_253041 ] 

Scott Carey commented on MRRESOURCES-53:
----------------------------------------

Upon further reflection, pushing this to a later phase won't work.  Since it is currently designed to create resources prior to the process-resources phase, it cannot attempt to resolve any artifacts generated in the current reactor.  

It could instead be re-designed to execute during prepare-package, but that would essentially be a completely different plugin.

Fixing one of two things should do it:
* Do not resolve items that will be built in this reactor, including test-jars.
* Do not resolve any items in test scope.


Any suggestions for a viable workaround to the problem are welcome as well.


> use of remote resources plugin breaks ability to use test-jar artifacts
> -----------------------------------------------------------------------
>
>                 Key: MRRESOURCES-53
>                 URL: http://jira.codehaus.org/browse/MRRESOURCES-53
>             Project: Maven 2.x Remote Resources Plugin
>          Issue Type: Bug
>    Affects Versions: 1.1
>            Reporter: Scott Carey
>            Priority: Critical
>         Attachments: project.zip
>
>
> I have a dead simple project configuration that breaks if I inherit from org.apache:apache . If I disable the remote resources plugin portion, it works.  
> The plugin is trying to resolve a test-jar artifact during the compile phase, but such an artifact does not exist until the test-compile phase.
> To reproduce: unpack the project provided.  run 'mvn clean compile'.   that will fail.  test-compile will work.  If you install, then compile will work because it will find the test-jar in the local repo.  You must not have any related snapshot artifacts in the local repo related to this project to reproduce.
> If you break the inheritance to the apache parent, it will work.  Or, you can override the usage of the remote resources plugin and disable it to get the project to function.
> It seems to work if I assign the plugin to operate in a late phase -- such as prepare-package.  Perhaps all that is required is that the plugin operate in as late a phase as it can by default?  
> If it must operate in compile however, it cannot look for dependencies that are not generated until test-compile such as test-jar types.

-- 
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] (MRRESOURCES-53) use of remote resources plugin breaks ability to use test-jar artifacts

Posted by "Robert Scholte (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRRESOURCES-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=288052#comment-288052 ] 

Robert Scholte commented on MRRESOURCES-53:
-------------------------------------------

{noformat}
[INFO] --- maven-remote-resources-plugin:1.2.1:process (default) @ avro-ipc ---
Downloading: http://repository.apache.org/snapshots/org/apache/avro/avro/1.5.0-SNAPSHOT/avro-1.5.0-SNAPSHOT-tests.jar
{noformat}
Of cource this won't work. 

But what are you trying to do? My guess is you're using the maven-remote-resource-plugin for the wrong reason.
                
> use of remote resources plugin breaks ability to use test-jar artifacts
> -----------------------------------------------------------------------
>
>                 Key: MRRESOURCES-53
>                 URL: https://jira.codehaus.org/browse/MRRESOURCES-53
>             Project: Maven 2.x Remote Resources Plugin
>          Issue Type: Bug
>    Affects Versions: 1.1
>            Reporter: Scott Carey
>            Priority: Critical
>         Attachments: project.zip
>
>
> I have a dead simple project configuration that breaks if I inherit from org.apache:apache . If I disable the remote resources plugin portion, it works.  
> The plugin is trying to resolve a test-jar artifact during the compile phase, but such an artifact does not exist until the test-compile phase.
> To reproduce: unpack the project provided.  run 'mvn clean compile'.   that will fail.  test-compile will work.  If you install, then compile will work because it will find the test-jar in the local repo.  You must not have any related snapshot artifacts in the local repo related to this project to reproduce.
> If you break the inheritance to the apache parent, it will work.  Or, you can override the usage of the remote resources plugin and disable it to get the project to function.
> It seems to work if I assign the plugin to operate in a late phase -- such as prepare-package.  Perhaps all that is required is that the plugin operate in as late a phase as it can by default?  
> If it must operate in compile however, it cannot look for dependencies that are not generated until test-compile such as test-jar types.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRRESOURCES-53) use of remote resources plugin breaks ability to use test-jar artifacts

Posted by "Scott Carey (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRRESOURCES-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=288066#comment-288066 ] 

Scott Carey commented on MRRESOURCES-53:
----------------------------------------

My question is why does the configuration above try and download the test-jar artifact?  The configuration is to download org.apache:apache-jar-resource-bundle:1.4, not the project's test-jar artifact.  

Has the comment from last february by Benjamin Bentmann been addressed?
{quote}
The issue is not in the maven-jar-plugin. The maven-remote-resources-plugin explicitly resolves the test classpath of the project (ProcessRemoteResourcesMojo.java:697) which naturally fails when the test classes haven't even compiled.
{quote}  
                
> use of remote resources plugin breaks ability to use test-jar artifacts
> -----------------------------------------------------------------------
>
>                 Key: MRRESOURCES-53
>                 URL: https://jira.codehaus.org/browse/MRRESOURCES-53
>             Project: Maven 2.x Remote Resources Plugin
>          Issue Type: Bug
>    Affects Versions: 1.1
>            Reporter: Scott Carey
>            Priority: Critical
>         Attachments: project.zip
>
>
> I have a dead simple project configuration that breaks if I inherit from org.apache:apache . If I disable the remote resources plugin portion, it works.  
> The plugin is trying to resolve a test-jar artifact during the compile phase, but such an artifact does not exist until the test-compile phase.
> To reproduce: unpack the project provided.  run 'mvn clean compile'.   that will fail.  test-compile will work.  If you install, then compile will work because it will find the test-jar in the local repo.  You must not have any related snapshot artifacts in the local repo related to this project to reproduce.
> If you break the inheritance to the apache parent, it will work.  Or, you can override the usage of the remote resources plugin and disable it to get the project to function.
> It seems to work if I assign the plugin to operate in a late phase -- such as prepare-package.  Perhaps all that is required is that the plugin operate in as late a phase as it can by default?  
> If it must operate in compile however, it cannot look for dependencies that are not generated until test-compile such as test-jar types.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MRRESOURCES-53) use of remote resources plugin breaks ability to use test-jar artifacts

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MRRESOURCES-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=253731#action_253731 ] 

Benjamin Bentmann commented on MRRESOURCES-53:
----------------------------------------------

The issue is not in the {{maven-jar-plugin}}. The {{maven-remote-resources-plugin}} explicitly resolves the test classpath of the project ({{ProcessRemoteResourcesMojo.java:697}}) which naturally fails when the test classes haven't even compiled.

> use of remote resources plugin breaks ability to use test-jar artifacts
> -----------------------------------------------------------------------
>
>                 Key: MRRESOURCES-53
>                 URL: http://jira.codehaus.org/browse/MRRESOURCES-53
>             Project: Maven 2.x Remote Resources Plugin
>          Issue Type: Bug
>    Affects Versions: 1.1
>            Reporter: Scott Carey
>            Priority: Critical
>         Attachments: project.zip
>
>
> I have a dead simple project configuration that breaks if I inherit from org.apache:apache . If I disable the remote resources plugin portion, it works.  
> The plugin is trying to resolve a test-jar artifact during the compile phase, but such an artifact does not exist until the test-compile phase.
> To reproduce: unpack the project provided.  run 'mvn clean compile'.   that will fail.  test-compile will work.  If you install, then compile will work because it will find the test-jar in the local repo.  You must not have any related snapshot artifacts in the local repo related to this project to reproduce.
> If you break the inheritance to the apache parent, it will work.  Or, you can override the usage of the remote resources plugin and disable it to get the project to function.
> It seems to work if I assign the plugin to operate in a late phase -- such as prepare-package.  Perhaps all that is required is that the plugin operate in as late a phase as it can by default?  
> If it must operate in compile however, it cannot look for dependencies that are not generated until test-compile such as test-jar types.

-- 
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: (MRRESOURCES-53) use of remote resources plugin breaks ability to use test-jar artifacts

Posted by "Scott Carey (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MRRESOURCES-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=253056#action_253056 ] 

Scott Carey commented on MRRESOURCES-53:
----------------------------------------

Other details:  
I tested with Maven 3.0.1.
I can reproduce without the apache parent pom if I configure remote-resources in the example parent pom the same way that the apache parent does:

{code:xml}
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-remote-resources-plugin</artifactId>
        <version>1.1</version>
        <executions>
          <execution>
            <goals>
              <goal>process</goal>
            </goals>
            <configuration>
              <resourceBundles>
                <resourceBundle>org.apache:apache-jar-resource-bundle:1.4</resourceBundle>
              </resourceBundles>
            </configuration>
          </execution>
        </executions>
      </plugin>
{code}

> use of remote resources plugin breaks ability to use test-jar artifacts
> -----------------------------------------------------------------------
>
>                 Key: MRRESOURCES-53
>                 URL: http://jira.codehaus.org/browse/MRRESOURCES-53
>             Project: Maven 2.x Remote Resources Plugin
>          Issue Type: Bug
>    Affects Versions: 1.1
>            Reporter: Scott Carey
>            Priority: Critical
>         Attachments: project.zip
>
>
> I have a dead simple project configuration that breaks if I inherit from org.apache:apache . If I disable the remote resources plugin portion, it works.  
> The plugin is trying to resolve a test-jar artifact during the compile phase, but such an artifact does not exist until the test-compile phase.
> To reproduce: unpack the project provided.  run 'mvn clean compile'.   that will fail.  test-compile will work.  If you install, then compile will work because it will find the test-jar in the local repo.  You must not have any related snapshot artifacts in the local repo related to this project to reproduce.
> If you break the inheritance to the apache parent, it will work.  Or, you can override the usage of the remote resources plugin and disable it to get the project to function.
> It seems to work if I assign the plugin to operate in a late phase -- such as prepare-package.  Perhaps all that is required is that the plugin operate in as late a phase as it can by default?  
> If it must operate in compile however, it cannot look for dependencies that are not generated until test-compile such as test-jar types.

-- 
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: (MRRESOURCES-53) use of remote resources plugin breaks ability to use test-jar artifacts

Posted by "Steven Bethard (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MRRESOURCES-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=253534#action_253534 ] 

Steven Bethard commented on MRRESOURCES-53:
-------------------------------------------

I wonder if the issue is that {{{test-jar}}} doesn't work right when things are added as {{{<executions>}}}? That seems to be the one common thing between this report, and http://jira.codehaus.org/browse/MEXEC-91.

> use of remote resources plugin breaks ability to use test-jar artifacts
> -----------------------------------------------------------------------
>
>                 Key: MRRESOURCES-53
>                 URL: http://jira.codehaus.org/browse/MRRESOURCES-53
>             Project: Maven 2.x Remote Resources Plugin
>          Issue Type: Bug
>    Affects Versions: 1.1
>            Reporter: Scott Carey
>            Priority: Critical
>         Attachments: project.zip
>
>
> I have a dead simple project configuration that breaks if I inherit from org.apache:apache . If I disable the remote resources plugin portion, it works.  
> The plugin is trying to resolve a test-jar artifact during the compile phase, but such an artifact does not exist until the test-compile phase.
> To reproduce: unpack the project provided.  run 'mvn clean compile'.   that will fail.  test-compile will work.  If you install, then compile will work because it will find the test-jar in the local repo.  You must not have any related snapshot artifacts in the local repo related to this project to reproduce.
> If you break the inheritance to the apache parent, it will work.  Or, you can override the usage of the remote resources plugin and disable it to get the project to function.
> It seems to work if I assign the plugin to operate in a late phase -- such as prepare-package.  Perhaps all that is required is that the plugin operate in as late a phase as it can by default?  
> If it must operate in compile however, it cannot look for dependencies that are not generated until test-compile such as test-jar types.

-- 
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] Issue Comment Edited: (MRRESOURCES-53) use of remote resources plugin breaks ability to use test-jar artifacts

Posted by "Steven Bethard (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MRRESOURCES-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=253534#action_253534 ] 

Steven Bethard edited comment on MRRESOURCES-53 at 1/30/11 6:51 PM:
--------------------------------------------------------------------

I wonder if the issue is that {{test-jar}} doesn't work right when things are added as {{<executions>}}? That seems to be the one common thing between this report, and http://jira.codehaus.org/browse/MEXEC-91.

      was (Author: steven.bethard):
    I wonder if the issue is that {{{test-jar}}} doesn't work right when things are added as {{{<executions>}}}? That seems to be the one common thing between this report, and http://jira.codehaus.org/browse/MEXEC-91.
  
> use of remote resources plugin breaks ability to use test-jar artifacts
> -----------------------------------------------------------------------
>
>                 Key: MRRESOURCES-53
>                 URL: http://jira.codehaus.org/browse/MRRESOURCES-53
>             Project: Maven 2.x Remote Resources Plugin
>          Issue Type: Bug
>    Affects Versions: 1.1
>            Reporter: Scott Carey
>            Priority: Critical
>         Attachments: project.zip
>
>
> I have a dead simple project configuration that breaks if I inherit from org.apache:apache . If I disable the remote resources plugin portion, it works.  
> The plugin is trying to resolve a test-jar artifact during the compile phase, but such an artifact does not exist until the test-compile phase.
> To reproduce: unpack the project provided.  run 'mvn clean compile'.   that will fail.  test-compile will work.  If you install, then compile will work because it will find the test-jar in the local repo.  You must not have any related snapshot artifacts in the local repo related to this project to reproduce.
> If you break the inheritance to the apache parent, it will work.  Or, you can override the usage of the remote resources plugin and disable it to get the project to function.
> It seems to work if I assign the plugin to operate in a late phase -- such as prepare-package.  Perhaps all that is required is that the plugin operate in as late a phase as it can by default?  
> If it must operate in compile however, it cannot look for dependencies that are not generated until test-compile such as test-jar types.

-- 
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: (MRRESOURCES-53) use of remote resources plugin breaks ability to use test-jar artifacts

Posted by "Steven Bethard (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MRRESOURCES-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=253719#action_253719 ] 

Steven Bethard commented on MRRESOURCES-53:
-------------------------------------------

I'm not pretty confident it's in the {{maven-jar-plugin}} because I can provoke this issue without the remote resources plugin using the {{maven-exec-plugin}} or even just the {{maven-surefire-plugin}}: http://jira.codehaus.org/browse/MEXEC-91.

Both of these issues should probably be merged and assigned to the {{maven-jar-plugin}} but I don't know how to do that. Hopefully a real maven committer will come by some time soon and do that.

> use of remote resources plugin breaks ability to use test-jar artifacts
> -----------------------------------------------------------------------
>
>                 Key: MRRESOURCES-53
>                 URL: http://jira.codehaus.org/browse/MRRESOURCES-53
>             Project: Maven 2.x Remote Resources Plugin
>          Issue Type: Bug
>    Affects Versions: 1.1
>            Reporter: Scott Carey
>            Priority: Critical
>         Attachments: project.zip
>
>
> I have a dead simple project configuration that breaks if I inherit from org.apache:apache . If I disable the remote resources plugin portion, it works.  
> The plugin is trying to resolve a test-jar artifact during the compile phase, but such an artifact does not exist until the test-compile phase.
> To reproduce: unpack the project provided.  run 'mvn clean compile'.   that will fail.  test-compile will work.  If you install, then compile will work because it will find the test-jar in the local repo.  You must not have any related snapshot artifacts in the local repo related to this project to reproduce.
> If you break the inheritance to the apache parent, it will work.  Or, you can override the usage of the remote resources plugin and disable it to get the project to function.
> It seems to work if I assign the plugin to operate in a late phase -- such as prepare-package.  Perhaps all that is required is that the plugin operate in as late a phase as it can by default?  
> If it must operate in compile however, it cannot look for dependencies that are not generated until test-compile such as test-jar types.

-- 
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