Franz, this rocks. Thanks a lot!

Best regards,
Steffen

franz see schrieb:
Good day to you, Steffan,

Yes, that would do just fine. You can have something like

...
    <profile>
      <id>add-examples-that-compile-only-if-eclipse-is-installed</id>
      <activation>
        <property>
          <name>eclipse.dir</name>
        </property>
      </activation>
      <modules>
        <module>example-that-compiles-if-eclipse-is-installed</module>
      </modules>
    </profile>
...

This profile will add the module
"example-that-compiles-if-eclipse-is-installed" if eclipse.dir is set.

Or if you know exactly where your eclipse executable should be placed, you
can do
...
    <profile>
      <id>add-examples-that-compile-only-if-eclipse-is-installed</id>
      <activation>
        <file>
          <exists>C:\Location\Of\Eclipse\Executable\eclipse.exe</exists>
        </file>
      </activation>
      <modules>
        <module>example-that-compiles-if-eclipse-is-installed</module>
      </modules>
    </profile>
...

Note: properties can not be used in file activation ( if you wish properties
to be used, kindly file a jira issue ). See [1] for more details.

Cheers,
Franz

[1] http://docs.codehaus.org/display/MAVENUSER/Profiles


Steffen Mazanek-4 wrote:
I have defined a property eclipse.dir in my settings.xml. Is it possible to skip a submodule completely whenever eclipse.dir is not set? Or to check whether eclipse.dir is a valid path?
What is best practice?

Eric: I am pretty new to maven so I would be very happy if you could work out the
details of your approach a bit more.

Best regards,

Steffen

Eric Redmond schrieb:
Check out build profiles. You can check for the existance of some tell-tale
eclipse installation, such as the eclipse executable file.

http://maven.apache.org/pom.html

Eric

On 4/2/07, Steffen Mazanek <[EMAIL PROTECTED]> wrote:
Hello,

I have something like the following project layout:

-project
-- library
-- program
-- examples
     -- examples-that-compile-only-if-eclipse-is-installed
     -- examples-that-do-not-need-eclipse

Concretely I use eclipse in headless mode to generate
some sources via maven-emfgen-plugin.

How can I tell maven to skip the examples depending on eclipse
if eclipse is not installed. Can I do this via profiles?

Any help is greatly appreciated!


Best regards,

Steffen Mazanek


---------------------------------------------------------------------
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]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to