Maven 1

Project properties inherited to plugins

Details

  • Type: Bug Bug
  • Status: Reopened Reopened
  • Priority: Critical Critical
  • Resolution: Unresolved
  • Affects Version/s: 1.0.2
  • Fix Version/s: None
  • Component/s: inheritance
  • Labels:
    None
  • Environment:
    Win XP & Solaris 8
    Maven 1.0.2
  • Number of attachments :
    0

Description

In my project.properties the

maven.jar.override = on

is setted and the library override:

maven.jar.commons-lang = ${basedir}/lib/commons-lang-2.0.jar

is setted.

Now the Artifact Plugin tries to get the commons-lang-2.0.jar from the local plugin libraries and fails.

Issue Links

Activity

Hide
Brett Porter added a comment -

this is the correct behaviour.

You need to either:
a) add the property to project.properties inside the plugin (not recommended)
b) put the property in ~/build.properties (affects all projects and plugins)
c) add the property to the command line with -D

What is your reason for doing this? If you are just manually downloading JARs, perhaps it is better to put them in the local repository directly?

Show
Brett Porter added a comment - this is the correct behaviour. You need to either: a) add the property to project.properties inside the plugin (not recommended) b) put the property in ~/build.properties (affects all projects and plugins) c) add the property to the command line with -D What is your reason for doing this? If you are just manually downloading JARs, perhaps it is better to put them in the local repository directly?
Hide
Brett Porter added a comment -

regression

Show
Brett Porter added a comment - regression
Hide
Geoffrey De Smet added a comment -

project.xml:
<dependency>
<id>commons-collections</id>
<version>???</version>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>

project.properties:
maven.jar.commons-logging = ${basedir}/lib/commons-logging.jar

I get this error because the plugin also tries to use it:

Het bouwen kan niet doorgaan, omdat de volgende afhankelijkheden niet achterhaald kunnen worden:

commons-logging-1.0.3.jar; path override doesn't exist: C:\Documents and Settings\Geoffrey\.maven\cache\maven-xdoc-plugin-1.8
\lib\commons-logging.jar

Due to legacy reasons it is not possible to use the repository for now for everything, although we understand it's better to use the repository.

Show
Geoffrey De Smet added a comment - project.xml: <dependency> <id>commons-collections</id> <version>???</version> <properties> <war.bundle>true</war.bundle> </properties> </dependency> project.properties: maven.jar.commons-logging = ${basedir}/lib/commons-logging.jar I get this error because the plugin also tries to use it: Het bouwen kan niet doorgaan, omdat de volgende afhankelijkheden niet achterhaald kunnen worden: commons-logging-1.0.3.jar; path override doesn't exist: C:\Documents and Settings\Geoffrey\.maven\cache\maven-xdoc-plugin-1.8 \lib\commons-logging.jar Due to legacy reasons it is not possible to use the repository for now for everything, although we understand it's better to use the repository.
Hide
Geoffrey De Smet added a comment -

a workaround is to call it
commons-logging-override

this way it's also flagged in the project.xml as evil

Show
Geoffrey De Smet added a comment - a workaround is to call it commons-logging-override this way it's also flagged in the project.xml as evil
Hide
Brett Porter added a comment -

see MAVEN-1610 for a test case

Show
Brett Porter added a comment - see MAVEN-1610 for a test case

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated: