First of all I know that http 502 on gcloud means any possible error.
Also, in logs there are no errors only standard spring boot info and debug messages.
The project I have troubles is a swagger generated spring boot java project (more than 160 java files).
Locally on intellij works well and fast.
After executing mvn clean spring-boot:run on gclod shell the project starts and I see the default generated page on the browser.
After executing mvn appengine:deploy on gclod shell I always see this message on the browser:
Error: Server Error The server encountered a temporary error and could not complete your request. Please try again in 30 seconds
or This error: 502 Bad Gateway nginx. Always.
This are the last messages from gcloud console (after mvn appengine:deploy):
..done.
[INFO] GCLOUD: Setting traffic split for service [default]...
[INFO] GCLOUD: ...................................done.
[INFO] GCLOUD: Deployed service [default] to [https://polishapi-psd2.appspot.com]
[INFO] GCLOUD:
[INFO] GCLOUD: You can stream logs from the command line by running:
[INFO] GCLOUD: $ gcloud app logs tail -s default
[INFO] GCLOUD:
[INFO] GCLOUD: To view your application in the web browser run:
[INFO] GCLOUD: $ gcloud app browse
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16:07 min
[INFO] Finished at: 2019-12-18T14:11:30+01:00
[INFO] ------------------------------------------------------------------------
C:\workspace\PolishAPI-psd2>gcloud app logs tail
In logs there are no errors.
A basic, super simple, spring boot "hello world" project works but not that swagger generated big one.
How to deal with this problem?
Thank you.
After dealing with this problem for more than 4 weeks I discovered that the app.yaml file should only contain this two lines:
runtime: java11
instance_class: F4
yes! only this two lines are enought to run on gcloud that swagger generated project.
There are so many different samples on stackoverflow, github, etc. including unalike sample app.yaml files made by google for the same task and the answer is so simple.
Best regards! :)
Exact same issue , i am having for this sample https://github.com/GoogleCloudPlatform/java-docs-samples/tree/master/appengine-java8/helloworld-springboot
Followed the two lines it worked.
runtime: java11
instance_class: F4
By analogy with the answers above, the following helped:
runtime: java
env: flex
instance_class: B4
manual_scaling:
instances: 1
resources:
memory_gb: 4
It can also be used if necessary automatic_scaling and instance_class F4.
Related
Recently I discovered fly.io as an alternative to Heroku, where they stop to provide their free dynos from November 28th on. There's a guide for how to use Deno mit fly.io and Buildpacks, but non for Spring Boot / Java.
Also I read about the build section in the fly.toml in the docs. Their it's stated to define a builder and buildpacks like this:
[build]
builder = "paketobuildpacks/builder:base"
buildpacks = ["gcr.io/paketo-buildpacks/nodejs"]
So for Spring Boot I adopted that into the following config:
[build]
builder = "paketobuildpacks/builder:base"
buildpacks = ["gcr.io/paketo-buildpacks/spring-boot"]
But when I run fly deploy the builder is loaded correctly but inside the DETECTING phase I run into the following error:
$ fly deploy
==> Verifying app config
--> Verified app config
==> Building image
Remote builder fly-builder-little-silence-4534 ready
==> Building image with Buildpacks
--> docker host: 20.10.12 linux x86_64
base: Pulling from paketobuildpacks/builder
b5da66d4625a: Pulling fs layer
...
4f4fb700ef54: Pull complete
Digest: sha256:bbc26d8b7fe183a1d59fba3e19b55d7a1e647de0bbf5aa14be98e328c4b7d777
Status: Downloaded newer image for paketobuildpacks/builder:base
base-cnb: Pulling from paketobuildpacks/run
b5da66d4625a: Already exists
80857de9da00: Already exists
239caa1e3c6f: Pull complete
ed65ad332a5e: Pull complete
4fe6ac7cc235: Pull complete
Digest: sha256:cfc9b596bedc7bead1b3714a69dffa1fb17fcb1f7bba5c3faadb40c0b6f5acbd
Status: Downloaded newer image for paketobuildpacks/run:base-cnb
latest: Pulling from paketo-buildpacks/spring-boot
3301de03cfeb: Pull complete
Digest: sha256:a6551c90f9af0719233ff4a97408a8ea8054e90f776b592dcbc7f37c03c9518c
Status: Downloaded newer image for gcr.io/paketo-buildpacks/spring-boot:latest
===> DETECTING
ERROR: No buildpack groups passed detection.
ERROR: Please check that you are running against the correct path.
ERROR: failed to detect: no buildpacks participating
Error failed to fetch an image or build from source: executing lifecycle: failed with status code: 20
As a common user of Cloud Native Buildpacks (CNB) I found it strange that the fly.io docs stated to define a buildpacks parameter at all. Since one of the many benefits of CNB is that they are detecting what your app needs in order to be build. Including every needed buildpack. So it would only make sense to define the builder, which then detects the buildpacks needed.
And that's also the solution here. You simple need to omit the buildpacks setting in the build configuration. The builder tag is all we need:
[build]
builder = "paketobuildpacks/builder:base"
This should activate the Buildpacks detection for your project correctly and trigger a successful deployment on fly.io. It will also push the image straight to fly.io Docker registry at registry.fly.io/microservice-api-spring-boot. Here's a example output for a fly deploy:
$ fly deploy
==> Verifying app config
--> Verified app config
==> Building image
Remote builder fly-builder-little-silence-4534 ready
==> Building image with Buildpacks
--> docker host: 20.10.12 linux x86_64
base: Pulling from paketobuildpacks/builder
Digest: sha256:bbc26d8b7fe183a1d59fba3e19b55d7a1e647de0bbf5aa14be98e328c4b7d777
Status: Image is up to date for paketobuildpacks/builder:base
base-cnb: Pulling from paketobuildpacks/run
Digest: sha256:cfc9b596bedc7bead1b3714a69dffa1fb17fcb1f7bba5c3faadb40c0b6f5acbd
Status: Image is up to date for paketobuildpacks/run:base-cnb
===> DETECTING
10 of 24 buildpacks participating
paketo-buildpacks/ca-certificates 3.3.0
paketo-buildpacks/bellsoft-liberica 9.6.1
paketo-buildpacks/syft 1.18.0
paketo-buildpacks/maven 6.7.0
paketo-buildpacks/executable-jar 6.4.0
paketo-buildpacks/apache-tomcat 7.5.0
paketo-buildpacks/apache-tomee 1.2.0
paketo-buildpacks/liberty 2.1.1
paketo-buildpacks/dist-zip 5.3.0
paketo-buildpacks/spring-boot 5.18.0
===> ANALYZING
Previous image with name "registry.fly.io/microservice-api-spring-boot:cache" not found
===> RESTORING
===> BUILDING
Paketo CA Certificates Buildpack 3.3.0
https://github.com/paketo-buildpacks/ca-certificates
Launch Helper: Contributing to layer
Creating /layers/paketo-buildpacks_ca-certificates/helper/exec.d/ca-certificates-helper
Paketo BellSoft Liberica Buildpack 9.6.1
https://github.com/paketo-buildpacks/bellsoft-liberica
Build Configuration:
$BP_JVM_JLINK_ARGS --no-man-pages --no-header-files --strip-debug --compress=1 configure custom link arguments (--output must be omitted)
$BP_JVM_JLINK_ENABLED false enables running jlink tool to generate custom JRE
$BP_JVM_TYPE JRE the JVM type - JDK or JRE
$BP_JVM_VERSION 11 the Java version
Launch Configuration:
$BPL_DEBUG_ENABLED false enables Java remote debugging support
$BPL_DEBUG_PORT 8000 configure the remote debugging port
$BPL_DEBUG_SUSPEND false configure whether to suspend execution until a debugger has attached
$BPL_HEAP_DUMP_PATH write heap dumps on error to this path
$BPL_JAVA_NMT_ENABLED true enables Java Native Memory Tracking (NMT)
$BPL_JAVA_NMT_LEVEL summary configure level of NMT, summary or detail
$BPL_JFR_ARGS configure custom Java Flight Recording (JFR) arguments
$BPL_JFR_ENABLED false enables Java Flight Recording (JFR)
$BPL_JMX_ENABLED false enables Java Management Extensions (JMX)
$BPL_JMX_PORT 5000 configure the JMX port
$BPL_JVM_HEAD_ROOM 0 the headroom in memory calculation
$BPL_JVM_LOADED_CLASS_COUNT 35% of classes the number of loaded classes in memory calculation
$BPL_JVM_THREAD_COUNT 250 the number of threads in memory calculation
$JAVA_TOOL_OPTIONS the JVM launch flags
Using buildpack default Java version 11
BellSoft Liberica JDK 11.0.16: Contributing to layer
Downloading from https://github.com/bell-sw/Liberica/releases/download/11.0.16.1+1/bellsoft-jdk11.0.16.1+1-linux-amd64.tar.gz
Verifying checksum
Expanding to /layers/paketo-buildpacks_bellsoft-liberica/jdk
Adding 127 container CA certificates to JVM truststore
Writing env.build/JAVA_HOME.override
Writing env.build/JDK_HOME.override
BellSoft Liberica JRE 11.0.16: Contributing to layer
Downloading from https://github.com/bell-sw/Liberica/releases/download/11.0.16.1+1/bellsoft-jre11.0.16.1+1-linux-amd64.tar.gz
Verifying checksum
Expanding to /layers/paketo-buildpacks_bellsoft-liberica/jre
Adding 127 container CA certificates to JVM truststore
Writing env.launch/BPI_APPLICATION_PATH.default
Writing env.launch/BPI_JVM_CACERTS.default
Writing env.launch/BPI_JVM_CLASS_COUNT.default
Writing env.launch/BPI_JVM_SECURITY_PROVIDERS.default
Writing env.launch/JAVA_HOME.default
Writing env.launch/JAVA_TOOL_OPTIONS.append
Writing env.launch/JAVA_TOOL_OPTIONS.delim
Writing env.launch/MALLOC_ARENA_MAX.default
Launch Helper: Contributing to layer
Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/active-processor-count
Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/java-opts
Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/jvm-heap
Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/link-local-dns
Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/memory-calculator
Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/security-providers-configurer
Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/jmx
Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/jfr
Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/security-providers-classpath-9
Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/debug-9
Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/nmt
Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/openssl-certificate-loader
Java Security Properties: Contributing to layer
Writing env.launch/JAVA_SECURITY_PROPERTIES.default
Writing env.launch/JAVA_TOOL_OPTIONS.append
Writing env.launch/JAVA_TOOL_OPTIONS.delim
Paketo Buildpack for Syft 1.18.0
https://github.com/paketo-buildpacks/syft
Downloading from https://github.com/anchore/syft/releases/download/v0.55.0/syft_0.55.0_linux_amd64.tar.gz
Verifying checksum
Writing env.build/SYFT_CHECK_FOR_APP_UPDATE.default
Paketo Maven Buildpack 6.7.0
https://github.com/paketo-buildpacks/maven
Build Configuration:
$BP_MAVEN_BUILD_ARGUMENTS -Dmaven.test.skip=true --no-transfer-progress package the arguments to pass to Maven
$BP_MAVEN_BUILT_ARTIFACT target/*.[ejw]ar the built application artifact explicitly. Supersedes $BP_MAVEN_BUILT_MODULE
$BP_MAVEN_BUILT_MODULE the module to find application artifact in
$BP_MAVEN_DAEMON_ENABLED false use maven daemon
$BP_MAVEN_POM_FILE pom.xml the location of the main pom.xml file, relative to the application root
$BP_MAVEN_SETTINGS_PATH the path to a Maven settings file
Apache Maven 3.8.6: Contributing to layer
Downloading from https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.tar.gz
Verifying checksum
Expanding to /layers/paketo-buildpacks_maven/maven
Creating cache directory /home/cnb/.m2
Compiled Application: Contributing to layer
Executing mvn --batch-mode -Dmaven.test.skip=true --no-transfer-progress package
[INFO] Scanning for projects...
[INFO]
[INFO] -------< org.springframework.boot:microservice-api-spring-boot >--------
[INFO] Building microservice-api-spring-boot 2.7.2
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) # microservice-api-spring-boot ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.10.1:compile (default-compile) # microservice-api-spring-boot ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 6 source files to /workspace/target/classes
[INFO] /workspace/src/main/java/de/jonashackt/springbootvuejs/configuration/WebSecurityConfiguration.java: /workspace/src/main/java/de/jonashackt/springbootvuejs/configuration/WebSecurityConfiguration.java uses or overrides a deprecated API.
[INFO] /workspace/src/main/java/de/jonashackt/springbootvuejs/configuration/WebSecurityConfiguration.java: Recompile with -Xlint:deprecation for details.
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:testResources (default-testResources) # microservice-api-spring-boot ---
[INFO] Not copying test resources
[INFO]
[INFO] --- maven-compiler-plugin:3.10.1:testCompile (default-testCompile) # microservice-api-spring-boot ---
[INFO] Not compiling test sources
[INFO]
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) # microservice-api-spring-boot ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-jar-plugin:3.2.2:jar (default-jar) # microservice-api-spring-boot ---
[INFO] Building jar: /workspace/target/microservice-api-spring-boot-2.7.2.jar
[INFO]
[INFO] --- spring-boot-maven-plugin:2.7.2:repackage (repackage) # microservice-api-spring-boot ---
[INFO] Replacing main artifact with repackaged archive
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.274 s
[INFO] Finished at: 2022-09-12T10:49:04Z
[INFO] ------------------------------------------------------------------------
Removing source code
Restoring application artifact
Paketo Executable JAR Buildpack 6.4.0
https://github.com/paketo-buildpacks/executable-jar
Class Path: Contributing to layer
Writing env/CLASSPATH.delim
Writing env/CLASSPATH.prepend
Process types:
executable-jar: java org.springframework.boot.loader.JarLauncher (direct)
task: java org.springframework.boot.loader.JarLauncher (direct)
web: java org.springframework.boot.loader.JarLauncher (direct)
Paketo Buildpack for Spring Boot 5.18.0
https://github.com/paketo-buildpacks/spring-boot
Build Configuration:
$BP_SPRING_CLOUD_BINDINGS_DISABLED false whether to contribute Spring Boot cloud bindings support
Launch Configuration:
$BPL_SPRING_CLOUD_BINDINGS_DISABLED false whether to auto-configure Spring Boot environment properties from bindings
$BPL_SPRING_CLOUD_BINDINGS_ENABLED true Deprecated - whether to auto-configure Spring Boot environment properties from bindings
Creating slices from layers index
dependencies (50.6 MB)
spring-boot-loader (283.6 KB)
snapshot-dependencies (0.0 B)
application (71.5 KB)
Launch Helper: Contributing to layer
Creating /layers/paketo-buildpacks_spring-boot/helper/exec.d/spring-cloud-bindings
Spring Cloud Bindings 1.10.0: Contributing to layer
Downloading from https://repo.spring.io/release/org/springframework/cloud/spring-cloud-bindings/1.10.0/spring-cloud-bindings-1.10.0.jar
Verifying checksum
Copying to /layers/paketo-buildpacks_spring-boot/spring-cloud-bindings
Web Application Type: Contributing to layer
Servlet web application detected
Writing env.launch/BPL_JVM_THREAD_COUNT.default
4 application slices
Image labels:
org.opencontainers.image.title
org.opencontainers.image.version
org.springframework.boot.version
===> EXPORTING
Adding layer 'paketo-buildpacks/ca-certificates:helper'
Adding layer 'paketo-buildpacks/bellsoft-liberica:helper'
Adding layer 'paketo-buildpacks/bellsoft-liberica:java-security-properties'
Adding layer 'paketo-buildpacks/bellsoft-liberica:jre'
Adding layer 'paketo-buildpacks/executable-jar:classpath'
Adding layer 'paketo-buildpacks/spring-boot:helper'
Adding layer 'paketo-buildpacks/spring-boot:spring-cloud-bindings'
Adding layer 'paketo-buildpacks/spring-boot:web-application-type'
Adding 5/5 app layer(s)
Adding layer 'launcher'
Adding layer 'config'
Adding layer 'process-types'
Adding label 'io.buildpacks.lifecycle.metadata'
Adding label 'io.buildpacks.build.metadata'
Adding label 'io.buildpacks.project.metadata'
Adding label 'org.opencontainers.image.title'
Adding label 'org.opencontainers.image.version'
Adding label 'org.springframework.boot.version'
Setting default process type 'web'
Saving registry.fly.io/microservice-api-spring-boot:cache...
*** Images (28a69cfce36e):
registry.fly.io/microservice-api-spring-boot:cache
registry.fly.io/microservice-api-spring-boot:deployment-01GCRMZ79R99H9RRXFK7H47X3B
Adding cache layer 'paketo-buildpacks/bellsoft-liberica:jdk'
Adding cache layer 'paketo-buildpacks/syft:syft'
Adding cache layer 'paketo-buildpacks/maven:application'
Adding cache layer 'paketo-buildpacks/maven:cache'
Adding cache layer 'paketo-buildpacks/maven:maven'
--> Building image done
==> Pushing image to fly
The push refers to repository [registry.fly.io/microservice-api-spring-boot]
1dc94a70dbaa: Pushed
...
4a641e21953d: Pushed
deployment-01GCRMZ79R99H9RRXFK7H47X3B: digest: sha256:5e77e023b3862ec1edffcee1d78c5b23a5ae6957f6028da0bff16e4b7fd5264f size: 4702
--> Pushing image done
image: registry.fly.io/microservice-api-spring-boot:deployment-01GCRMZ79R99H9RRXFK7H47X3B
image size: 296 MB
==> Creating release
--> release v4 created
--> You can detach the terminal anytime without stopping the deployment
==> Monitoring deployment
1 desired, 1 placed, 1 healthy, 0 unhealthy [health checks: 1 total, 1 passing]
--> v4 deployed successfully
A little bit of context:
Im working as a FE developer for an AEM project. The project is a SPA AEM as cloud service. I am running the author instance from the command line.
My pc specs are:
CPU: Intel(R) Core(TM) i5-7400 CPU # 3.00GHz 3.00 GHz
RAM: 24.0 GB
SSD: 476 GB
OS: Windows 10 Pro
For the AEM Project we are using
Java sdk 11
Maven 3.6.3
I have already set up everything, the path variables, JAVA_HOME, mvn. All of them work fine, even trying to build other type of projects with "older" versions of AEM like 6.5 build perfectly. I don't have a problem with them. But with this version of AEM I am getting this error
[WARNING] Rule 9: org.apache.maven.plugins.enforcer.RequireFileChecksum failed with message:
There have been changes detected in a file which is supposed to be immutable according to https://docs.adobe.com/content/help/en/experience-manager-cloud-service/implementing/content-delivery/disp-overview.html#file-structure: src/conf.dispatcher.d/renders/default_renders.any
[WARNING] Rule 10: org.apache.maven.plugins.enforcer.RequireFileChecksum failed with message:
There have been changes detected in a file which is supposed to be immutable according to https://docs.adobe.com/content/help/en/experience-manager-cloud-service/implementing/content-delivery/disp-overview.html#file-structure: src/conf.dispatcher.d/virtualhosts/default_virtualhosts.any
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for xxxxxx 1.0.0-SNAPSHOT:
[INFO]
[INFO] xxxxxx ................................. SUCCESS [ 0.270 s]
[INFO] xxxxxx - Core .......................... SUCCESS [ 59.232 s]
[INFO] xxxxxx - UI Frontend ................... SUCCESS [ 19.876 s]
[INFO] xxxxxx - UI Frontend React ............. SUCCESS [ 39.613 s]
[INFO] xxxxxx - Repository Structure Package .. SUCCESS [ 0.991 s]
[INFO] xxxxxx - UI apps ....................... SUCCESS [ 12.990 s]
[INFO] xxxxxx - UI content .................... SUCCESS [ 4.178 s]
[INFO] xxxxxx - UI config ..................... SUCCESS [ 0.314 s]
[INFO] xxxxxx - All ........................... SUCCESS [ 1.052 s]
[INFO] xxxxxx - Integration Tests ............. SUCCESS [ 12.166 s]
[INFO] xxxxxx - Dispatcher .................... FAILURE [ 0.030 s]
[INFO] xxxxxx - UI Tests ...................... SKIPPED
[INFO] xxxxxx - Project Analyser .............. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:34 min
[INFO] Finished at: 2021-08-22T15:11:20-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M3:enforce (enforce-checksum-of-immutable-files) on project xxxxxxx.dispatcher.cloud: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :xxxxxx.dispatcher.cloud
I've been searching in sites, some of the answers for this problem haven't work for me.
I tried to run everything from the "gitbash"
command line and I had the same problem.
I tried to change the version in the pom.xml, didnt work.
I tried to build the project using eclipse IDE and all the build-in tools, I get an error that org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M3:enforce is missing
Disable firewall and antivirus, nope
Use other versions of maven like 3.8.2
Delete the .m2 directory and download again all the plugins, not working
One of many answers tell me to comment out the dispatcher module in the pom.xml and after I did that builds fine. Other is doing the same and upload the ui.apps/target/*.zip with the crx package manager I did it but im not sure if the result is the "best".
To end, I installed the same project in a Mac Pro and i did without a problem. I hope someone can help me with this. Thanks for reading.
[WARNING] Rule 9: org.apache.maven.plugins.enforcer.RequireFileChecksum failed with message:
There have been changes detected in a file which is supposed to be immutable according to https://docs.adobe.com/content/help/en/experience-manager-cloud-service/implementing/content-delivery/disp-overview.html#file-structure: src/conf.dispatcher.d/renders/default_renders.any
The Maven Enforcer Plugin is checking for some files to have an specific checksum using requireFileChecksum rule
Somewhere in your pom.xml the Enforcer Maven plugin should be declared, so you will be able to see the rule and the hash it is applying. This xml snippet is from the maven plugin documentation.
<requireTextFileChecksum>
<file>E:\java-workspace\apache-maven-enforcer\maven-enforcer\target\checkout\enforcer-rules\target\classes/foo.txt</file>
<checksum>d41d8cd98f00b204e9800998ecf8427e</checksum>
<type>md5</type>
</requireTextFileChecksum>
Check that hash against the hash of the file of your filesystem. Maybe when you change aem version, you need to upgrade some of those files.
As discussed here: https://github.com/adobe/aem-guides-wknd/pull/202
Adobe have reported the issue and the fix to Adobe AEM WKND project:
Some Windows users experience a Maven enforcer issue where it appears that default dispatcher files have been modified. Unclear if this is a result of differences between Mac and Windows or something that occurs during the checkout process. Most users simply want to install the code base to a local environment and this check is unnecessary. Removing the enforcement for windows builds.
so you can :
Skips Dispatcher enforcement plugin for users on windows environments.
doing a change you dispatcher/pom.xml
with the commit reported here:
https://github.com/adobe/aem-guides-wknd/pull/202/commits/bebcf5d2236c75a95055d5ff71ea58f66379f271
replacing the line:
<goal>enforce</goal>
with:
<goal>display-info</goal>
I'm exploring DocdokuPLM.
To Install docdoku I have used the docker configuration file which can be found here.
Using it have configured and installed Docdokuplm in my localhost.
Now not sure why sample project is not getting imported.
To import and check sample project I have used the following command.
sudo ./platform-ctl insert-sample MY_LOGIN_USER_ID MY_PASSWORD
While running the command to import sample project i'm getting the following error:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.571 s
[INFO] Finished at: 2019-01-31T07:29:36+00:00 [INFO] Final Memory: 34M/301M
[INFO] ------------------------------------------------------------------------
[INFO] - No workspace name supplied, generating one...
[INFO] - Using wks-a72fca63 as workspace name
[INFO] - Starting load process...
[INFO] - Checking server availability...
[INFO] - Creating your account...
[INFO] - Creating account [sommesh29]
[INFO] - Cannot create account, trying to use given credentials for next operations
[INFO] - Creating workspace...
[INFO] - Adding user sommesh29 to workspace wks-a72fca63
[SEVERE] - Ooops, something went wrong while loading sample data : Not Found Not Foundcom.docdoku.api.client.ApiException: Not Found
at com.docdoku.api.client.ApiClient.handleResponse(ApiClient.java:838)
at com.docdoku.api.client.ApiClient.execute(ApiClient.java:773)
at com.docdoku.api.client.ApiClient.execute(ApiClient.java:757)
at com.docdoku.api.services.WorkspacesApi.addUserWithHttpInfo(WorkspacesApi.java:833)
at com.docdoku.api.services.WorkspacesApi.addUser(WorkspacesApi.java:819)
at com.docdoku.loaders.SampleLoader.addUserToWorkspace(SampleLoader.java:304)
at com.docdoku.loaders.SampleLoader.load(SampleLoader.java:88)
at com.docdoku.loaders.Main.main(Main.java:73)
what am i doing wrong ?
Is this a issue from my side or is this issue occurring from Docker file?
The following errors occurs in Jenkins on running a job.
[INFO] ------------------------------------------------------------------------<br>
[INFO] BUILD SUCCESS<br>
[INFO] ------------------------------------------------------------------------<br>
[INFO] Total time: 5.785s<br>
[INFO] Finished at: Tue Dec 24 16:40:15 IST 2013<br>
[INFO] Final Memory: 17M/42M<br>
[INFO] ------------------------------------------------------------------------<br>
Waiting for Jenkins to finish collecting data<br>
[JENKINS] Archiving C:\Program Files\Jenkins\jobs\Selenium Code\workspace\pom.xml to org.corp.selenium.framework/Selenium_Code/0.0.1-SNAPSHOT/Selenium_Code-0.0.1-SNAPSHOT.pom<br>
[JENKINS] Archiving C:\Program Files\Jenkins\jobs\Selenium Code\workspace\target\Selenium_Code-0.0.1-SNAPSHOT.jar to org.corp.selenium.framework/Selenium_Code/0.0.1-SNAPSHOT/Selenium_Code-0.0.1-SNAPSHOT.jar<br>
FATAL: hudson.maven.MavenBuild.isInProgress()Z<br>
java.lang.NoSuchMethodError: hudson.maven.MavenBuild.isInProgress()Z<br>
at hudson.maven.MavenBuild.access$700(MavenBuild.java:94)<br>
at hudson.maven.MavenBuild$ProxyImpl2.close(MavenBuild.java:621)<br>
at hudson.maven.AbstractMavenBuilder.end(AbstractMavenBuilder.java:106)<br>
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun<br>(MavenModuleSetBuild.java:839)<br>
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:562)<br>
at hudson.model.Run.execute(Run.java:1665)<br>
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:519)<br>
at hudson.model.ResourceController.execute(ResourceController.java:88)<br>
at hudson.model.Executor.run(Executor.java:230)<br>
As you can see from the above console output from jenkins, the below listed changes happen:
Build is successful
The Jar files gets created and succesfully installed into maven repository
Still the job fails with the java.lang.NoSuchMethodError
exception.
Please let me know, how to fix this exception?
I had the same issue here and downgrade of Maven Project Plugin to version 2.0-beta-1 solved it.
I hope it helps
Best Regards
I'm trying to use Maven release plugin 2.0 to tag the version and hopefully deploy the resulting jar to the repository.
I got stuck at release:prepare, getting this cryptic error:
[INFO] Checking in modified POMs...
[INFO] Executing: cmd.exe /X /C "svn --non-interactive commit --file C:\Users\ME~1\AppData\Local\Temp\maven-scm-950614965.commit --targets C:\Users\ME~1\AppData\Local\Temp\maven-scm-35306-targets"
[INFO] Working directory: c:\workspace\release-test-trunk
[INFO] Tagging release with the label release-test-1.3.0...
[INFO] Executing: cmd.exe /X /C "svn --non-interactive copy --file C:\Users\ME~1\AppData\Local\Temp\maven-scm-829250416.commit --revision 1885 http://myserver/myproject/sandbox/release-test/trunk http://myserver/myproject/sandbox/release-test/tags/release-test-1.3.0"
[INFO] Working directory: c:\workspace\release-test-trunk
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Unable to tag SCM
Provider message:
The svn tag command failed.
Command output:
svn: OPTIONS of 'http://myserver/myproject/sandbox/release-test': 200 OK (http://myserver)
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20 seconds
[INFO] Finished at: Tue Aug 24 19:31:55 GMT 2010
[INFO] Final Memory: 14M/56M
[INFO] ------------------------------------------------------------------------
The tag folder does exist and is empty
I executed the command mvn clean release:clean release:prepare to be sure have a fresh run
Every time I got the error I executed mvn release:rollback to have everything back to normal
It doesn't seem to be a credentials problem, the pom file is effectively commited with the -SNAPSHOT removed and the scm information switched to the tag folder.
The strange part is I don't understand how the pom file is commited since I did not specify any credentials neither in the pom nor in the settings.xml file located in maven local install
I saw many people having a similar issue but with the folder already exist error message. Mine doesn't tell me what the error is precisely.
Do you have any ideas ?
Many thanks.
EDIT:
#Colin
If I browse svn://myserver/myproject/sandbox/release-test using tortoise svn for example it works fine. However if I type http://myserver/myproject/sandbox/release-test in Firefox the page is not found.
Also I think it should be ok since the pom file gets commited before trying to create the tag.
My scm section in the pom file :
<scm>
<connection>scm:svn:http://myserver/myproject/sandbox/release-test/tags/release-test-1.3.0</connection>
<developerConnection>scm:svn:http://myserver/myproject/sandbox/release-test/tags/release-test-1.3.0</developerConnection>
<url>http://myserver/myproject/sandbox/release-test/tags/release-test-1.3.0</url>
</scm>
I tried removing the "http:" but that didn't work.
The problem isn't really maven here. It's more about svn itself. Maven stops its operation when svn send this error message :
svn: OPTIONS of 'http://myserver/myproject/sandbox/release-test': 200 OK (http://myserver)
Are you absolutly sure about the http://myserver/myproject/sandbox/release-test adress ?
If http://myserver/myproject/sandbox/release-test doesn't exists svn won't commit anything. Just replace the http:// by svn://
<scm>
<connection>scm:svn:svn://myserver/myproject/sandbox/release-test/tags/release-test-1.3.0</connection>
<developerConnection>scm:svn:svn://myserver/myproject/sandbox/release-test/tags/release-test-1.3.0</developerConnection>
<url>svn://myserver/myproject/sandbox/release-test/tags/release-test-1.3.0</url>
</scm>
Links :
svnforum.org
An SVN error (200 OK) when checking out from my online repo
Tortoise svn Subversion Update Error