You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Jemos Infra <je...@googlemail.com> on 2010/05/09 22:21:38 UTC

Classworlds 1.1 source code?

Hi, I'm trying to debug Maven 2 from Eclipse. Since Maven 2 depends on
classworlds-1.1.jar (under $M2_HOME/boot), any changes to get the source
code? A quick Google provides sources for 1.4 but not for 1.1. Any
jar/zip/svn repository for version 1.1? Also I wanted to ask your
opinion on how I am "launching the Launcher". This is the code which
triggers the whole process: 

package foo;

import org.codehaus.classworlds.Launcher;

public class MavenDebugger {

	public static void main(String[] args) throws Exception {
		System.setProperty("classworlds.conf",
			"/home/mtedone/development/apache-maven-2.2.1/bin/m2.conf");
		System.setProperty("maven.home",
			"/home/mtedone/development/apache-maven-2.2.1");

		Launcher.main(new String[] { "compile" });

	}

}

Basically, debugging what the mvn command does on my machine I get the
following command: 

/usr/lib/jvm/java-6-sun/bin/java
-classpath /home/mtedone/development/apache-maven-2.2.1/boot/classworlds-*.jar -Dclassworlds.conf=/home/mtedone/development/apache-maven-2.2.1/bin/m2.conf -Dmaven.home=/home/mtedone/development/apache-maven-2.2.1 org.codehaus.classworlds.Launcher  "compile"

Which I'm trying to simulate in the MavenDebugger. I'd like to follow
what this class does in order to execute a mvn compile from within
Eclipse so that I can debug/understand the whole process. Do you have
any better entry point or way to trigger Maven from a program rather
than from the command line? 

Thanks

M.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Classworlds 1.1 source code?

Posted by Brett Porter <br...@apache.org>.
Though if your only intent is to step into the Maven code / plugin code, you might instead try using "mvnDebug" and connecting remotely.

- Brett

On 10/05/2010, at 4:57 PM, Olivier Lamy wrote:

> Hi,
> 
> http://svn.codehaus.org/classworlds/tags/CLASSWORLDS_1_1/
> 
> 
> 
> 2010/5/9 Jemos Infra <je...@googlemail.com>:
>> 
>> Hi, I'm trying to debug Maven 2 from Eclipse. Since Maven 2 depends on
>> classworlds-1.1.jar (under $M2_HOME/boot), any changes to get the source
>> code? A quick Google provides sources for 1.4 but not for 1.1. Any
>> jar/zip/svn repository for version 1.1? Also I wanted to ask your
>> opinion on how I am "launching the Launcher". This is the code which
>> triggers the whole process:
>> 
>> package foo;
>> 
>> import org.codehaus.classworlds.Launcher;
>> 
>> public class MavenDebugger {
>> 
>>        public static void main(String[] args) throws Exception {
>>                System.setProperty("classworlds.conf",
>>                        "/home/mtedone/development/apache-maven-2.2.1/bin/m2.conf");
>>                System.setProperty("maven.home",
>>                        "/home/mtedone/development/apache-maven-2.2.1");
>> 
>>                Launcher.main(new String[] { "compile" });
>> 
>>        }
>> 
>> }
>> 
>> Basically, debugging what the mvn command does on my machine I get the
>> following command:
>> 
>> /usr/lib/jvm/java-6-sun/bin/java
>> -classpath /home/mtedone/development/apache-maven-2.2.1/boot/classworlds-*.jar -Dclassworlds.conf=/home/mtedone/development/apache-maven-2.2.1/bin/m2.conf -Dmaven.home=/home/mtedone/development/apache-maven-2.2.1 org.codehaus.classworlds.Launcher  "compile"
>> 
>> Which I'm trying to simulate in the MavenDebugger. I'd like to follow
>> what this class does in order to execute a mvn compile from within
>> Eclipse so that I can debug/understand the whole process. Do you have
>> any better entry point or way to trigger Maven from a program rather
>> than from the command line?
>> 
>> Thanks
>> 
>> M.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>> 
>> 
> 
> 
> 
> -- 
> Olivier
> http://twitter.com/olamy
> http://fr.linkedin.com/in/olamy
> http://www.viadeo.com/fr/profile/olivier.lamy7
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 

--
Brett Porter
brett@apache.org
http://brettporter.wordpress.com/





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Classworlds 1.1 source code?

Posted by Jemos Infra <je...@googlemail.com>.
HI Lamy, 

The tag below contains test errors. For instance, a test class fails
because when trying to resolve the ${basedir} property for the following
file content: 

# ------------------------------------------------------------
# Define the main entry-point
# ------------------------------------------------------------

main is foo from root

# ------------------------------------------------------------
# Start defining realms
# ------------------------------------------------------------

[root]
load ${basedir}/src/test-data/resources/werkflow.jar

There is no System property called basedir. Can you point me towards a
"stable" 1.1 tag? 

Regards,

M.

On Mon, 2010-05-10 at 08:57 +0200, Olivier Lamy wrote:
> Hi,
> 
> http://svn.codehaus.org/classworlds/tags/CLASSWORLDS_1_1/
> 
> 
> 
> 2010/5/9 Jemos Infra <je...@googlemail.com>:
> >
> > Hi, I'm trying to debug Maven 2 from Eclipse. Since Maven 2 depends on
> > classworlds-1.1.jar (under $M2_HOME/boot), any changes to get the source
> > code? A quick Google provides sources for 1.4 but not for 1.1. Any
> > jar/zip/svn repository for version 1.1? Also I wanted to ask your
> > opinion on how I am "launching the Launcher". This is the code which
> > triggers the whole process:
> >
> > package foo;
> >
> > import org.codehaus.classworlds.Launcher;
> >
> > public class MavenDebugger {
> >
> >        public static void main(String[] args) throws Exception {
> >                System.setProperty("classworlds.conf",
> >                        "/home/mtedone/development/apache-maven-2.2.1/bin/m2.conf");
> >                System.setProperty("maven.home",
> >                        "/home/mtedone/development/apache-maven-2.2.1");
> >
> >                Launcher.main(new String[] { "compile" });
> >
> >        }
> >
> > }
> >
> > Basically, debugging what the mvn command does on my machine I get the
> > following command:
> >
> > /usr/lib/jvm/java-6-sun/bin/java
> > -classpath /home/mtedone/development/apache-maven-2.2.1/boot/classworlds-*.jar -Dclassworlds.conf=/home/mtedone/development/apache-maven-2.2.1/bin/m2.conf -Dmaven.home=/home/mtedone/development/apache-maven-2.2.1 org.codehaus.classworlds.Launcher  "compile"
> >
> > Which I'm trying to simulate in the MavenDebugger. I'd like to follow
> > what this class does in order to execute a mvn compile from within
> > Eclipse so that I can debug/understand the whole process. Do you have
> > any better entry point or way to trigger Maven from a program rather
> > than from the command line?
> >
> > Thanks
> >
> > M.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> >
> >
> 
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Classworlds 1.1 source code?

Posted by Jemos Infra <je...@googlemail.com>.
Do I need to build it with Maven 1? The pom.xml of this tag doesn't look
anything like Maven 2. Is there a Maven 2 pom available for this?

Thx.

M.

On Mon, 2010-05-10 at 08:57 +0200, Olivier Lamy wrote:
> Hi,
> 
> http://svn.codehaus.org/classworlds/tags/CLASSWORLDS_1_1/
> 
> 
> 
> 2010/5/9 Jemos Infra <je...@googlemail.com>:
> >
> > Hi, I'm trying to debug Maven 2 from Eclipse. Since Maven 2 depends on
> > classworlds-1.1.jar (under $M2_HOME/boot), any changes to get the source
> > code? A quick Google provides sources for 1.4 but not for 1.1. Any
> > jar/zip/svn repository for version 1.1? Also I wanted to ask your
> > opinion on how I am "launching the Launcher". This is the code which
> > triggers the whole process:
> >
> > package foo;
> >
> > import org.codehaus.classworlds.Launcher;
> >
> > public class MavenDebugger {
> >
> >        public static void main(String[] args) throws Exception {
> >                System.setProperty("classworlds.conf",
> >                        "/home/mtedone/development/apache-maven-2.2.1/bin/m2.conf");
> >                System.setProperty("maven.home",
> >                        "/home/mtedone/development/apache-maven-2.2.1");
> >
> >                Launcher.main(new String[] { "compile" });
> >
> >        }
> >
> > }
> >
> > Basically, debugging what the mvn command does on my machine I get the
> > following command:
> >
> > /usr/lib/jvm/java-6-sun/bin/java
> > -classpath /home/mtedone/development/apache-maven-2.2.1/boot/classworlds-*.jar -Dclassworlds.conf=/home/mtedone/development/apache-maven-2.2.1/bin/m2.conf -Dmaven.home=/home/mtedone/development/apache-maven-2.2.1 org.codehaus.classworlds.Launcher  "compile"
> >
> > Which I'm trying to simulate in the MavenDebugger. I'd like to follow
> > what this class does in order to execute a mvn compile from within
> > Eclipse so that I can debug/understand the whole process. Do you have
> > any better entry point or way to trigger Maven from a program rather
> > than from the command line?
> >
> > Thanks
> >
> > M.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> >
> >
> 
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Classworlds 1.1 source code?

Posted by Olivier Lamy <ol...@apache.org>.
Hi,

http://svn.codehaus.org/classworlds/tags/CLASSWORLDS_1_1/



2010/5/9 Jemos Infra <je...@googlemail.com>:
>
> Hi, I'm trying to debug Maven 2 from Eclipse. Since Maven 2 depends on
> classworlds-1.1.jar (under $M2_HOME/boot), any changes to get the source
> code? A quick Google provides sources for 1.4 but not for 1.1. Any
> jar/zip/svn repository for version 1.1? Also I wanted to ask your
> opinion on how I am "launching the Launcher". This is the code which
> triggers the whole process:
>
> package foo;
>
> import org.codehaus.classworlds.Launcher;
>
> public class MavenDebugger {
>
>        public static void main(String[] args) throws Exception {
>                System.setProperty("classworlds.conf",
>                        "/home/mtedone/development/apache-maven-2.2.1/bin/m2.conf");
>                System.setProperty("maven.home",
>                        "/home/mtedone/development/apache-maven-2.2.1");
>
>                Launcher.main(new String[] { "compile" });
>
>        }
>
> }
>
> Basically, debugging what the mvn command does on my machine I get the
> following command:
>
> /usr/lib/jvm/java-6-sun/bin/java
> -classpath /home/mtedone/development/apache-maven-2.2.1/boot/classworlds-*.jar -Dclassworlds.conf=/home/mtedone/development/apache-maven-2.2.1/bin/m2.conf -Dmaven.home=/home/mtedone/development/apache-maven-2.2.1 org.codehaus.classworlds.Launcher  "compile"
>
> Which I'm trying to simulate in the MavenDebugger. I'd like to follow
> what this class does in order to execute a mvn compile from within
> Eclipse so that I can debug/understand the whole process. Do you have
> any better entry point or way to trigger Maven from a program rather
> than from the command line?
>
> Thanks
>
> M.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>



-- 
Olivier
http://twitter.com/olamy
http://fr.linkedin.com/in/olamy
http://www.viadeo.com/fr/profile/olivier.lamy7

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org