imagej / imagej-maven-plugin

[OBSOLETE] All goals migrated to scijava/scijava-maven-plugin
Other
4 stars 6 forks source link

Make imagej.app.directory outisde of pom.xml ? #14

Closed hadim closed 8 years ago

hadim commented 8 years ago

I would like to not track imagej.app.directory property by git by putting it outside the pom.xml file. I am using Netbeans for development and so a method compatible with it would be nice :-)

Any idea ?

ctrueden commented 8 years ago

Good idea—specifying that value in your local configuration is much better.

Edit the file ~/.m2/settings.xml (create if it doesn't exist), adding the following:

    <profiles>
        <profile>
            <id>imagej</id>
            <activation>
                <file>
                    <exists>${env.HOME}/Desktop/Fiji.app</exists>
                </file>
            </activation>
            <properties>
                <imagej.app.directory>${env.HOME}/Desktop/Fiji.app</imagej.app.directory>
            </properties>
        </profile>
    </profiles>

You can use whatever <activation> you want. You could also have multiple profiles, one per ImageJ/Fiji installation, which you enable by <id> (e.g., -Pimagej), if needed.

Your NetBeans will then automatically pick up the profile and use it when building.

hadim commented 8 years ago

Exactly what I needed. Thanks ! Le 13 avr. 2016 10:38 AM, "Curtis Rueden" notifications@github.com a écrit :

Edit the file ~/.m2/settings.xml (create if it doesn't exist), adding the following:

<profiles>
    <profile>
        <id>imagej</id>
        <activation>
            <file>
                <exists>${env.HOME}/Desktop/Fiji.app</exists>
            </file>
        </activation>
        <properties>
            <imagej.app.directory>${env.HOME}/Desktop/Fiji.app</imagej.app.directory>
        </properties>
    </profile>
</profiles>

You can use whatever you want. You could also have multiple profiles, one per ImageJ/Fiji installation, which you enable by (e.g., -Pimagej), if needed.

Your NetBeans will then automatically pick up the profile and use it when building.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/imagej/imagej-maven-plugin/issues/14#issuecomment-209478282