[jboss-jira] [JBoss JIRA] (JBASMP-55) Undeploy requires dependency resolution of artifacts in scope: runtime
Dojcsák Sándor (JIRA)
jira-events at lists.jboss.org
Thu Oct 24 09:00:04 EDT 2013
[ https://issues.jboss.org/browse/JBASMP-55?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12824633#comment-12824633 ]
Dojcsák Sándor commented on JBASMP-55:
--------------------------------------
Thank you for your answer but I think it is another problem.
For example I have a maven multi module project (my-app) with 2 module: module-a, module-b. Module-a depends on module-b.
{code:xml|title=my-app pom.xml}
<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">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany.app</groupId>
<artifactId>my-app</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<name>my-app</name>
<url>http://maven.apache.org</url>
<modules>
<module>module-a</module>
<module>module-b</module>
</modules>
</project>
{code}
{code:xml|title=module-a pom.xml}
<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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.mycompany.app</groupId>
<artifactId>my-app</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>module-a</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>module-a</name>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>module-b</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.jboss.as.plugins</groupId>
<artifactId>jboss-as-maven-plugin</artifactId>
<version>7.4.Final</version>
<executions>
<execution>
<id>undeploy</id>
<phase>clean</phase>
<goals>
<goal>undeploy</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
{code}
{code:xml|title=module-b pom.xml}
<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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.mycompany.app</groupId>
<artifactId>my-app</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>module-b</artifactId>
<version>1.0-SNAPSHOT</version>
<name>module-b</name>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
{code}
Please run mvn clean and you will see the problem: “[ERROR] Failed to execute goal on project module-a: Could not resolve dependencies for project…”
If you change resolution scope in Undeploy.java to ResolutionScope.NONE, you can run mvn clean.
> Undeploy requires dependency resolution of artifacts in scope: runtime
> ----------------------------------------------------------------------
>
> Key: JBASMP-55
> URL: https://issues.jboss.org/browse/JBASMP-55
> Project: JBoss AS Maven Plugins
> Issue Type: Bug
> Reporter: Dojcsák Sándor
> Assignee: James Perkins
>
> I attached deploy goal to the clean lifecycle phase. I changed resolution scope in Undeploy.java to ResolutionScope.NONE. After I do not require mvn install for dependency resolution before I run clean.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list