You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Antony Stubbs <an...@gmail.com> on 2008/08/11 09:41:28 UTC
Re: How to disable maven-compiler-plugin for jar packaging
That seems to work for disabling compile - but I can't get it to disable for
test-compile as well?
I've tried:
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/*.*</exclude>
</excludes>
</configuration>
<executions>
<execution>
<id>comp</id>
<phase>compile</phase>
<goals></goals>
<configuration>
<excludes>
<exclude>**/*.*</exclude>
</excludes>
</configuration>
</execution>
<execution>
<id>test-comp</id>
<phase>test-compile</phase>
<goals></goals>
<configuration>
<excludes>
<exclude>**/*.*</exclude>
</excludes>
</configuration>
</execution>
</executions>
</plugin>
But it still tries to compile the test files.
Stefan Seidel wrote:
>
> Try
>
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-compiler-plugin</artifactId>
> <configuration>
> <excludes>**/*.*</excludes>
> </configuration>
> </plugin>
> </plugins>
> </build>
>
> or something similar.
>
> Stefan
>
> Sahoo wrote:
>> Hi,
>>
>> I have an unusual requirement where I want to replace
>> maven-compiler-plugin by another compiler-plugin. Is there a way I can
>> do this? My situation is like this:
>> I want to use hk2-maven-plugin [1] as the compiler plugin. This plugin
>> automatically executes if I change my project's packaging type to
>> hk2-jar, but I don't want to change the project's packaging type from
>> jar to hk2-jar, as I depend on some other plugin which stops working
>> when I change my packaging type. If I just add an execution entry for
>> hk2-maven-plugin:compile goal, it is useless as all the sources first
>> get compiled using the default compiler-plugin. One option might be to
>> call hk2-maven-plugin in a pre-compile phase, but is that the only
>> option to disable the default plugin? I am looking for some ideas here.
>>
>> Thanks,
>> Sahoo
>>
>> [1] https://hk2.dev.java.net/hk2-maven-plugin/hk2-compile-mojo.html
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
-----
___________________________
http://stubbisms.wordpress.com http://stubbisms.wordpress.com
--
View this message in context: http://www.nabble.com/How-to-disable-maven-compiler-plugin-for-jar-packaging-tp16000265p18921241.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to disable maven-compiler-plugin for jar packaging
Posted by rome <ro...@googlemail.com>.
this skips compilation of main code and of tests:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.1</version>
<configuration>
<excludes>
<exclude>**/*.*</exclude>
</excludes>
<testExcludes>
<exclude>**/*.*</exclude>
</testExcludes>
</configuration>
</plugin>
--
View this message in context: http://maven-users.828.n2.nabble.com/Re-How-to-disable-maven-compiler-plugin-for-jar-packaging-tp685021p7269676.html
Sent from the maven users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to disable maven-compiler-plugin for jar packaging
Posted by Antony Stubbs <an...@gmail.com>.
Ah yes, but of course as soon as i posted that i realised that as i'm not
compiling any tests, I can just do:
<properties>
<maven.test.skip>true</maven.test.skip>
</properties>
which skips the entire test phase including test-compile...
But i'd still like to know how to get it to work using the execution
technique below...
Antony Stubbs wrote:
>
> That seems to work for disabling compile - but I can't get it to disable
> for test-compile as well?
>
> I've tried:
> <plugin>
> <artifactId>maven-compiler-plugin</artifactId>
> <configuration>
> <excludes>
> <exclude>**/*.*</exclude>
> </excludes>
> </configuration>
> <executions>
> <execution>
> <id>comp</id>
> <phase>compile</phase>
> <goals></goals>
> <configuration>
> <excludes>
> <exclude>**/*.*</exclude>
> </excludes>
> </configuration>
> </execution>
> <execution>
> <id>test-comp</id>
> <phase>test-compile</phase>
> <goals></goals>
> <configuration>
> <excludes>
> <exclude>**/*.*</exclude>
> </excludes>
> </configuration>
> </execution>
> </executions>
> </plugin>
>
> But it still tries to compile the test files.
>
>
> Stefan Seidel wrote:
>>
>> Try
>>
>> <build>
>> <plugins>
>> <plugin>
>> <artifactId>maven-compiler-plugin</artifactId>
>> <configuration>
>> <excludes>**/*.*</excludes>
>> </configuration>
>> </plugin>
>> </plugins>
>> </build>
>>
>> or something similar.
>>
>> Stefan
>>
>> Sahoo wrote:
>>> Hi,
>>>
>>> I have an unusual requirement where I want to replace
>>> maven-compiler-plugin by another compiler-plugin. Is there a way I can
>>> do this? My situation is like this:
>>> I want to use hk2-maven-plugin [1] as the compiler plugin. This plugin
>>> automatically executes if I change my project's packaging type to
>>> hk2-jar, but I don't want to change the project's packaging type from
>>> jar to hk2-jar, as I depend on some other plugin which stops working
>>> when I change my packaging type. If I just add an execution entry for
>>> hk2-maven-plugin:compile goal, it is useless as all the sources first
>>> get compiled using the default compiler-plugin. One option might be to
>>> call hk2-maven-plugin in a pre-compile phase, but is that the only
>>> option to disable the default plugin? I am looking for some ideas here.
>>>
>>> Thanks,
>>> Sahoo
>>>
>>> [1] https://hk2.dev.java.net/hk2-maven-plugin/hk2-compile-mojo.html
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
>
>
-----
___________________________
http://stubbisms.wordpress.com http://stubbisms.wordpress.com
--
View this message in context: http://www.nabble.com/How-to-disable-maven-compiler-plugin-for-jar-packaging-tp16000265p18921244.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org