I am happy to announce that the Saros project switched to a new development environment:
* JDK 8 for all components
* Gradle as build tool (previous tool: "ant")
* Eclipse Neon 4.6 (previous version: 3.7)
Because of these fundamental changes it is necessary to set-up your eclipse development environment again and adjust your IntelliJ environment. See the new development environment documentation [1] for more information.
If you have any issues with the new set-up, please send me an email (or this group) or open a new issue.
If you want to change the referenced documentation, create a pull request that changes the corresponding markdown file in the "docs" directory [2] in the saros repository. See [3] for more information.
I know that even JDK 8 has "End of Free Public Updates" (for Oracle JDK) at January 2019 and Eclipse Neon is not the
last eclipse version, but the new build environment should simplify the switch to new versions.
Further improvements will follow (e.g. simplify the Travis/Docker setup in order to reduce the build time).
BR,
Kelvin
[1] - http://saros-project.github.io/saros/contribute/development-environment.html
[2] - https://github.com/saros-project/saros/tree/master/docs
[3] - http://saros-project.github.io/saros/contribute/documentation.html
Hello Kelvin,
Hello Saros-Developers,
Running prepareEclipse or sarosEclipse produce the following failure:
..
Add plugin: org.w3c.dom.smil
Add plugin: org.w3c.dom.svg
> Task :mavenizeP2Repository_1 FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':mavenizeP2Repository_1'.
> Problem: failed to create task or type pom
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken
place.
..
I've done all the mentioned steps in the new set Up website. Any hint on how to overcome this?
Greetings,
Christian
Hi,
did you try to execute the task on the current master branch HEAD or did you changed something?
Have you changed a MANIFEST.MF file?
BR,
Kelvin
from what I can tell the problem is some missing dependency (restyled debug output for readability) :
[org.gradle.api.internal.project.ant.AntLoggingAdapter]
parsing buildfile jar:file:/C:/Users/Abdullah/.gradle/wrapper/dists/gradle-4.10.1-bin/4homep1wqei7q35i17vhsr7k8/gradle-4.10.1/lib/ant-1.9.11.jar!/org/apache/tools/ant/antlib.xml
with URI = jar:file:/C:/Users/Abdullah/.gradle/wrapper/dists/gradle-4.10.1-bin/4homep1wqei7q35i17vhsr7k8/gradle-4.10.1/lib/ant-1.9.11.jar!/org/apache/tools/ant/antlib.xml
from a zip file
[org.gradle.api.internal.project.ant.AntLoggingAdapter]
dropping E:\Uni\Abschlussarbeit\New-Saros-git\file from path as it doesn't exist
[org.gradle.api.internal.project.ant.AntLoggingAdapter]
dropping E:\C from path as it doesn't exist
[org.gradle.api.internal.project.ant.AntLoggingAdapter]
dropping E:\Users\Abdullah \.gradle\caches\modules-2\files-2.1\org.apache.maven\maven-ant-tasks\2.1.3\b09be554228d66d208e5fef5266844aacf443abc\maven-ant-tasks-2.1.3.jar
from path as it doesn't exist
[org.gradle.api.internal.project.ant.AntLoggingAdapter]
[ant:taskdef] Could not load definitions from resource org/apache/maven/artifact/ant/antlib.xml.
It could not be found.
a quick search lead me to this [1]
some questions that popped to my mind, is the new build somehow internally using the old ant build method? or are the external dependencies themselves being built using ant? the problem might by OS dependant?
regards,
Abdullah
[1] - http://forum.broadleafcommerce.org/viewtopic.php?t=176
Thank you very much, that actually solved the problem.
The solution (or at least for my case):
add the following line to the beginning of the gradlew script:
set GRADLE_USER_HOME=path/to/any/folder/on/same/partition/as/Saros
I guess for a linux machine you would replace set with export
then run ./gradlew prepareEclipse
thanks again.
You have the same issue, but your setup worked before? This is strange.
Does the workaround with GRADLE_USER_HOME also work for you? It seems as if it is a common issue with windows and multiple drives.
The path in GRADLE_HOME specifies the location of the gradle distribution, but the path in GRADLE_USER_HOME specified the location of caches and compiled build scripts [1].
It is possible to add custom properties in the gradle wrapper. We could add the property "-Dgradle.user.home=$SAROS_GRADLE_USER_HOME" (if SAROS_GRADLE_USER_HOME is set) in the gradle wrapper. This allows us to set the GRADLE_USER_HOME just for saros.
Would this solution help you?
BR,
Kelvin
[1] - https://docs.gradle.org/current/dsl/org.gradle.api.invocation.Gradle.html
I did not found an option in the gradle-intellij-plugin to deactivate the automatic intellij download if no installation is provided.
Another approach is to avoid the whole intellij configuration:
Our project is organized into multiple subprojects. The gradle execution process is divided into three stages [1]:
*initialization*: determine which subprojects are in the project
*configure*: configure all subprojects
*execute*: execute tasks to be executed
It is possible to hook into the initialization stage (with modifying the settings.gradle) and add conditional subproject excludes (and exlude intellij/eclipse) if environment var XY is set.
I want to avoid this, because this would extremely increase the complexity of our build process and gradle build description. If you exclude the project in the initialization the project is totally unknown by gradle and you have to wrap all configurations in the main build.gradle in a corresponding check whether the project is included. If the current state really hurts we can think about it.
The mavenizeP2Repository task takes ~2min, but you have only to execute the task in order to initialize the eclipse setup. If you build always via gradle the task is always execute, but we could add a check whether the execution is necessary.
I know that the solution with converting the P2Repository is not perfect. I would prefer a solution that parses the MANIFEST.MF and only converts artifacts that are required (or even better the dependency can be resolved in a P2Repository).
I tried a lot of approaches to build the whole project and the current approach was the only one which also supports all IDE workflows.
BR,
Kelvin
[1] - https://docs.gradle.org/current/userguide/build_lifecycle.html