You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Rostislav Hristov (JIRA)" <ji...@codehaus.org> on 2012/06/20 16:02:21 UTC

[jira] (MNG-5301) Unresolveable custom build extension

Rostislav Hristov created MNG-5301:
--------------------------------------

             Summary: Unresolveable custom build extension
                 Key: MNG-5301
                 URL: https://jira.codehaus.org/browse/MNG-5301
             Project: Maven 2 & 3
          Issue Type: Bug
          Components: Plugins and Lifecycle, Reactor and workspace
    Affects Versions: 3.0.4
            Reporter: Rostislav Hristov
         Attachments: test-extensions.zip

I'm working on a multi-module build and a custom plugin in that build should contribute custom lifecycle and packaging type. Everything works as expected only if I install the plugin in advance and fails resolve the build extension despite the fact that it's a module that is a part of the project. If the custom plugin is not specified as extension then everything works as expected. Here is simple test that showcases the issue:

/pom.xml
-------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">

	<groupId>com.foo</groupId>
	<artifactId>test</artifactId>
	<version>1.0.0</version>
	<packaging>pom</packaging>
	<modelVersion>4.0.0</modelVersion>

	<modules>
		<module>extension</module>
		<module>consumer</module>
	</modules>

</project>

/extension/pom.xml
-------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">

	<groupId>com.foo</groupId>
	<artifactId>extension</artifactId>
	<version>1.0.0</version>
	<packaging>maven-plugin</packaging>
	<modelVersion>4.0.0</modelVersion>

	<parent>
		<groupId>com.foo</groupId>
		<artifactId>test</artifactId>
		<version>1.0.0</version>
	</parent>

</project>

/consumer/pom.xml
-------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">

	<groupId>com.foo</groupId>
	<artifactId>consumer</artifactId>
	<version>1.0.0</version>
	<modelVersion>4.0.0</modelVersion>

	<parent>
		<groupId>com.foo</groupId>
		<artifactId>test</artifactId>
		<version>1.0.0</version>
	</parent>

	<build>
		<plugins>
			<plugin>
				<groupId>com.foo</groupId>
				<artifactId>extension</artifactId>
				<version>1.0.0</version>
				<extensions>true</extensions>
			</plugin>
		</plugins>
	</build>

</project>

The above project produces the following error:
[ERROR] Unresolveable build extension: Plugin com.foo:extension:1.0.0 or one of its dependencies could not be resolved: Failure to find com.foo:extension:jar:1.0.0 in...

Is this behavior expected? Is there a workaround?

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