You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Ole Ersoy <ol...@yahoo.com> on 2006/12/03 19:18:30 UTC
dependencyManagement Bug? in Eclipse Plugin
Hi,
If I override a dependency
in a child pom, and then
run
mvn eclipse:eclipse
in the child project directory
it does not set the class path
correctly.
I uploaded the testing document
I used containing shell scripts, etc.
to my sandbox account here:
https://svn.apache.org/repos/asf/directory/sandbox/oersoy/maven-testing/eclipse-maven-testing.apt
Incidentally - Anyone know if there is an option that
makes the eclipse plugin create eclipse projects for
projects with packaging pom. This would be really
nice for editing the dependencyManagement section of
the pom.
Here is the section of this document containing the
test for this (The mail parser may nix some of the
entities)
Challenge
See whether we can set
a dependency version in
the dependency management
section of a pom and then
override it on a child pom.
Solution
Run the following script
----------------------------------------------------------------
mvn archetype:create -DartifactId=L0Project
-DgroupId=test
cd L0Project
sed -e 's/jar/pom/' pom.xml | sed -e '10,18d' >
pom.xml.tmp
cat << END >> pom.xml.tmp
<dependencyManagement>
<dependencies>
<dependency>
<artifactId>commons-collections</artifactId>
<groupId>commons-collections</groupId>
<version>2.11</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>
END
mv pom.xml.tmp pom.xml
mvn archetype:create -DartifactId=L1Project
-DgroupId=test
pushd L1Project
sed -e '20,21d' pom.xml > pom.xml.tmp
cat << END >> pom.xml.tmp
<dependency>
<artifactId>commons-collections</artifactId>
<groupId>commons-collections</groupId>
<version>3.2</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
END
mv pom.xml.tmp pom.xml
pushd src/test/java/test
cat << END > AppTest.java
package test;
import
org.apache.commons.collections.bag.AbstractBagDecorator;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* Unit test for simple App.
*/
public class AppTest
extends TestCase
{
/**
* Create the test case
*
* @param testName name of the test case
*/
public AppTest( String testName )
{
super( testName );
}
/**
* @return the suite of tests being tested
*/
public static Test suite()
{
return new TestSuite( AppTest.class );
}
/**
* Rigourous Test :-)
*/
public void testApp()
{
AbstractBagDecorator emannuelsBagDecorator;
assertTrue( true );
}
}
END
popd
popd
mvn eclipse:eclipse
mvn test
----------------------------------------------------------------
Result
The test runs fine.
Challenge
See whether we can import the
L1Project into eclipse and have
the AbstractBagDecorator that the
AppTest needs loaded successfully.
Solution
Import the L1Project into
eclipse.
Result
The AbstractBagDecorator
does not load.
Follow Up
Check with Maven Dev to see
whether this is a known bug.
Cheers,
- Ole
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: dependencyManagement Bug? in Eclipse Plugin
Posted by Ole Ersoy <ol...@yahoo.com>.
Terrific - Thanks for the update. I put in votes on
both :-)
Cheers,
- Ole
--- Stephen Duncan <st...@gmail.com> wrote:
> Yes, this is a known issue. See
> http://jira.codehaus.org/browse/MECLIPSE-107 and
> http://jira.codehaus.org/browse/MNG-2340
>
> -Stephen
>
> On 12/3/06, Ole Ersoy <ol...@yahoo.com> wrote:
> > Hi,
> >
> > If I override a dependency
> > in a child pom, and then
> > run
> >
> > mvn eclipse:eclipse
> >
> > in the child project directory
> > it does not set the class path
> > correctly.
> >
> > I uploaded the testing document
> > I used containing shell scripts, etc.
> > to my sandbox account here:
> >
> >
>
https://svn.apache.org/repos/asf/directory/sandbox/oersoy/maven-testing/eclipse-maven-testing.apt
> >
> > Incidentally - Anyone know if there is an option
> that
> > makes the eclipse plugin create eclipse projects
> for
> > projects with packaging pom. This would be really
> > nice for editing the dependencyManagement section
> of
> > the pom.
> >
> > Here is the section of this document containing
> the
> > test for this (The mail parser may nix some of the
> > entities)
> >
> >
> > Challenge
> >
> > See whether we can set
> > a dependency version in
> > the dependency management
> > section of a pom and then
> > override it on a child pom.
> >
> > Solution
> >
> > Run the following script
> >
> >
>
----------------------------------------------------------------
> >
> > mvn archetype:create -DartifactId=L0Project
> > -DgroupId=test
> > cd L0Project
> > sed -e 's/jar/pom/' pom.xml | sed -e '10,18d' >
> > pom.xml.tmp
> > cat << END >> pom.xml.tmp
> > <dependencyManagement>
> > <dependencies>
> > <dependency>
> >
> > <artifactId>commons-collections</artifactId>
> >
> <groupId>commons-collections</groupId>
> > <version>2.11</version>
> > <scope>test</scope>
> > </dependency>
> > </dependencies>
> > </dependencyManagement>
> > </project>
> > END
> > mv pom.xml.tmp pom.xml
> >
> > mvn archetype:create -DartifactId=L1Project
> > -DgroupId=test
> >
> > pushd L1Project
> > sed -e '20,21d' pom.xml > pom.xml.tmp
> >
> > cat << END >> pom.xml.tmp
> > <dependency>
> >
> <artifactId>commons-collections</artifactId>
> > <groupId>commons-collections</groupId>
> > <version>3.2</version>
> > <scope>test</scope>
> > </dependency>
> > </dependencies>
> > </project>
> > END
> >
> > mv pom.xml.tmp pom.xml
> >
> > pushd src/test/java/test
> >
> > cat << END > AppTest.java
> > package test;
> >
> > import
> >
>
org.apache.commons.collections.bag.AbstractBagDecorator;
> >
> > import junit.framework.Test;
> > import junit.framework.TestCase;
> > import junit.framework.TestSuite;
> >
> >
> > /**
> > * Unit test for simple App.
> > */
> > public class AppTest
> > extends TestCase
> > {
> > /**
> > * Create the test case
> > *
> > * @param testName name of the test case
> > */
> > public AppTest( String testName )
> > {
> > super( testName );
> > }
> >
> > /**
> > * @return the suite of tests being tested
> > */
> > public static Test suite()
> > {
> > return new TestSuite( AppTest.class );
> > }
> >
> > /**
> > * Rigourous Test :-)
> > */
> > public void testApp()
> > {
> > AbstractBagDecorator
> emannuelsBagDecorator;
> > assertTrue( true );
> > }
> > }
> > END
> >
> >
> > popd
> > popd
> > mvn eclipse:eclipse
> > mvn test
> >
>
----------------------------------------------------------------
> >
> >
> > Result
> >
> > The test runs fine.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Challenge
> >
> > See whether we can import the
> > L1Project into eclipse and have
> > the AbstractBagDecorator that the
> > AppTest needs loaded successfully.
> >
> > Solution
> >
> > Import the L1Project into
> > eclipse.
> >
> > Result
> >
> > The AbstractBagDecorator
> > does not load.
> >
> > Follow Up
> >
> > Check with Maven Dev to see
> > whether this is a known bug.
> >
> > Cheers,
> > - Ole
> >
> >
> >
> >
> >
>
____________________________________________________________________________________
>
=== message truncated ===
____________________________________________________________________________________
Want to start your own business?
Learn how on Yahoo! Small Business.
http://smallbusiness.yahoo.com/r-index
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: dependencyManagement Bug? in Eclipse Plugin
Posted by Stephen Duncan <st...@gmail.com>.
Yes, this is a known issue. See
http://jira.codehaus.org/browse/MECLIPSE-107 and
http://jira.codehaus.org/browse/MNG-2340
-Stephen
On 12/3/06, Ole Ersoy <ol...@yahoo.com> wrote:
> Hi,
>
> If I override a dependency
> in a child pom, and then
> run
>
> mvn eclipse:eclipse
>
> in the child project directory
> it does not set the class path
> correctly.
>
> I uploaded the testing document
> I used containing shell scripts, etc.
> to my sandbox account here:
>
> https://svn.apache.org/repos/asf/directory/sandbox/oersoy/maven-testing/eclipse-maven-testing.apt
>
> Incidentally - Anyone know if there is an option that
> makes the eclipse plugin create eclipse projects for
> projects with packaging pom. This would be really
> nice for editing the dependencyManagement section of
> the pom.
>
> Here is the section of this document containing the
> test for this (The mail parser may nix some of the
> entities)
>
>
> Challenge
>
> See whether we can set
> a dependency version in
> the dependency management
> section of a pom and then
> override it on a child pom.
>
> Solution
>
> Run the following script
>
> ----------------------------------------------------------------
>
> mvn archetype:create -DartifactId=L0Project
> -DgroupId=test
> cd L0Project
> sed -e 's/jar/pom/' pom.xml | sed -e '10,18d' >
> pom.xml.tmp
> cat << END >> pom.xml.tmp
> <dependencyManagement>
> <dependencies>
> <dependency>
>
> <artifactId>commons-collections</artifactId>
> <groupId>commons-collections</groupId>
> <version>2.11</version>
> <scope>test</scope>
> </dependency>
> </dependencies>
> </dependencyManagement>
> </project>
> END
> mv pom.xml.tmp pom.xml
>
> mvn archetype:create -DartifactId=L1Project
> -DgroupId=test
>
> pushd L1Project
> sed -e '20,21d' pom.xml > pom.xml.tmp
>
> cat << END >> pom.xml.tmp
> <dependency>
> <artifactId>commons-collections</artifactId>
> <groupId>commons-collections</groupId>
> <version>3.2</version>
> <scope>test</scope>
> </dependency>
> </dependencies>
> </project>
> END
>
> mv pom.xml.tmp pom.xml
>
> pushd src/test/java/test
>
> cat << END > AppTest.java
> package test;
>
> import
> org.apache.commons.collections.bag.AbstractBagDecorator;
>
> import junit.framework.Test;
> import junit.framework.TestCase;
> import junit.framework.TestSuite;
>
>
> /**
> * Unit test for simple App.
> */
> public class AppTest
> extends TestCase
> {
> /**
> * Create the test case
> *
> * @param testName name of the test case
> */
> public AppTest( String testName )
> {
> super( testName );
> }
>
> /**
> * @return the suite of tests being tested
> */
> public static Test suite()
> {
> return new TestSuite( AppTest.class );
> }
>
> /**
> * Rigourous Test :-)
> */
> public void testApp()
> {
> AbstractBagDecorator emannuelsBagDecorator;
> assertTrue( true );
> }
> }
> END
>
>
> popd
> popd
> mvn eclipse:eclipse
> mvn test
> ----------------------------------------------------------------
>
>
> Result
>
> The test runs fine.
>
>
>
>
>
>
>
>
>
>
>
> Challenge
>
> See whether we can import the
> L1Project into eclipse and have
> the AbstractBagDecorator that the
> AppTest needs loaded successfully.
>
> Solution
>
> Import the L1Project into
> eclipse.
>
> Result
>
> The AbstractBagDecorator
> does not load.
>
> Follow Up
>
> Check with Maven Dev to see
> whether this is a known bug.
>
> Cheers,
> - Ole
>
>
>
>
> ____________________________________________________________________________________
> Do you Yahoo!?
> Everyone is raving about the all-new Yahoo! Mail beta.
> http://new.mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>
--
Stephen Duncan Jr
www.stephenduncanjr.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: dependencyManagement Bug? in Eclipse Plugin
Posted by Mike Perham <mp...@gmail.com>.
This is a long standing and popular issue in JIRA.
On 12/3/06, Ole Ersoy <ol...@yahoo.com> wrote:
> Hi,
>
> If I override a dependency
> in a child pom, and then
> run
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org