maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Mörchen (JIRA) <j...@codehaus.org>
Subject [jira] Issue Comment Edited: (MDEP-278) Always uses the same classifier when defining the plugin more than one time
Date Thu, 29 Jul 2010 08:36:32 GMT

    [ http://jira.codehaus.org/browse/MDEP-278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=230175#action_230175
] 

Adrian Mörchen edited comment on MDEP-278 at 7/29/10 3:35 AM:
--------------------------------------------------------------

I've attached an example, which shows two different behaviour:

# I can't use the plugin twice.It is only execute once. Either the part of the profile when
activated or the other part. My expectation would be, that both is activated (maybe this is
a maven thing)
# testng is download with classifier "sources", but I've only defined this classifier for
bouncycastle. I expected that there would be no classifier used for testng.

{code}
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>me.scrobble.example</groupId>
	<artifactId>mdep-287</artifactId>
	<name>MDEP-287</name>
	<version>0.0.1-SNAPSHOT</version>
	<description>MDEP-278 - Always uses the same classifier when defining the plugin more
than one time</description>
	<url>http://jira.codehaus.org/browse/MDEP-278</url>
	<issueManagement>
		<system>JIRA</system>
		<url>http://jira.codehaus.org/browse/MDEP-278</url>
	</issueManagement>
	<profiles>
		<profile>
			<id>development</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-dependency-plugin</artifactId>
						<version>2.1</version>
						<executions>
							<execution>
								<id>copy</id>
								<phase>process-resources</phase>
								<goals>
									<goal>copy</goal>
								</goals>
								<configuration>
									<artifactItems>
										<artifactItem>
											<groupId>org.testng</groupId>
											<artifactId>testng</artifactId>
											<version>5.12.1</version>
											<type>jar</type>
										</artifactItem>
									</artifactItems>
									<outputDirectory>${project.build.directory}/downloads/</outputDirectory>
									<overWriteReleases>false</overWriteReleases>
									<overWriteSnapshots>true</overWriteSnapshots>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<version>2.1</version>
				<executions>
					<execution>
						<id>copy</id>
						<phase>process-resources</phase>
						<goals>
							<goal>copy</goal>
						</goals>
						<configuration>
							<artifactItems>
								<artifactItem>
									<groupId>org.bouncycastle</groupId>
									<artifactId>bcprov-jdk15</artifactId>
									<version>1.45</version>
									<classifier>sources</classifier>
									<type>jar</type>
								</artifactItem>
							</artifactItems>
							<outputDirectory>${project.build.directory}/downloads/</outputDirectory>
							<overWriteReleases>false</overWriteReleases>
							<overWriteSnapshots>true</overWriteSnapshots>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>
{code}

      was (Author: adrian):
    I've attached an example, which shows two different behaviour:

# I can't use the plugin twice.It is only execute once. Either the part of the profile when
activated or the other part. My expectation would be, that both is activated (maybe this is
a maven thing)
# testng is download with classifier "sources", but I've only defined this classifier for
bouncycastle. I expected that there would be no classifier used for testng.
  
> Always uses the same classifier when defining the plugin more than one time
> ---------------------------------------------------------------------------
>
>                 Key: MDEP-278
>                 URL: http://jira.codehaus.org/browse/MDEP-278
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>          Components: copy
>    Affects Versions: 2.1
>         Environment: Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
> Java version: 1.6.0_16
> Default locale: de_DE, platform encoding: Cp1252
> OS name: "windows 7" version: "6.1" arch: "x86" Family: "windows"
>            Reporter: Adrian Mörchen
>            Assignee: Brian Fox
>         Attachments: mdep-287.zip
>
>
> I've got something like this, which is always executed:
> {code}
>  <build>
>          <plugins>
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-dependency-plugin</artifactId>
>                 <executions>
>                     <execution>
>                         <id>copy</id>
>                         <phase>process-resources</phase>
>                         <goals>
>                             <goal>copy</goal>
>                         </goals>
>                         <configuration>
>                             <artifactItems>
>                                     <artifactItem>
>                                     <groupId>documentation</groupId>
>                                     <artifactId>user-manual</artifactId>
>                                     <version>${manual.version}</version>
>                                     <classifier>german</classifier>
>                                     <type>pdf</type>
>                                                                          </artifactItem>
>                                 <artifactItem>
>                                     <groupId>documentation</groupId>
>                                     <artifactId>user-manual</artifactId>
>                                     <version>${manual.version}</version>
>                                     <classifier>english</classifier>
>                                     <type>pdf</type>
>                                    </artifactItem>
>                                 <artifactItem>
>                                     <groupId>documentation</groupId>
>                                     <artifactId>administration-manual</artifactId>
>                                     <version>${manual.version}</version>
>                                     <classifier>german</classifier>
>                                     <type>pdf</type>
>                                 </artifactItem>
>                                 <artifactItem>
>                                     <groupId>documentation</groupId>
>                                     <artifactId>administration-manual</artifactId>
>                                     <version>${manual.version}</version>
>                                     <classifier>english</classifier>
>                                     <type>pdf</type>
>                                 </artifactItem>
>                             </artifactItems>
>                             <outputDirectory>${project.build.directory}/downloads/documentation</outputDirectory>
>                             <overWriteReleases>false</overWriteReleases>
>                             <overWriteSnapshots>true</overWriteSnapshots>
>                         </configuration>
>                     </execution>
>                 </executions>
>             </plugin>
> ...
> </build>
> {code}
> I've also defined a profile "development" where I want to copy some additional dependencies.
When I configure the plugin like the version above Maven always appends a classifier "german"
to all dependencies. This results in an error, that Maven is not able to resolve the dependencies
from any repository. Also setting the classifier to empty using <classifier></classifier>
doesn't help.

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

       

Mime
View raw message