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

support maven system dependency #2230

Closed
sheiy opened this issue Mar 18, 2024 · 8 comments · Fixed by #2328
Closed

support maven system dependency #2230

sheiy opened this issue Mar 18, 2024 · 8 comments · Fixed by #2328
Assignees
Labels
enhancement New feature or request hilla Issues related to Hilla

Comments

@sheiy
Copy link

sheiy commented Mar 18, 2024

Describe your motivation

support maven system scope dependency

  <dependency>
            <groupId>taobao</groupId>
            <artifactId>sdk-java</artifactId>
            <version>auto_1709828590347-20240314</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/lib/taobao-sdk-java-auto_1709828590347-20240314.jar</systemPath>
        </dependency>
<plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <includeSystemScope>true</includeSystemScope>
                </configuration>
            </plugin>

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

@sheiy sheiy added enhancement New feature or request hilla Issues related to Hilla labels Mar 18, 2024
@Artur-
Copy link
Member

Artur- commented Mar 18, 2024

Not sure what exactly you are looking for here but it seems like system dependencies are discouraged by Maven: https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#system-dependencies

@Legioth
Copy link
Member

Legioth commented Mar 18, 2024

What would this feature help you achieve? Could there be another way of achieving that without relying on deprecated features?

@sheiy
Copy link
Author

sheiy commented Mar 18, 2024

Because in some cases, the jar files used are provided by third-party companies and not published in any Maven repository; So at this point, it needs to be used as a system scope and packaged into a jar package during exec maven package; Spring boot maven plugin supports configuration <includeSystemScope>true</includeSystemScope> which can effectively solve my problem; But Hilla will report an error.
For now. I install the jar file with mvn install:install-file to solve this problem. But it is not a good experience

@Legioth
Copy link
Member

Legioth commented Apr 2, 2024

For reference, this is the discussion that lead to including this feature in Spring Boot. spring-projects/spring-boot#2224

To me, the key point is really this comment:

Usecase where I see this is with some wrapper libraries not available in maven - and CI server being operated centrally and not liking people adding stuff to repositories on their own, or running own repositories.

@Legioth
Copy link
Member

Legioth commented Apr 2, 2024

...and here's a discussion related to why the Maven maintainers think that the system scope should be deprecated: https://issues.apache.org/jira/browse/MNG-6523

My interpretation is that Maven has this feature for other purposes and the Maven maintainers think the way it's actually used is wrong and shouldn't be needed in a perfect world. They think you should make the world perfect rather than relying on Maven to officially support the current state of the world.

@platosha
Copy link
Contributor

platosha commented Apr 9, 2024

Let's follow what Spring Boot does here: add a property flag that enables this.

@platosha
Copy link
Contributor

platosha commented Apr 9, 2024

As part of the solution, let us verify that Hilla supports entities from system dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hilla Issues related to Hilla
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants