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

Provide Maven build of plugin #371

Open
de-jcup opened this issue Sep 17, 2021 · 27 comments · May be fixed by #423
Open

Provide Maven build of plugin #371

de-jcup opened this issue Sep 17, 2021 · 27 comments · May be fixed by #423
Assignees
Labels
build enhancement New feature or request help wanted Extra attention is needed

Comments

@de-jcup
Copy link
Owner

de-jcup commented Sep 17, 2021

Situation

The gradle build does not build eclipse parts but only the "normal" parts. Reason: Problems with eclipse dependencies, OSGI etc.

Wanted

Automate the complete build process.

Solution

If we change the build to maven tycho we could completely automate the process

@de-jcup de-jcup added build enhancement New feature or request help wanted Extra attention is needed labels Sep 17, 2021
@de-jcup
Copy link
Owner Author

de-jcup commented Sep 17, 2021

@vogella : Maybe you could help here?

@vogella
Copy link
Collaborator

vogella commented Sep 17, 2021

Absolutely.

vogella added a commit to vogellacompany/eclipse-asciidoctor-editor that referenced this issue Sep 17, 2021
Currently not building anything just setting up the build and Github
action

For de-jcup#371
vogella added a commit to vogellacompany/eclipse-asciidoctor-editor that referenced this issue Sep 17, 2021
@de-jcup
Copy link
Owner Author

de-jcup commented Sep 17, 2021

Here some pre-requisites :

Some additional information:

Something I would appreciate:

  • Should still work with Java 8, so even very old eclipse versions could use the plugin
  • Maven standard parts + tycho only
  • Keep existing folder structure if possible (multi project build)

@vogella
Copy link
Collaborator

vogella commented Sep 17, 2021

The plan is to replace the Gradle build with Maven or do you plan to keep both?

vogella added a commit to vogellacompany/eclipse-asciidoctor-editor that referenced this issue Sep 17, 2021
Currently not building anything just setting up the build and Github
action
Using the target platform during the Maven build and build the css
plug-in

For de-jcup#371
vogella added a commit to vogellacompany/eclipse-asciidoctor-editor that referenced this issue Sep 17, 2021
Currently not building anything just setting up the build and Github
action
Using the target platform during the Maven build and build the css
plug-in

For de-jcup#371
vogella added a commit to vogellacompany/eclipse-asciidoctor-editor that referenced this issue Sep 17, 2021
Currently not building anything just setting up the build and Github
action
Using the target platform during the Maven build and build the css
plug-in

For de-jcup#371
vogella added a commit to vogellacompany/eclipse-asciidoctor-editor that referenced this issue Sep 17, 2021
Currently not building anything just setting up the build and Github
action
Using the target platform during the Maven build and build the css
plug-in

For de-jcup#371
@vogella
Copy link
Collaborator

vogella commented Sep 17, 2021

Please see #372 for the initial setup. For the necessary libraries, I would not know where to search them. If they are available via Maven central you can add them to the target platform via M2e integration, see here https://www.vogella.com/tutorials/EclipseJarToPlugin/article.html

I hope this help, I don't think I would be very efficient trying to add the libs. Can you handle that?

@de-jcup
Copy link
Owner Author

de-jcup commented Sep 17, 2021

@vogella : Thank you very much. I will check the PR and tryout to add the libs etc. If I have still questions I will ask you then.

@de-jcup de-jcup self-assigned this Sep 17, 2021
@vogella
Copy link
Collaborator

vogella commented Sep 17, 2021

Sure and thanks. Adding more plug-ins is just a question of adding path to the pom.xml. It is a bit more complex for test plug-ins. Once the libs are there, I can do this. Maybe we can do this in your repo directly in a branch? Could you give me write access?

@de-jcup
Copy link
Owner Author

de-jcup commented Sep 17, 2021

The plan is to replace the Gradle build with Maven or do you plan to keep both?

  • I think there should be only one build system.
  • When all gradle tasks are replaced by maven pendants (and more...) and github actions are updated as well, we should remove the gradle parts completely.

@de-jcup de-jcup linked a pull request Sep 17, 2021 that will close this issue
@de-jcup
Copy link
Owner Author

de-jcup commented Sep 17, 2021

Sure and thanks. Adding more plug-ins is just a question of adding path to the pom.xml. It is a bit more complex for test plug-ins. Once the libs are there, I can do this. Maybe we can do this in your repo directly in a branch? Could you give me write access?

I just invited you.

@de-jcup
Copy link
Owner Author

de-jcup commented Sep 17, 2021

Just as an information: My eclipse commons library is currently directly added into GIT. With #373 this will become a maven dependency as well. The library is just one central library to "not reinvent the wheel" and is used in most of my eclipse plugins.

@de-jcup de-jcup removed a link to a pull request Sep 17, 2021
@de-jcup
Copy link
Owner Author

de-jcup commented Sep 17, 2021

#372 is the first step but PR will not close this issue, so removed the former link.

vogella added a commit that referenced this issue Sep 28, 2021
No functional impact but suggested by @de-jcup


For #371
@vogella
Copy link
Collaborator

vogella commented Sep 28, 2021

Any news with asp-server-asciidoctorj-launcher-dist.jar? It is required by de.jcup.asciidoctoreditor and IIRC you were planning to add it to Maven? Alternative you could also add the JAR to the the lib folder so that we can continue with the update of the build and remove it later once you moved it to Maven central.

@de-jcup
Copy link
Owner Author

de-jcup commented Oct 29, 2021

Any news with asp-server-asciidoctorj-launcher-dist.jar? It is required by de.jcup.asciidoctoreditor and IIRC you were planning to add it to Maven? Alternative you could also add the JAR to the the lib folder so that we can continue with the update of the build and remove it later once you moved it to Maven central.

Hello @vogella , sorry for the late response, was very busy. I just created de-jcup/asp#39 to address the problem.

@vogella
Copy link
Collaborator

vogella commented Nov 1, 2021

I'm a bit confused. What do we want to do as a next step?

@vogella
Copy link
Collaborator

vogella commented Feb 3, 2022

@de-jcup any updates from your side?

de-jcup added a commit that referenced this issue Feb 4, 2022
- added commons-io 2.7 (originally used io 2.6 but had a vulnerability
  so used 2.7 now to too many issues with upgrade at the moment
- added eclipse-commons 1.0.0 dependency
- added asciidoctor j launcher dependency
de-jcup added a commit that referenced this issue Feb 4, 2022
- unfortunately the runtime dependencies (asciidoctorj for example)
  seems to be not resolved by asciidoctor-editor-target
@de-jcup
Copy link
Owner Author

de-jcup commented Feb 4, 2022

Update:

I have added the dependencies as PDT dependencies in last commits,, but there are still some problems.
For example: https://mvnrepository.com/artifact/de.jcup.asp/asp-server-asciidoctorj/1.3.1 contains the ASP server and has a runtime dependencies (e.g. asciidoctorj, asciidoctorj-pdf, ... more). The problem here is, that PDT maven dependencies does only show up/ handle compile dependencies.

de-jcup added a commit that referenced this issue Mar 25, 2022
vogella added a commit that referenced this issue Mar 25, 2022
Also removes commented reference to libs project.

For #371

Requires de-jcup/eclipse-commons#39
vogella added a commit that referenced this issue Mar 25, 2022
de-jcup added a commit that referenced this issue Mar 25, 2022
- eclipse commons dependency do now work
- switched also back to asp 1.3.1 because in
  asp 1.4.0 there are breaking changes which must be still
  fixed in master branch and are not necessary to migrate
  from gradle to maven build, so we use here 1.3.1
- added target to .gitignore because we want no build output
  inside git
de-jcup added a commit that referenced this issue Apr 3, 2022
- using now asp 1.3.2 which provides used asciidoctorj api version
  as a compile dependency
- added the asciidoctor api dependency to MANIFEST.MF as well
@vogella
Copy link
Collaborator

vogella commented Apr 11, 2022

@de-jcup anything left here?

Repository owner deleted a comment from de-jcup Apr 11, 2022
@de-jcup
Copy link
Owner Author

de-jcup commented Apr 16, 2022

There are still some steps to do:

  • We must reintegrate the library plugin to the maven build

    Reason:

    • the library plugin was designed to have all ASP/AsciidoctorJ dependencies inside
    • at runtime for ASP the library ASP jar was used to start the ASP.
    • also we wanted to have new features/bugfixes editor releases updated without downloading same dependencies again, even when we have changed just one line inside editor plugin. So hotfix releases do only need some hundred Kilobytes instead also downloading ASP/AsciidocotorJ parts which are many MB.
  • Currently at runtime the ASP lauch mechanism will not work

  • ASPSupport.java

 File aspFolder = PluginContentInstaller.INSTANCE.getLibsFolder();
 File aspServer = new File(aspFolder, "asp-server-asciidoctorj-dist.jar");
  ...
 aspServerAdapter.setPathToServerJar(aspServer.getAbsolutePath());

We need the complete dist jar to launch. Also the maven central version number is currently not supported here.

@vogella
Copy link
Collaborator

vogella commented Apr 22, 2022

We must reintegrate the library plugin to the maven build

As we source from Maven only changed parts will be included in the new build and downloaded.

Currently at runtime the ASP lauch mechanism will not work

If the server is part of the classpath of the plugin you can start it directly from the plug-in

@de-jcup
Copy link
Owner Author

de-jcup commented May 5, 2022

I want to separate the download not for development, but for the users (update time)

For example:
I released V2.5.0 of the editor plugin (old style with gradle) some days ago with library plugin 2.4.0 dependency which contains ASP 1.4.1

Some hours ago I fixed a serious bug and released V2.5.1 which uses again library plugin 2.4.0

Because the only changes were done inside the editor plugin the users only needed to download ~ 1 MB for the editor plugin and not ~ 50 MB with the complete ASP server.

So this means

  • we can deploy faster
  • updates by users are faster
  • we produce less network traffic at all
    (I know at these days 50 MB should not really matter, but if somebody has a weak internet connection it could matter
    and it is easy to optimize here, so ...)

@vogella
Copy link
Collaborator

vogella commented May 5, 2022

Still don't understand. If the Maven dependencies are not updated they will also not be updated hence you will not see big updatesd if you only update the core plug-in

de-jcup added a commit that referenced this issue May 6, 2022
- with "mvn clean verify" the update site will be now build
  completely automatically and contains the libraries inside, so
  no longer a need for a big dist jar!
- currently the library jars which do not include a OSGI manifest
  information are handled as "wrapped..." dependencies
@de-jcup de-jcup linked a pull request May 6, 2022 that will close this issue
de-jcup added a commit that referenced this issue Aug 28, 2022
de-jcup added a commit that referenced this issue Aug 28, 2022
- built main plugin did not contain any classes.
  The reason was the missing entry.
@de-jcup
Copy link
Owner Author

de-jcup commented Aug 28, 2022

Remark: The former two commits did also merge the current master (containing changes for 3.0.0) into this branch.

@vogella
Copy link
Collaborator

vogella commented Sep 22, 2023

Consumption of Maven libraries via the Tycho build is now also common practice for the platform build and all of my clients. As soon as the libraries are available via Maven central building this plug-in via Maven Tycho is trivial.

@de-jcup
Copy link
Owner Author

de-jcup commented Jan 16, 2024

@vogella : I am still running out of time and I did invest much time to get it working in any way (and failed). Currently I cannot work on it.

@vogella
Copy link
Collaborator

vogella commented Jan 16, 2024

No worries we all have time restrictions. If all lib requirements would be at Maven central or a P2 update site setting up a Tycho build would be trivial and I could provide it.

Maybe providing a P2 repo for the dependencies would be possible in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants