[ 
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

        

Reply via email to