Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix maven lifecycle-usage #108

Merged
merged 1 commit into from Apr 30, 2015

Conversation

FibreFoX
Copy link
Member

Before this changes, calling "jfx:jar"/"jfx:native" via CLI was mixing lifecycle and direct-call.
Now its possible to have this kind of configuration:

<plugin>
    <groupId>com.zenjava</groupId>
    <artifactId>javafx-maven-plugin</artifactId>
    <version>8.1.3-SNAPSHOT</version>
    <configuration>
        <updateExistingJar>true</updateExistingJar>

        <mainClass>javafx_and_proguard.MainApp</mainClass>
    </configuration>
    <executions>
        <execution>
            <id>create-jfxjar</id>
            <phase>package</phase>
            <goals>
                <goal>build-jar</goal>
            </goals>
        </execution>
        <execution>
            <id>create-native-mac</id>
            <phase>package</phase>
            <goals>
                <goal>build-native</goal>
            </goals>
            <configuration>
                <keyStoreAlias>example-user</keyStoreAlias>
                <keyStorePassword>example-password</keyStorePassword>
                <allPermissions>true</allPermissions>

                <bundler>mac.app</bundler>
            </configuration>
        </execution>
    </executions>
</plugin>

This allows to have encryption/obfruscation/etc. and javafx-maven-plugin within regular "mvn install" call.

Now this is possible to create javafx-jar/installer:

  • mvn install (with configured phases)
  • mvn jfx:jar
  • mvn jfx:native

When having both mixed, configured executions are skipped.

(to mention it: Fixed license-header and removed deprecated preloader-field of native-mojo)

Before this changes, calling "jfx:jar"/"jfx:native" via CLI was mixing lifecycle and direct-call.
Now its possible to have this kind of configuration:
```
<plugin>
    <groupId>com.zenjava</groupId>
    <artifactId>javafx-maven-plugin</artifactId>
    <version>8.1.3-SNAPSHOT</version>
    <configuration>
        <updateExistingJar>true</updateExistingJar>

        <mainClass>javafx_and_proguard.MainApp</mainClass>
    </configuration>
    <executions>
        <execution>
            <id>create-jfxjar</id>
            <phase>package</phase>
            <goals>
                <goal>build-jar</goal>
            </goals>
        </execution>
        <execution>
            <id>create-native-mac</id>
            <phase>package</phase>
            <goals>
                <goal>build-native</goal>
            </goals>
            <configuration>
                <keyStoreAlias>example-user</keyStoreAlias>
                <keyStorePassword>example-password</keyStorePassword>
                <allPermissions>true</allPermissions>

                <bundler>mac.app</bundler>
            </configuration>
        </execution>
    </executions>
</plugin>
```

This allows to have encryption/obfruscation/etc. and javafx-maven-plugin within regular "mvn install" call.

Now this is possible to create javafx-jar/installer:
* ```mvn install (with configured phases)```
* ```mvn jfx:jar```
* ```mvn jfx:native```

When having both mixed, configured executions are skipped.

(to mention it: Fixed license-header and removed deprecated preloader-field of native-mojo)
@FibreFoX
Copy link
Member Author

the new goals for package-phase are these:

  • build-jar
  • build-native

@FibreFoX
Copy link
Member Author

@maxd can you check this PR for me?

@FibreFoX
Copy link
Member Author

This PR is ment to be a fix for these issues: #64 #65 #82

@maxd
Copy link
Contributor

maxd commented Apr 29, 2015

I have tested it right now. All works fine. Problem with duplicate build phases is solved. 👍

@FibreFoX FibreFoX merged commit 28ed8f9 into javafx-maven-plugin:master Apr 30, 2015
@FibreFoX FibreFoX deleted the lifecycle-bugfix branch March 8, 2016 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants