-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Allow URL(s) as source in jsonschema2pojo-gradle-plugin #1554
Conversation
Looks like JsonSchemaPluginSpec::java is executed prior snapshot artifact is generated causing build failure. @joelittlejohn any thoughts on how to proceed ? One way to validate my claim would be to rename <plugin>
<!-- switch off surefire, there's no unit tests in this module -->
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin> |
Ah yes, thanks @unkish. I had noticed this a while back, when there was some problem in the plugin but it did not get shown until after an I think your solution to use failsafe instead of surefire and attach it to a later phase is a good one 👍 Is this ready to merge now? |
In last change that succeeded I've split test into unit (jsonschema2pojo-gradle-plugin/src/test/groovy/org/jsonschema2pojo/gradle/JsonSchemaPluginSpec.groovy) and integration test (jsonschema2pojo-gradle-plugin/src/integrationTest/groovy/org/jsonschema2pojo/gradle/GradleBuildIT.groovy) and configured I can switch it to run only |
@joelittlejohn adjusted |
Sorry @unkish I misunderstood. I didn't realise there were unit tests. I'm happy to use surefire and failsafe, each for the appropriate kind of test. |
@joelittlejohn no worries. I have one concern though: it seems that at present github actions will skip integration tests in - name: Verify with Maven
run: mvn verify -B will not trigger it since - name: Install latest jsonschema2pojo SNAPSHOT
run: mvn -U -B install -DskipTests -Dmaven.javadoc.skip -Dmaven.site.skip will not trigger it due - name: Verify with Maven
run: mvn verify -B
- name: Verify jsonschema2pojo-gradle-plugin integration tests
run: mvn -U -B install -DskipTests -Dmaven.javadoc.skip -Dmaven.site.skip -pl jsonschema2pojo-gradle-plugin -am
run: mvn -U -B install -pl jsonschema2pojo-gradle-plugin would "remedy" the issue, however I'm not sure whether it is an overall good solution or not |
Closes #1010
Seems it got broken with #748, specifically this line.
Note: users would have to explicitly invoke
clean
whenever they have URL as source and know that content behind URL has changed