Services bundle not properly getting deployed over Jenkins - service

I've faced some mystical problem over here. I deploy my Adobe CQ
project over Jenkins and my services package not getting deployed at
all. I mean, they are absent in install folder in my CRXDE. When I am
trying to do the same stuff on localhost with maven manually - it's
working like charm. For some reason, i've noticed in logs, that
services bundle installed, started, then stopped and uninstalled, but
there are no any errors or something. What reason can cause this
issue? I will appreciate any help. Thank you.
Guys, I have found the answer: there was empty "/install" folder in my project structure so when i deploy my packages, 'View' package with empty '/install' folder in it simply rewrites just added 'Services' and 'Taglib' jars from '/install' folder in crxde.

If you delete jar from ../install/ JCR folder, it will be uninstalled from the OSGi as well. I think it may be an issue with the CRX package filters. If you install a few packages, one after another, and they are sharing same paths, then the latter package will delete resources installed by the former one.

Related

Maven fixing broken dependencies

I just checked out maven based java project from svn to local box in eclipse where maven 3.0.2 is available. However while reviewing class path configuration many of dependencies are broken such as org.restlet-2.0.15.jar. Strange part is C:/Users/daeyoung/.m2/repository has that broken jar file but .lastUpdated is appended. After reading many posts from WWW, the way I understood to fix the problem is delete *.lastUpdated file then re-download it from central repo.
But when I reviewed pom.xml file there is no mention of repository (strange...) and as soon as I delete *.lastUpdated file, it comes back (e.g. org.restlet-2.0.15.jar.lastUpdated).
I am new to Maven.
I'd appreciate if someone can guide me to a right direction to fix this problem.
[update]
I created following user settings.xml file under /Users/daeyoung/.m2/ directory. I thought at least that would take care of downloading org.restlet package.
However when I ran mvn command (literally mvn) inside of project folder, system was saying..
I don't want to modify pom.xml file but rather via user settings.xml I thought I could connect to maven restlet repo and download specified target package but I am not sure what I am missing in here. I think contents of settings.xml is not correct.
I just want to say thanks to all who have given me advice. First I was not well equipped to understand the advice but more I looked at the problem/read about maven articles. It was clear what needs to be done to fix the problem.
Bottom line is I manually downloaded dependencies to ${user_name}/.m2/repository for missing jars. I configured ${MAVEN_HOME}/conf/settings.xml to point to local repository then I ran mvn validate/clean/package sequentially from eclipse via m2e plugin (or I could have done same thing from command line).

Deployable JAR file from JB Plugin Repo does not contain my files, but the plugin runs correctly locally

Background
I am working on a simple plugin, and have already deployed to the Plugin Repository once before (successfully).
Since my last successful deployment, I found that I had a lot of issues with the IDE. After completely upgrading, and modifying my plugin's directory structure, I have been able to get the plugin to Run again.
Issue
tl;dr - I have an updated plugin in the JetBrain's Plugin Repository that does not work as intended, and I cannot update it correctly!
When I run the plugin, a second instance of the IDE comes up with my plugin working correctly. I edit my code and run the plugin again - the plugin runs smoothly and the updates are applied!!
With all of this, I decided to deploy my updated plugin to the Repository again. Once that was done, I decided to download the plugin and try it out myself; just to make sure things worked.
The issue is that nothing can be found in the plugin file!! Just the updated plugin.xml file and Manifest.mf file. The total size of the archive file is around 500bytes. I know a correct archive would have more files in it, and in my case, the file size should be around 6kb (based on my first successful archive file).
So how can my local IDE instance find the files correctly, but the deployment feature cannot? How does the deployment feature actually work? I get the feeling I have the structure wrong, eventhough the new IDE instance works perfectly
Plugin
GitHub
JetBrain's Plugin Repository
When you install the plugin, the version is shown as v1.1; however, that is not true, in reality. One of the easiest features to determine the actual version of the plugin is the Folded Text foreground color.
v1.0 - RED
v1.1 - YELLOW
Deployment
Preparing Plugin Module for Deployment + resulting plugin.jar file
Contents of plugin.jar
It seems possible that because of the restructuring an old ChroMATERIAL.xml file was left somewhere in the build output. Somehow this could end up in the plugin jar. An invocation of Build > Rebuild Project should fix this problem.
There could also be problems in the project or module configuration, but the project files are not included in the GitHub repository, so that cannot be checked.

Running helloworld-rs from JBoss quickstarts in eclipse

I am trying to learn JAX-RS using JBoss quickstarts.
When I deployed the application "helloworld-rs" through command-line, it ran successfully. Then I created a maven project in Eclipse, copied files from "helloworld-rs" at proper locations and it worked fine. Then I went ahead to add a form to the existing index.html file and something went wrong. Instead off deploying "jboss-as-helloworld-rs", Eclipse started deploying "jboss-as-helloworld-osgi" for some unknown reasons. Obviously, it produced error when I tried to access "localhost:8080/jboss-as-helloworld-rs/index.html"
So I created a new Maven project in Eclipse with following details:
Group Id:org.jboss.as.quickstarts.rshelloworld
Artifact Id: jboss-hello
I have also made changes in pom.xml as follows:
<artifactId>jboss-hello</artifactId>
Still I am facing the same problem. I have made a copy of "helloworld-rs", made same changes in the pom.xml and deployed and ran it successfully through command-line using
http://localhost:8080/jboss-hello/index.html
Strangely, this very link does not work in eclipse!!!
I have zeroed-in that there is some problem in deploying th app in Eclipse. Can anybody please help me solve this? Thank you!!!
I went to the 'jboss-as-7.1.1.Final\standalone\deployments' folder, deleted all the deployed war files. Then in Eclipse, right-click on servers -> clean . Then, I started the JBoss server and everything went fine.

Eclipse + JBoss - some JAR files not deployed

I have an Eclipse Indigo installation with a JBoss 6 server managed by it. I have a Maven project with a few modules. These modules all build just fine from the command line.
One of the modules is an EAR. This is dependent on two JAR modules and a couple of WAR modules. When I package the EAR from the command line (mvn clean package), the EAR contains all the necessary JAR and WAR files. However, when I deploy it from Eclipse, the two module JAR files are missing from JBoss. The WAR files are just fine. Inside the "Add and Remove..." dialog the JAR files are also present, but not when deployed. I've checked JBoss' deployments folder and there they are indeed missing. The strange thing is, with the exact same POMs and code, all of my colleagues with the same(?) setup don't have this problem.
The two JAR modules are listed in the dependency management part of the parent POM. They are also listed as dependencies in the EAR POM. Still, Eclipse refuses to deploy them with the EAR.
Does anybody have any idea how I can solve this issue? I can manually package and deploy the EAR, but 1) that takes longer, and 2) I can't use Eclipse's debugging functionality this way.
Note: previously asked at http://www.coderanch.com/t/580959/vc/Eclipse-JBoss-some-JAR-files
Right mouse button on project -> Maven -> Update project
I experienced the exact same issue, different eclipse (Eclipse Mars, WildFly 8.1 ).
The unsettling part was that I didn't change anything in the code or in the IDE (that I am aware of) and it started malfunctioning.
I suspect it has something to do with the cached memory of eclipse for it's plugins, anyway, after many hours of trying different things we fixed it by deleting the folder .eclipse under your user in windows.
Seems silly, but we tried everything except that, and that thing did the trick
I'm encountering a similar issue, however my environment is much, much simpler - being a web project, with a utility project. Not using maven at all and deploying to tomcat7.
The class file is not being deployed to the web-inf as expected, although the utility project is referenced, and marked as to be exported.
However with your issue, I came across this post:
http://blog.frankel.ch/better-maven-integration-leads-to-unforeseen-consequences-bugs#comments
which might provide a clue. Hope this helps.
I had the same issue. I didn't modify my code at all, I deleted all the projects from the work space, closed eclipse and reopened it. Then I did a clean and build of the project (which took much longer than before). This time when I went to add the EAR project, it had all the dependencies listed and actually worked.

Why are packages suddenly greyed out in Eclipse?

I have been working on an inherited webapp project and a few hours ago I exported to war file. I imported from the war file on another system (Ubuntu) and noticed all the project's packages are greyed out. Some I can expand others I can't.
Deploying the project in a container works fine, and does show the updates I made, however I can't get at the packages, or files I edited.
I have researched online and gotten no closer to an answer so far.
Any reason as to what's happening? I use Eclipse 3.7 on both systems.
A war file only contains compiled classes. You won't find your source files in a war file. That's not what it's used for.
If you want to share code and project files between two machines, use SVN, Git or another version control system. Even with 1 machine, you should use it anyway.