[
http://jira.jboss.com/jira/browse/JBAOP-453?page=comments#action_12372028 ]
Paul Gier commented on JBAOP-453:
---------------------------------
I think it's fine to specify dependencies of the plugin in the plugin's pom.xml.
If these dependencies (jboss-aop, plexus-utils, etc) are required to compile and run the
plugin then they should be in the plugin pom.xml. These dependencies will only be used by
the client at build time. If some of them are required at runtime, then the client
project should specify the dependencies in it's own pom.xml in a runtime or compile
scope.
If the client requires additional dependencies to run the plugin, then those can be
defined as dependencies of the plugin in the client pom.
Unfortunately, maven doesn't allow you to exclude (and redifine) plugin dependencies
like you can with regular transitive dependencies. By putting the client defined plugin
dependencies first in the forked classpath, that should allow you to override which
version of jboss-aop the plugin uses. I think this is similar to what you suggested in
number 2.
Which dependencies are you talking about moving? It seems like it would be more difficult
for the user if the plugin doesn't have it's own default dependencies defined.
maven-jbossaop-plugin requires artifact maven-jbossaop-plugin on
compile classpath
----------------------------------------------------------------------------------
Key: JBAOP-453
URL:
http://jira.jboss.com/jira/browse/JBAOP-453
Project: JBoss AOP
Issue Type: Bug
Security Level: Public(Everyone can see)
Environment: maven 2
Reporter: Anders Andersen
Assigned To: Stale Pedersen
In order to use the plugin I have to add the following dependencies to the client
artifact dependency list.
<dependency>
<groupId>org.jboss.maven.plugins</groupId>
<artifactId>maven-jbossaop-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>jboss</groupId>
<artifactId>jboss-aop</artifactId>
<version>2.0.0.alpha2</version>
</dependency>
<dependency>
<groupId>jboss</groupId>
<artifactId>jboss-common</artifactId>
<version>4.0.2</version>
</dependency>
<dependency>
<groupId>concurrent</groupId>
<artifactId>concurrent</artifactId>
<version>1.3.4</version>
</dependency>
This is relative wrong, because all maven internal artifacts ends up being nested
dependent om the runtime artifact.
See lists below.
I think the statement
cl.addArguments(new String[] { "-cp",
createClassPathList(project.getArtifacts())});
is wrong.
I tried to include only project.getPluginArtifacts(), but it gave me a NPE
So I am not 100% sure what the code solution should be
but it is not good to having maven artifacts in the resulting dependency list of the
client-artifact
list: (resulting depenency list)
The ** marked should not be there
**/Users/aka/.m2/repository/org/apache/maven/maven-artifact/2.0.2/maven-artifact-2.0.2.jar
/Users/aka/.m2/repository/relaxngDatatype/relaxngDatatype/20020414/relaxngDatatype-20020414.jar
/Users/aka/.m2/repository/org/jboss/portal/test/portal-test-opends/2.6.1-SNAPSHOT/portal-test-opends-2.6.1-SNAPSHOT.jar
/Users/aka/.m2/repository/isorelax/isorelax/20020414/isorelax-20020414.jar
/Users/aka/.m2/repository/jgroups/jgroups-all/2.2.7/jgroups-all-2.2.7.jar
/Users/aka/.m2/repository/jboss/jboss-common/4.0.2/jboss-common-4.0.2.jar
/Users/aka/.m2/repository/org/jboss/server/jboss-xml-binding/5.0.0.Alpha/jboss-xml-binding-5.0.0.Alpha.jar
/Users/aka/.m2/repository/jboss/jboss-cache/1.2.2/jboss-cache-1.2.2.jar
/Users/aka/.m2/repository/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar
/Users/aka/.m2/repository/jboss/jboss-j2se/200504122039/jboss-j2se-200504122039.jar
/Users/aka/.m2/repository/jboss/jbossha/4.0.2/jbossha-4.0.2.jar
/Users/aka/.m2/repository/jboss/jboss-minimal/4.0.2/jboss-minimal-4.0.2.jar
/Users/aka/.m2/repository/org/apache/ant/ant-junit/1.7.0/ant-junit-1.7.0.jar
/Users/aka/.m2/repository/org/jboss/server/jboss-common-client/4.0.4.GA/jboss-common-client-4.0.4.GA.jar
/Users/aka/.m2/repository/org/jboss/portal/server/portal-server/2.6.1-SNAPSHOT/portal-server-2.6.1-SNAPSHOT.jar
/Users/aka/.m2/repository/org/jboss/server/jboss-saaj/4.0.4.GA/jboss-saaj-4.0.4.GA.jar
/Users/aka/.m2/repository/org/jboss/server/jboss-system/4.0.4.GA/jboss-system-4.0.4.GA.jar
/Users/aka/.m2/repository/xerces/xercesImpl/2.6.2/xercesImpl-2.6.2.jar
/Users/aka/.m2/repository/org/jboss/portal/core/portal-core/2.6.1-SNAPSHOT/portal-core-2.6.1-SNAPSHOT.jar
/Users/aka/.m2/repository/jboss/javassist/3.4.ga/javassist-3.4.ga.jar
/Users/aka/.m2/repository/org/jboss/portal/test/portal-test/2.6.1-SNAPSHOT/portal-test-2.6.1-SNAPSHOT.jar
/Users/aka/.m2/repository/org/jboss/portal/format/portal-format/2.6.1-SNAPSHOT/portal-format-2.6.1-SNAPSHOT.jar
**/Users/aka/.m2/repository/org/codehaus/plexus/plexus-container-default/1.0-alpha-9/plexus-container-default-1.0-alpha-9.jar
/Users/aka/.m2/repository/org/apache/maven/wagon/wagon-provider-api/1.0-alpha-6/wagon-provider-api-1.0-alpha-6.jar
/Users/aka/.m2/repository/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar
/Users/aka/.m2/repository/jboss/jboss-system/4.0.2/jboss-system-4.0.2.jar
/Users/aka/.m2/repository/javax/mail/mail/1.4/mail-1.4.jar
/Users/aka/.m2/repository/hibernate/hibernate/3.2.0/hibernate-3.2.0.jar
/Users/aka/.m2/repository/jboss/jboss-j2ee/4.0.4.GA/jboss-j2ee-4.0.4.GA.jar
/Users/aka/.m2/repository/jaxen/jaxen/1.0-FCS/jaxen-1.0-FCS.jar
/Users/aka/.m2/repository/org/jboss/portal/server/portal-server-test-framework/2.6.1-SNAPSHOT/portal-server-test-framework-2.6.1-SNAPSHOT.jar
**/Users/aka/.m2/repository/org/apache/maven/maven-artifact-manager/2.0.2/maven-artifact-manager-2.0.2.jar
**/Users/aka/.m2/repository/org/apache/maven/maven-project/2.0.2/maven-project-2.0.2.jar
/Users/aka/.m2/repository/org/jboss/server/jboss-microcontainer/4.0.4.GA/jboss-microcontainer-4.0.4.GA.jar
/Users/aka/.m2/repository/org/jboss/portal/common/portal-common/2.6.1-SNAPSHOT/portal-common-2.6.1-SNAPSHOT.jar
/Users/aka/.m2/repository/selenium/selenium-java-client-driver/0.0/selenium-java-client-driver-0.0.jar
/Users/aka/.m2/repository/javax/portlet/portlet-api/1.0/portlet-api-1.0.jar
/Users/aka/.m2/repository/org/jboss/portal/theme/portal-theme/2.6.1-SNAPSHOT/portal-theme-2.6.1-SNAPSHOT.jar
**/Users/aka/.m2/repository/org/apache/maven/maven-plugin-api/2.0/maven-plugin-api-2.0.jar
/Users/aka/.m2/repository/saxpath/saxpath/1.0-FCS/saxpath-1.0-FCS.jar
/Users/aka/.m2/repository/org/jboss/server/jboss/4.0.4.GA/jboss-4.0.4.GA.jar
/Users/aka/.m2/repository/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.jar
/Users/aka/.m2/repository/wsdl4j/wsdl4j/1.5.1/wsdl4j-1.5.1.jar
/Users/aka/.m2/repository/concurrent/concurrent/1.3.4/concurrent-1.3.4.jar
/Users/aka/.m2/repository/jboss/jboss-backport-concurrent/2.1.0.GA/jboss-backport-concurrent-2.1.0.GA.jar
/Users/aka/.m2/repository/org/jboss/server/jbosssx/4.0.4.GA/jbosssx-4.0.4.GA.jar
/Users/aka/.m2/repository/org/apache/ant/ant/1.7.0/ant-1.7.0.jar
/Users/aka/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar
/Users/aka/.m2/repository/trove/trove/1.1-beta-5/trove-1.1-beta-5.jar
/Users/aka/.m2/repository/jboss/jboss-aop/2.0.0.alpha2/jboss-aop-2.0.0.alpha2.jar
**/Users/aka/.m2/repository/org/apache/maven/maven-model/2.0.2/maven-model-2.0.2.jar
/Users/aka/.m2/repository/javax/servlet/jsp-api/2.0/jsp-api-2.0.jar
/Users/aka/.m2/repository/log4j/log4j/1.2.8/log4j-1.2.8.jar
/Users/aka/.m2/repository/bsh/bsh/1.3.0/bsh-1.3.0.jar
/Users/aka/.m2/repository/org/jboss/portal/portlet/portal-portlet/2.6.1-SNAPSHOT/portal-portlet-2.6.1-SNAPSHOT.jar
/Users/aka/.m2/repository/jboss/jboss-aspect-library/1.5/jboss-aspect-library-1.5.jar
/Users/aka/.m2/repository/org/jboss/portal/portlet-server/portal-portlet-server/2.6.1-SNAPSHOT/portal-portlet-server-2.6.1-SNAPSHOT.jar
/Users/aka/.m2/repository/org/jboss/server/jboss-jmx/4.0.4.GA/jboss-jmx-4.0.4.GA.jar
/Users/aka/.m2/repository/org/apache/myfaces/myfaces-impl/1.1.1/myfaces-impl-1.1.1.jar
/Users/aka/.m2/repository/org/apache/maven/maven-repository-metadata/2.0.2/maven-repository-metadata-2.0.2.jar
/Users/aka/.m2/repository/jboss/jboss-aop/jboss-aop/1.5.0.GA/jboss-aop-1.5.0.GA.jar
/Users/aka/.m2/repository/org/jboss/portal/common/portal-common-junit/2.6.1-SNAPSHOT/portal-common-junit-2.6.1-SNAPSHOT.jar
/Users/aka/.m2/repository/commons-codec/commons-codec/1.2/commons-codec-1.2.jar
**/Users/aka/.m2/repository/org/apache/maven/maven-profile/2.0.2/maven-profile-2.0.2.jar
/Users/aka/.m2/repository/org/visigoths/freemaker/freemarker/2.3.9/freemarker-2.3.9.jar
/Users/aka/.m2/repository/org/jboss/portal/test/portal-test-agent/2.6.1-SNAPSHOT/portal-test-agent-2.6.1-SNAPSHOT.jar
/Users/aka/.m2/repository/javax/activation/activation/1.1/activation-1.1.jar
/Users/aka/.m2/repository/org/jboss/server/jboss-dependency/4.0.4.GA/jboss-dependency-4.0.4.GA.jar
/Users/aka/.m2/repository/org/jboss/portal/portlet-federation/portal-portlet-federation/2.6.1-SNAPSHOT/portal-portlet-federation-2.6.1-SNAPSHOT.jar
/Users/aka/.m2/repository/msv/msv/20020414/msv-20020414.jar
/Users/aka/.m2/repository/commons-httpclient/commons-httpclient/3.0.1/commons-httpclient-3.0.1.jar
/Users/aka/.m2/repository/commons-logging/commons-logging/1.0.3/commons-logging-1.0.3.jar
/Users/aka/.m2/repository/slide/webdavlib/2.0/webdavlib-2.0.jar
**/Users/aka/.m2/repository/org/jboss/maven/plugins/maven-jbossaop-plugin/1.0-SNAPSHOT/maven-jbossaop-plugin-1.0-SNAPSHOT.jar
/Users/aka/.m2/repository/org/jboss/portal/web/portal-web/2.6.1-SNAPSHOT/portal-web-2.6.1-SNAPSHOT.jar
/Users/aka/.m2/repository/org/apache/myfaces/myfaces-api/1.1.1/myfaces-api-1.1.1.jar
/Users/aka/.m2/repository/org/jboss/portal/wsrp/portal-wsrp-gen/2.6.1-SNAPSHOT/portal-wsrp-gen-2.6.1-SNAPSHOT.jar
/Users/aka/.m2/repository/oswego-concurrent/concurrent/1.3.4/concurrent-1.3.4.jar
/Users/aka/.m2/repository/org/jboss/portal/jems/portal-jems/2.6.1-SNAPSHOT/portal-jems-2.6.1-SNAPSHOT.jar
/Users/aka/.m2/repository/org/jboss/portal/registration/portal-registration/2.6.1-SNAPSHOT/portal-registration-2.6.1-SNAPSHOT.jar
/Users/aka/.m2/repository/org/jboss/server/jboss-jaxrpc/4.0.4.GA/jboss-jaxrpc-4.0.4.GA.jar
/Users/aka/.m2/repository/org/jboss/portal/security/portal-security/2.6.1-SNAPSHOT/portal-security-2.6.1-SNAPSHOT.jar
/Users/aka/.m2/repository/org/jboss/portal/api/portal-api/2.6.1-SNAPSHOT/portal-api-2.6.1-SNAPSHOT.jar
/Users/aka/.m2/repository/org/codehaus/cargo/cargo-core-uberjar/0.8/cargo-core-uberjar-0.8.jar
/Users/aka/.m2/repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar
/Users/aka/.m2/repository/dom4j/dom4j/1.4/dom4j-1.4.jar
/Users/aka/.m2/repository/org/jboss/portal/identity/portal-identity/2.6.1-SNAPSHOT/portal-identity-2.6.1-SNAPSHOT.jar
/Users/aka/.m2/repository/org/jboss/portal/common/explode-common/2.6.1-SNAPSHOT/explode-common-2.6.1-SNAPSHOT.jar
/Users/aka/.m2/repository/org/jboss/portal/portlet/portal-portlet-test-framework/2.6.1-SNAPSHOT/portal-portlet-test-framework-2.6.1-SNAPSHOT.jar
**/Users/aka/.m2/repository/org/codehaus/plexus/plexus-utils/1.4.2/plexus-utils-1.4.2.jar
/Users/aka/.m2/repository/jboss/jnpserver/3.2.3/jnpserver-3.2.3.jar
/Users/aka/.m2/repository/opends/opends/0.0/opends-0.0.jar
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira