You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "werner mueller (JIRA)" <ji...@codehaus.org> on 2007/07/11 11:22:13 UTC

[jira] Created: (MSOURCES-19) source plugin with phase 'package' does not upload sources.jar into repository

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


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

        

[jira] Commented: (MSOURCES-19) source plugin with phase 'package' does not upload sources.jar into repository

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSOURCES-19?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_111691 ] 

Dennis Lundberg commented on MSOURCES-19:
-----------------------------------------

Why do you want to change the phase that maven-source-plugin is run in?

The default phase is package, which seems natural to me. You are packaging your artifacts.

> 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

        

[jira] Commented: (MSOURCES-19) source plugin with phase 'package' does not upload sources.jar into repository

Posted by "Prasad Kashyap (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSOURCES-19?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_107248 ] 

Prasad Kashyap commented on MSOURCES-19:
----------------------------------------

This is what I think is happening. 

The source plugin is used to generate the sources jar.  So when  it is bound to any phase (install or deploy), it seems to be correctly generating the sources in that phase. 

However, when bound to "install" phase, it seems to be executing before the jars are installed in the local repo. So it gets installed. 

But when bound to the "deploy" phase, it seems to be executing after the jars are deployed to the remote repo. So it does not get deployed.

Please verify this theory.

> 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

        

[jira] Reopened: (MSOURCES-19) source plugin with phase 'package' does not upload sources.jar into repository

Posted by "werner mueller (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MSOURCES-19?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

werner mueller reopened MSOURCES-19:
------------------------------------


hallo

thanks for the reply :)

but i dont agree: when i bind the plugin to phase 'deploy' and i execute 'mvn deploy' i would expect the sources.jar to be deployed in the repositories. which is not the case (my second config above).

of course when the plugin is bound to phase deploy an execution of 'mvn install' would not do the job. but thats what i intend to do.

or whats wrong using phase 'deploy' with this plugin?

> 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

        

[jira] Closed: (MSOURCES-19) source plugin with phase 'package' does not upload sources.jar into repository

Posted by "Stephane Nicoll (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MSOURCES-19?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stephane Nicoll closed MSOURCES-19.
-----------------------------------

    Resolution: Won't Fix

Agreed.

> 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

        

[jira] Commented: (MSOURCES-19) source plugin with phase 'package' does not upload sources.jar into repository

Posted by "werner mueller (JIRA)" <ji...@codehaus.org>.
    [ 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

        

[jira] Closed: (MSOURCES-19) source plugin with phase 'package' does not upload sources.jar into repository

Posted by "Stephane Nicoll (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MSOURCES-19?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stephane Nicoll closed MSOURCES-19.
-----------------------------------

    Resolution: Won't Fix

This has nothing to do with the plugin. If you bind the execution after the install phase, it won't install your artifact, period.



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

        

[jira] Commented: (MSOURCES-19) source plugin with phase 'package' does not upload sources.jar into repository

Posted by "werner mueller (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSOURCES-19?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_101922 ] 

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

oh. finally i got the point.

can this bug in jira be moved/reassigned to the maven2 standard modules? or do i need to open a new issue there?


thanks :)

> 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

        

[jira] Commented: (MSOURCES-19) source plugin with phase 'package' does not upload sources.jar into repository

Posted by "Stephane Nicoll (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSOURCES-19?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_101919 ] 

Stephane Nicoll commented on MSOURCES-19:
-----------------------------------------

it has *nothing* to do with the plugin. The binding thing is a standard mechanism.

> 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

        

[jira] Commented: (MSOURCES-19) source plugin with phase 'package' does not upload sources.jar into repository

Posted by "Prasad Kashyap (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSOURCES-19?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_107250 ] 

Prasad Kashyap commented on MSOURCES-19:
----------------------------------------

Follow up to the earlier comment - 

Maybe you can explicitly execute the deploy:deploy-file goal (bound to deploy phase, executed after the source plugin) to deploy the sources ?

> 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