Dennis Lundberg wrote:
Dan Hardiker wrote:
Hi,
First I must say that I love this plugin! It's going to save me any
my team so much time setting up our system when we change projects /
move development environments. There is just one area which is
lacking - Run/Debug configurations can't be defined in the pom.xml to
be generated in the project.
Each of us have a standing debug configuration which points to our
test container (individual to each dev system) which I would like to
be added to each project when generated - I guess that the
configuration for this would go into settings.xml. There are then run
configurations specific to the project in question - which would go
into the pom.xml.
Now that I've figured out where the configuration data should go, I
just need to work out if its possible to have "mvn idea:idea" use it?
If not, who deals with the project - as a Java developer myself, I'm
not shy of jumping in and extending it.
Thanks for any help / pointers anyone can provide,
--
Dan Hardiker
Adaptavist.com Ltd
Hi Dan,
There is a feature request similar to yours in JIRA [1].
Feel free to poke around in the code [2] for the plugin [3]. I'd
suggest adding a new parameter to the appropriate Mojo that takes a
filename to an IPR snippet.
If you have any question, don't hesitate to ask on the list.
[1] http://jira.codehaus.org/browse/MIDEA-76
[2]
http://maven.apache.org/plugins/maven-idea-plugin/source-repository.html
[3] http://maven.apache.org/plugins/maven-idea-plugin/
Hi Dennis,
Any suggestions on how to achieve the goal of taking a xml file and
merging it in?
I've thought through a couple of approaches but all have their pitfalls.
For example; if I take the xml file provided and merge it by looking up
each element in the path, creating any missing elements and overwriting
any attributes - then I need to work out whether to create, or just to
use the existing one. In the case of components, I need to look at the
name - in the case of run configurations, two can share the same name.
Another option I thought of is having a custom xml format which picks
from a list of scopes (workspace/project/module) and provides and xpath
in which to inject/merge the xml enclosed, or delete the target node.
Here is an example:
<?xml version="1.0" encoding="UTF-8"?>
<maven-idea-plugin>
<modification scope="workspace"
xpath="//project/[EMAIL PROTECTED]'RunManager'" mode="merge">
<component name="RunManager" selected="Remote.Test Config">
<configuration default="false" name="Test Config"
type="Remote" factoryName="Remote">
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" value="javadebug" />
<option name="HOST" value="localhost" />
<option name="PORT" value="5005" />
<RunnerSettings RunnerId="Profile ">
<option name="myExternalizedOptions"
value=" snapshots-dir= " />
</RunnerSettings>
<method>
<option name="Make" value="false" />
</method>
</configuration>
</component>
</modification>
</maven-idea-plugin>
I'm not sure if that makes things too complex to be used?
I can write something which just injects <configuration>'s into the
project > [EMAIL PROTECTED]'RunManager' element, but that doesn't fit the
wider purpose that you were suggesting.
Suggestions as to how to proceed? I don't want to spend time
implementing a solution that is unlikely to be accepted.
--
Dan Hardiker
Adaptavist.com Ltd
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]