Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Add devtools support #532

Closed
sdeleuze opened this issue Feb 28, 2021 · 4 comments
Closed

Add devtools support #532

sdeleuze opened this issue Feb 28, 2021 · 4 comments
Assignees
Labels
type: compatibility Native image compatibility issue
Milestone

Comments

@sdeleuze
Copy link
Contributor

sdeleuze commented Feb 28, 2021

See #528 (comment)

@Ortega-Dan
Copy link

Ortega-Dan commented Mar 15, 2021

I just want to subscribe to this issue, but doing it by asking a question.
First of all, thanks all for this awesome project ! This is really awesome for the Java ecosystem.
Second, the question ... no pressure, but as a way to add information on what is going on:
Is there any estimated time for this feature ?
What is missing ? or what can be done to help with this ?

@Haarolean
Copy link

I'm gonna post this here to let others who google this stuff will know a workaround:

Could not generate spring.factories source code: Devtools is not supported yet, please remove the related dependency for now.
Let's assume you're building an image for prod and not planning running it locally with devtools.
You could do this:

Create 2 maven profiles, one for prod (native image), the other one for local debug

<profiles>
    <profile>
        <id>native</id>
        <dependencies>
            <dependency>
                <groupId>org.springframework.experimental</groupId>
                <artifactId>spring-native</artifactId>
                <version>${spring-native.version}</version>
            </dependency>
        </dependencies>
    </profile>
    <profile>
        <id>local</id>
        <dependencies>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-devtools</artifactId>
                <scope>runtime</scope>
                <optional>true</optional>
            </dependency>
        </dependencies>
    </profile>
</profiles>

Now you can activate one of the profiles for different purposes.
Also you can add this to activate one of the profiles by default:

<profile>
    <activation>
        <activeByDefault>true</activeByDefault>
    </activation>
</profile>

@bclozel bclozel assigned bclozel and snicoll and unassigned bclozel Apr 27, 2021
@jamesward
Copy link

This is closed but I'm still seeing the following in the generateAot task:

Caused by: java.lang.IllegalStateException: Devtools is not supported yet, please remove the related dependency for now.

@sdeleuze
Copy link
Contributor Author

sdeleuze commented Jan 3, 2022

Good catch, I have created #1419 related issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: compatibility Native image compatibility issue
Development

No branches or pull requests

6 participants