Have you tried using it as the example shown?
<executable>
${env.M2_REPO}/org/eclipse/jdt/${org.eclipse.jdt.core.version}/core-${or
g.eclipse.jdt.core.version}.jar
org.eclipse.jdt.internal.compiler.batch.Main -classpath rt.jar
-sourcepath "src/main"
</executable>
Make sure that M2_REPO has been added to your environmental variables
and points to your local repository.
-----Original Message-----
From: Rice Yeh [mailto:[EMAIL PROTECTED]
Sent: Monday, November 10, 2008 10:39 PM
To: Maven Users List
Subject: Re: Use eclipse to compile
Hi,
I find there is a problem with this method. Actually, nothing get
compiled. This is because all java files are included in classpath
without ";" as seperator as shown in the following:
[DEBUG] -d C:\projects\xsf\jdk15\as-measurement\target\classes
-classpath C:\pro
jects\xsf\jdk15\as-measurement\target\classes;C:\Documents and
Settings\riceyeh\
.m2\repository\commons-logging\commons-logging\1.0.4\commons-logging-1.0
.4.jar;C
:\Documents and
Settings\riceyeh\.m2\repository\antlr\antlr\2.7.2\antlr-2.7.2.ja
r;C:\Documents and
Settings\riceyeh\.m2\repository\as\as-commons\1.0.0-SNAPSHOT\
as-commons-1.0.0-SNAPSHOT-jdk15.jar;C:\Documents and
Settings\riceyeh\.m2\reposi
tory\org\aspectj\aspectjrt\1.5.4\aspectjrt-1.5.4.jar;
C:\projects\xsf\jdk15\as-m
easurement\src\main\java\as\util\time\DaySet.java
C:\projects\xsf\jdk15\as-measu
rement\src\main\java\as\util\time\DayOfWeek.java
C:\projects\xsf\jdk15\as-measur
ement\src\main\java\as\util\measurement\UnSupportedUnitException.java
C:\project
s\xsf\jdk15\as-measurement\src\main\java\as\util\time\TimeLengthUnit.jav
a
C:\pro
jects\xsf\jdk15\as-measurement\src\main\java\as\util\time\TimeStreamPeri
od.java
C:\projects\xsf\jdk15\as-measurement\src\main\java\as\util\measurement\M
ultiplic
able.java
C:\projects\xsf\jdk15\as-measurement\src\main\java\as\util\time\Builde
r.java
C:\projects\xsf\jdk15\as-measurement\src\main\java\as\util\time\Period.j
a
va
C:\projects\xsf\jdk15\as-measurement\src\main\java\as\util\time\Utility.
java
My configure is as follows:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
<compilerVersion>1.5</compilerVersion>
<fork>true</fork>
<executable>
java -classpath
"${env.M2_REPO}/org/eclipse/jdt/${org.eclipse.jdt.core.version}/core-${o
rg.eclipse.jdt.core.version}.jar"
org.eclipse.jdt.internal.compiler.batch.Main
-classpath rt.jar -sourcepath "src/main;target/generated-sources" -d
"target/classes"
</executable>
</configuration>
<dependencies>
<dependency>
<groupId>org.eclipse.jdt</groupId>
<artifactId>core</artifactId>
<version>${org.eclipse.jdt.core.version}</version>
</dependency>
</dependencies>
</plugin>
Regards,
Rice
On Tue, Nov 11, 2008 at 2:17 AM, Rice Yeh <[EMAIL PROTECTED]> wrote:
> Thanks, it works.
>
>
> On Tue, Nov 11, 2008 at 1:38 AM, Hoover, William
<[EMAIL PROTECTED]>wrote:
>
>> http://article.gmane.org/gmane.comp.jakarta.turbine.maven.user/91072
>>
>> -----Original Message-----
>> From: Rice Yeh [mailto:[EMAIL PROTECTED]
>> Sent: Monday, November 10, 2008 12:30 PM
>> To: [email protected]
>> Subject: Use eclipse to compile
>>
>> Hi,
>> I am following the instructions on maven-compiler-plugin to use
>> eclipse's compiler to compile my java files. maven-compiler-plugin
>> depends on plexus-compiler-eclipse which has 1.5.1 as the most
>> updated version. 1.5.1 use eclipse org.eclipse.jdt.core 3.1.0 which
>> is too old for me. Any way can I change this? Or there is other ways
>> to compile with eclipse's compiler?
>>
>> Regards,
>> Rice
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]