[ 
http://jira.codehaus.org/browse/MSOURCES-19?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_107279
 ] 

werner mueller commented on MSOURCES-19:
----------------------------------------

hallo

indeed something like that is going on.

when bound to install:
 - execution ov mvn install will create the source jars, but will not install 
them into the local repository
 - exection of mvn deploy will install and deploy the source jars into the 
repositories

when bound to deploy:
 - execution of mvn install will not install the sources jars into local 
repository
 - execution of mvn deploy does the same (no copy into local nor remote 
repository)

so the theroy seems proven to me


maybe some comparison to the jar plugin can help?
        <plugin>
                <!-- export the test-classes for further use in other modules 
-->
                <!-- see: 
http://maven.apache.org/guides/mini/guide-attached-tests.html -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                        <execution>
                                <goals>
                                        <goal>test-jar</goal>
                                </goals>
                        </execution>
                </executions>
        </plugin>

the test jar always ends up in the repositories. but i dont know much about the 
internals.... could be anything.

i am no fan of manually deploy the file since in future this is done by some 
automatic job/CI server.
or do you mean to configure the deploy plugin to deploy the sources jar from 
the target folder?


> source plugin with phase 'package' does not upload sources.jar into repository
> ------------------------------------------------------------------------------
>
>                 Key: MSOURCES-19
>                 URL: http://jira.codehaus.org/browse/MSOURCES-19
>             Project: Maven 2.x Source Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0.3
>         Environment: windows
>            Reporter: werner mueller
>            Assignee: Stephane Nicoll
>
> hallo
> when using the source plugin with phase install:
>     <plugin>
>         <artifactId>maven-source-plugin</artifactId>
>                 <configuration>
>                     <attach>true</attach>
>                 </configuration>
>                               <executions>
>                                       <execution>
>                                               <phase>install</phase>
>                                               <goals>
>                                                       <goal>jar</goal>
>                                                       <goal>test-jar</goal>
>                                               </goals>
>                                       </execution>
>                               </executions>
>                       </plugin>
> the generated sources are uploaded into the snapshot repository just fine 
> (when i execute 'mvn deploy')
> when the phase is changed to deploy:
>       <plugin>
>               <artifactId>maven-source-plugin</artifactId>
>                 <configuration>
>                     <attach>true</attach>
>                 </configuration>
>                               <executions>
>                                       <execution>
>                                               <phase>deploy</phase>
>                                               <goals>
>                                                       <goal>jar</goal>
>                                                       <goal>test-jar</goal>
>                                               </goals>
>                                       </execution>
>                               </executions>
>                       </plugin>
> the sources jars are created but not copied into the local repository nor 
> uploaded into the snapshot repository.
> i would like to create source jar's in a later phase than install because in 
> eclipse/m2eclipse an install would take too long since it creates the sources 
> jar every time.

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

        

Reply via email to