Project crystal
Opened this issue · 6 comments
I think of adding targets
to plugin option so if build
and test
not present in the project.json
or the project.json
is not present. This will be added automatically:
{
"targets": [
{
"defaultName": "build",
"customName": "build-maven",
"defaultTask": "install"
},
{
"defaultName": "test",
"customName": "test-maven",
"defaultTask": "test"
},
{
"defaultName": "ktlint",
"defaultTask": "antrun:run@ktlint"
}
]
}
the customName will be optional.
we should use task from Nx default targets first and if not present we use defaultTask from plugin options.
Im curious how crystal can help with the maven integration. On another note, we could contribute migrators as we currently maintain them ourselves but would be good to put them where they belong?
New design:
{
"mavenRootDirectory": "nx-maven",
"localRepoRelativePath: ".m2/repository",
"buildTargetName": "build-maven",
"testTargetName": "test-maven",
"targets": [
{
"target": "build-maven",
"defaultTask": "install"
},
{
"target": "test-maven",
"defaultTask": "test"
},
{
"target": "ktlint",
"defaultTask": "antrun:run@ktlint"
}
]
}
I like the *TargetName options.
would make targets optional and change defaultTask to task
I already added buildTargetName
to the plugin options: 628c80f
I believe we need more than one task:
{
"target": "build-maven",
"appTask": "compile -DskipTests=true",
"libTask": "install -DskipTests=true",
"defaultTask": "install"
},
{
"mavenRootDirectory": ".",
"localRepoRelativePath: ".m2/repository",
"lintTargetName": "maven-lint",
"formatTargetName": "maven-format",
"testTargetName": "maven-test",
"buildTargetName": "maven-build",
"releaseTargetName": "maven-release",
"e2eTargetName": "maven-e2e"
"targets": [
{
"target": "testTargetName",
"task": "test"
},
{
"target": "buildTargetName",
"task": "clean install -DskipTests=true"
},
{
"target": "releaseTargetName",
"task": "deploy -DskipTests=true"
}
...
]
}
An issue here is that there is allot of rebuilding going on. Would be nice to have something like
- call mvn surefire:test for tests
- release with {packaging}:{packaging} deploy:deploy to not rebuild again. Would need to check the pom.xml for the packaging type in the plugin
- call mvn failsafe:integration-test for e2e