You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Bob Allison (JIRA)" <ji...@codehaus.org> on 2005/10/11 22:21:11 UTC
[jira] Created: (MNG-1174) New Mojos for compiler and jar plugins to allow alternate jars
New Mojos for compiler and jar plugins to allow alternate jars
--------------------------------------------------------------
Key: MNG-1174
URL: http://jira.codehaus.org/browse/MNG-1174
Project: Maven 2
Type: Improvement
Versions: 2.0-beta-3
Environment: Linux using JDK 1.5.0_01
Reporter: Bob Allison
Fix For: 2.0-beta-4
Add mojos so that mock objects and other affiliated source roots can be compiled and packaged in the same project
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Commented: (MNG-1174) New Mojos for compiler and jar plugins to allow alternate jars
Posted by "ruel loehr (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-1174?page=comments#action_52796 ]
ruel loehr commented on MNG-1174:
---------------------------------
I am looking for the same type of functionality that Bob is asking for here. Basically, compileSourceRoots and outputDirectory need to be configurable by the user. Here is an example use case:
I have a certain project which has two source trees, one for use with jdk14 and one with jdk15. My pom describes the jdk14 build, which works fine. However, the only way I could ever compile the second source tree is to write (copy) the compiler plugin, give it a new name and set the sourceRoots to configurable.....
> New Mojos for compiler and jar plugins to allow alternate jars
> --------------------------------------------------------------
>
> Key: MNG-1174
> URL: http://jira.codehaus.org/browse/MNG-1174
> Project: Maven 2
> Type: Improvement
> Components: maven-compiler-plugin
> Versions: 2.0-beta-3
> Environment: Linux using JDK 1.5.0_01
> Reporter: Bob Allison
> Fix For: 2.0.1
> Attachments: AltCompilerMojo.java, AltJarMojo.java, pom.xml
>
>
> Add mojos so that mock objects and other affiliated source roots can be compiled and packaged in the same project
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Updated: (MNG-1174) New Mojos for compiler and jar plugins
to allow alternate jars
Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-1174?page=all ]
Brett Porter updated MNG-1174:
------------------------------
Fix Version: (was: 2.0.1)
2.0.2
> New Mojos for compiler and jar plugins to allow alternate jars
> --------------------------------------------------------------
>
> Key: MNG-1174
> URL: http://jira.codehaus.org/browse/MNG-1174
> Project: Maven 2
> Type: Improvement
> Components: maven-compiler-plugin
> Versions: 2.0-beta-3
> Environment: Linux using JDK 1.5.0_01
> Reporter: Bob Allison
> Fix For: 2.0.2
> Attachments: AltCompilerMojo.java, AltJarMojo.java, pom.xml
>
>
> Add mojos so that mock objects and other affiliated source roots can be compiled and packaged in the same project
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Updated: (MNG-1174) New Mojos for compiler and jar plugins to allow alternate jars
Posted by "Bob Allison (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-1174?page=all ]
Bob Allison updated MNG-1174:
-----------------------------
Attachment: pom.xml
The build section from a POM which shows how to use the new mojos
> New Mojos for compiler and jar plugins to allow alternate jars
> --------------------------------------------------------------
>
> Key: MNG-1174
> URL: http://jira.codehaus.org/browse/MNG-1174
> Project: Maven 2
> Type: Improvement
> Versions: 2.0-beta-3
> Environment: Linux using JDK 1.5.0_01
> Reporter: Bob Allison
> Fix For: 2.0-beta-4
> Attachments: AltCompilerMojo.java, AltJarMojo.java, pom.xml
>
>
> Add mojos so that mock objects and other affiliated source roots can be compiled and packaged in the same project
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Commented: (MCOMPILER-13) New Mojos for compiler and jar
plugins to allow alternate jars
Posted by "Bob Allison (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MCOMPILER-13?page=comments#action_55628 ]
Bob Allison commented on MCOMPILER-13:
--------------------------------------
I should probably add that the mock object sources are in a different source tree than the implementation sources, as opposed to merely needing to filter which classes go in which jar.
> New Mojos for compiler and jar plugins to allow alternate jars
> --------------------------------------------------------------
>
> Key: MCOMPILER-13
> URL: http://jira.codehaus.org/browse/MCOMPILER-13
> Project: Maven 2.x Compiler Plugin
> Type: Bug
> Environment: Linux using JDK 1.5.0_01
> Reporter: Bob Allison
> Attachments: AltCompilerMojo.java, AltJarMojo.java, pom.xml
>
>
> Add mojos so that mock objects and other affiliated source roots can be compiled and packaged in the same project
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Commented: (MNG-1174) New Mojos for compiler and jar plugins to allow alternate jars
Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-1174?page=comments#action_48386 ]
Brett Porter commented on MNG-1174:
-----------------------------------
I think these should possibly be a separate plugin, but am not sure. If its ok, I'm holding off reviewing this until after we have 2.0 out next week.
> New Mojos for compiler and jar plugins to allow alternate jars
> --------------------------------------------------------------
>
> Key: MNG-1174
> URL: http://jira.codehaus.org/browse/MNG-1174
> Project: Maven 2
> Type: Improvement
> Versions: 2.0-beta-3
> Environment: Linux using JDK 1.5.0_01
> Reporter: Bob Allison
> Fix For: 2.0-beta-4
> Attachments: AltCompilerMojo.java, AltJarMojo.java, pom.xml
>
>
> Add mojos so that mock objects and other affiliated source roots can be compiled and packaged in the same project
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Updated: (MNG-1174) New Mojos for compiler and jar plugins to allow alternate jars
Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-1174?page=all ]
John Casey updated MNG-1174:
----------------------------
Component: maven-compiler-plugin
> New Mojos for compiler and jar plugins to allow alternate jars
> --------------------------------------------------------------
>
> Key: MNG-1174
> URL: http://jira.codehaus.org/browse/MNG-1174
> Project: Maven 2
> Type: Improvement
> Components: maven-compiler-plugin
> Versions: 2.0-beta-3
> Environment: Linux using JDK 1.5.0_01
> Reporter: Bob Allison
> Fix For: 2.0.1
> Attachments: AltCompilerMojo.java, AltJarMojo.java, pom.xml
>
>
> Add mojos so that mock objects and other affiliated source roots can be compiled and packaged in the same project
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Commented: (MCOMPILER-13) New Mojos for compiler and jar
plugins to allow alternate jars
Posted by "Bob Allison (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MCOMPILER-13?page=comments#action_55627 ]
Bob Allison commented on MCOMPILER-13:
--------------------------------------
If we use a profile to change the sourceDirectory, how do I do the following in a single build (since this has to run from the reactor):
-- Build the implementation jar (no classifier)
-- Build the mock-object jar (classifier = "mock")
-- Install both jars in the repository for the next module to use
OK, the third is easy if the mock-object jar is added to the artifact list. The main reason for the new Mojos (or altering the existing ones) si so that I can have multiple executions of the compiler and jar Mojos during the same run. If there is a means to do this without altering the existing compiler plugin, I'm all for it (just let me know how to do it).
> New Mojos for compiler and jar plugins to allow alternate jars
> --------------------------------------------------------------
>
> Key: MCOMPILER-13
> URL: http://jira.codehaus.org/browse/MCOMPILER-13
> Project: Maven 2.x Compiler Plugin
> Type: Bug
> Environment: Linux using JDK 1.5.0_01
> Reporter: Bob Allison
> Attachments: AltCompilerMojo.java, AltJarMojo.java, pom.xml
>
>
> Add mojos so that mock objects and other affiliated source roots can be compiled and packaged in the same project
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Updated: (MNG-1174) New Mojos for compiler and jar plugins to allow alternate jars
Posted by "Bob Allison (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-1174?page=all ]
Bob Allison updated MNG-1174:
-----------------------------
Attachment: AltCompilerMojo.java
The AltCompilerMojo is identical to CompilerMojo except:
-- Goal changed to "altcompile"
-- A parameter "suffix" added to allow an easy definition of the file endings to compile
-- Parameter "compileSourceRoots" renamed to "sources" and made editable
-- Parameter "outputDirectory" made editable
> New Mojos for compiler and jar plugins to allow alternate jars
> --------------------------------------------------------------
>
> Key: MNG-1174
> URL: http://jira.codehaus.org/browse/MNG-1174
> Project: Maven 2
> Type: Improvement
> Versions: 2.0-beta-3
> Environment: Linux using JDK 1.5.0_01
> Reporter: Bob Allison
> Fix For: 2.0-beta-4
> Attachments: AltCompilerMojo.java
>
>
> Add mojos so that mock objects and other affiliated source roots can be compiled and packaged in the same project
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Commented: (MNG-1174) New Mojos for compiler and jar plugins to allow alternate jars
Posted by "Bob Allison (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-1174?page=comments#action_48421 ]
Bob Allison commented on MNG-1174:
----------------------------------
Holding off is not a problem.
I had started to try to build this as a separate plugin that leveraged off of the compiler plugin code. Although I could build the plugin with the compiler plugin as a compile dependency, when I tried to use the plugin it failed miserably because the parameters defined in AbstractCompilerMojo were not included in the plugin descriptor (and editing the file didn't help since the descriptor was rewritten the next time I tried to package the plugin even though nothing else had changed).
I'm sure this needs some close review since I just did a simple copy with a couple hacks. There are probably a few things I copied that make it work wrong in some (or most) circumstances. I'm especially unsure about the reference to "Artifact" in the compiler mojo and if I should have taken that out.
One thing that might eliminate the need for these mojos is if the "compileSourceRoots" and "outputDirectory" parameters were made editable. I very much understand why they are read only, since you want the default behavior driven from the POM correctly. Perhaps it might be possible to have these appear twice: one copy is defined editable with no defaults but not marked required, the other copy (with "Pom" on the end) defined as they are now. The plugin could then use the POM-based variables if the user did not specify the editable parameters and fail if the user only specifies one of the editable parameters. (Just a thought...)
> New Mojos for compiler and jar plugins to allow alternate jars
> --------------------------------------------------------------
>
> Key: MNG-1174
> URL: http://jira.codehaus.org/browse/MNG-1174
> Project: Maven 2
> Type: Improvement
> Versions: 2.0-beta-3
> Environment: Linux using JDK 1.5.0_01
> Reporter: Bob Allison
> Fix For: 2.0-beta-4
> Attachments: AltCompilerMojo.java, AltJarMojo.java, pom.xml
>
>
> Add mojos so that mock objects and other affiliated source roots can be compiled and packaged in the same project
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Commented: (MCOMPILER-13) New Mojos for compiler and jar
plugins to allow alternate jars
Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MCOMPILER-13?page=comments#action_55620 ]
Brett Porter commented on MCOMPILER-13:
---------------------------------------
Other plugins that process sources just won't work if we change the sources. I think this is dangerous. It can be modified in a profile by changing sourceDirectory, and using the build helper plugin to add source roots to that list, and still be consistent.
I have no problem with outputDirectory being editable.
Thoughts on making just this change?
> New Mojos for compiler and jar plugins to allow alternate jars
> --------------------------------------------------------------
>
> Key: MCOMPILER-13
> URL: http://jira.codehaus.org/browse/MCOMPILER-13
> Project: Maven 2.x Compiler Plugin
> Type: Bug
> Environment: Linux using JDK 1.5.0_01
> Reporter: Bob Allison
> Attachments: AltCompilerMojo.java, AltJarMojo.java, pom.xml
>
>
> Add mojos so that mock objects and other affiliated source roots can be compiled and packaged in the same project
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Updated: (MNG-1174) New Mojos for compiler and jar plugins to allow alternate jars
Posted by "Bob Allison (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-1174?page=all ]
Bob Allison updated MNG-1174:
-----------------------------
Attachment: AltJarMojo.java
AltJarMojo is identical to JarMojo except:
-- Goal changed to "altjar"
-- Parameter "outputDirectory" renamed to "sourceDirectory" , made editable, and given no default
> New Mojos for compiler and jar plugins to allow alternate jars
> --------------------------------------------------------------
>
> Key: MNG-1174
> URL: http://jira.codehaus.org/browse/MNG-1174
> Project: Maven 2
> Type: Improvement
> Versions: 2.0-beta-3
> Environment: Linux using JDK 1.5.0_01
> Reporter: Bob Allison
> Fix For: 2.0-beta-4
> Attachments: AltCompilerMojo.java, AltJarMojo.java
>
>
> Add mojos so that mock objects and other affiliated source roots can be compiled and packaged in the same project
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org