copy-flex-resources not working in flexmojos - apache-flex

I am trying to copy the dependent into war using the copy- flex-resources plugin. However I'm getting the following error :
[ERROR] Failed to execute goal org.sonatype.flexmojos:flexmojos-maven-plugin:4.2-beta:copy-flex-resources (default) on project myproject: Execution default of goal org.sonatype.flexmojos:flexmojos-maven-plugin:4.2-beta:copy-flex-resources failed. NullPointerException
<plugin>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<version>4.2-beta</version>
</plugin>
I'm all over this issue, but could not find a solution.

I am sorry, but NullPointerException does not say much, try to run maven with parameters -e or -X (or both) to see more logging information to find out what is going on. Also you may try a release version of the plugin, not beta just to be sure.
And if you also provide part of the pom.xml with your plugin configuration, someone could notice some mistake :).

Related

Tomcat 8 is not scanning apache tiles TLD file inside the jar

I'm setting up the spring webmvc project using spring boot 2.0.0 version. If i run the application inside the embedded tomcat, it runs fine. I tried deploying it in external standalone tomcat-8 server, it is working fine over there too. But i if package the war and deploy it in the tomcat-8 server configured within eclipse, then it throws below exception.
The absolute uri: http://tiles.apache.org/tags-tiles cannot be
resolved in either web.xml
I included the dependency in the pom file as below.
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-jsp</artifactId>
<version>3.0.4</version>
</dependency>
I ensured that the tiles-jsp jar is present inside the WEB-INF/lib folder. But still its failing as it is not able to scan the jar for TLD. I tried changing the catalina.properties to include tiles-jsp*.jar. But it is still failing.
Please help me to fix this error.
Does your IDE automatically import dependencies?
Try cleaning your maven dependencies.
Maven clean.
Or try the more brutal command dependency:purge-local-repository.
By the way notice that there's a newer version of your dependency 3.0.8 of 2017. The one that you are trying to use, the 3.0.4, is of 2014.
For me, war file when deployed works perfect. Had an issue where, when I run it under tomcat from inside IDE(Eclipse/STS), it threw error. Maven clean really helped, no other change needed. MAven clean-->build--> restart eclipse/sts tomcat. it works like a charm. Answer by desoss prompted me to perform maven clean. Thanks #desoss.

Eclipse Luna maven-jar-plugin execution not covered by lifecycle

I have a maven java project (deploying to jboss, if that matters) that uses the maven-jar-plugin. This works fine using Eclipse Kepler. I'm now trying Luna (EE edition), and I'm now getting this error
Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-jar-plugin:2.5:jar (execution: make-a-jar, phase: compile)
in all my child .pom files (the maven-jar-plugin is specified in the parent .pom file, but the error points to the block in the child .poms).
In the .pom viewer, if I click on the error message in the Overview tab, it gives me the option to "Discover new m2e connectors". Clicking on this brings up the "m2e Marketplace" dialog and appears to do a bunch of work, but then just shows me an empty list. If I click "Finish", it tries to calculate dependencies, and then gives me this error:
Operation details
Cannot complete the request. See the error log for details.
"m2e connector for mavenarchiver pom properties" will be ignored because a newer version is already installed.
So it appears to be that maybe the maven-jar-plugin depends on a particular version of mavenarchiver, but Eclipse Luna EE comes with a newer version. Is there a way to fix this problem, or do I just have to wait for a newer version of maven-jar-plugin to be released? (I'm currently using version 2.5 of maven-jar-plugin, which is the latest that I'm aware of.)
I had a similar problem when trying to import Hadoop project in Eclipse. The solution above works... but I got "tired" of changing some of the pom files, and thought that the change would bite me later. So, another solution is:
To avoid the messages in Eclipse regarding execution not covered by lifecycle, go to Windows -> Preferences -> Maven -> Errors/Warning and select Ignore for "Plugin execution not covered for Lifecycle.."
You can solve the problem when you change the phase of execution from compile to package (which is default lifecycle phase for jar goal).
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven-jar-plugin}</version>
<executions>
<execution>
<phase>package</phase> <!-- changed from compile to package -->
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>

What Drools JARS are needed in a servet's WEB-INF\lib for jBPM?

I have ported a Tomcat servlet to run with JBoss 7.1 and am now trying to add jBPM support to it. I have run the jbpm-5.4.0.Final-installer-full.zip to get JBoss/jBPM installed with Kepler (I had to patch the installer to install Kepler). I then copied a line of code from the installer's "evaluation" sample and placed it in my servlet. That line of code is:
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
After adding the necessary imports I got a clean build. I thought that I could then take the Drools run time files I found in the installer's .\runtime\lib and place them in my servlet's .\WEB-INF\lib. However, doing this caused me to get a "Class not found" exception when I tried to execute the KnowledgeBuilder line of code. It turns out that if I replace the JARs from the installer's .\runtime\lib with the JARS in drools-distribution-5.5.0.Final.zip (from http://www.jboss.org/drools/downloads) in my .\WEB-INF\lib I am able to execute KnowledgeBuilder line of code.
My questions are:
1) Why don't the JARs from the installer's .\runtime\lib work in the above?
2) Where can I find documentation on what all of these Drools JARs do and which ones are needed?
Thank you.
Al
If I were to list specific Jars here, the answer would only apply to a specific version of Drools. The best way to get the correct JARs is to use Maven to build your project. That will automatically import all of the JARs that are needed.
You will usually need dependencies for drools-core and drools-compiler. Those have their own transitive dependencies.
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-core</artifactId>
<version>${drools.version}</version>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-compiler</artifactId>
<version>${drools.version}</version>
</dependency>
If you use Eclipse, then you can just create a pom.xml with those dependencies in it. Open it in the Maven pom editor and the "Effective POM" tab will show you all of the required dependencies.

Snapshot 1.8 dependecies error on tripleplay examples

i'm trying to run the tripleplay examples in my eclipse (https://github.com/threerings/tripleplay) but it always sows me te same error during installation:
Failed to execute goal on project tripleplay: Could not resolve dependencies for project com.threerings:tripleplay:jar:1.8-SNAPSHOT: The following artifacts could not be resolved: com.googlecode.playn:playn-core:jar:1.8-SNAPSHOT, com.googlecode.playn:playn-java:jar:1.8-SNAPSHOT: Failure to find com.googlecode.playn:playn-core:jar:1.8-SNAPSHOT in http://forplay.googlecode.com/svn/mavenrepo was cached in the local repository, resolution will not be reattempted until the update interval of forplay-legacy has elapsed or updates are forced
I`ve forced to update maven dependencies but it didn't work... Anybody knows how to solve this problem?
Thanks.
You have to checkout also the threerings fork of Playn:
https://github.com/threerings/playn
and launch a mvn clean install on that project.
I created a maven repository who contain this dependencies,
feel free to use it
<repositories>
<repository>
<id>bubuntux-repo</id> <!--Contains PlayN and Tripleplay snapshots-->
<url>http://repository-bubuntux.forge.cloudbees.com/snapshot/</url>
</repository>
</repositories>
Keep in mind to this artifact are spanshots from the Threerings repositories and my CI doesn't run any test unit, it just compile, so the library can be a little unestable.

Unable to download flexmojos plugin, maven ignores repositories config

I have Flex project and I need flexmojos-maven-plugin to build it.
<plugin>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
...
</plugin>
I also mentioned repository
<repositories>
<repository>
<id>flexmojos</id>
<url>http://repository.sonatype.org/content/groups/flexgroup/</url>
</repository>
</repositories>
But maven ignores it and doesn't try to download plugin from there.
[INFO] Scanning for projects...
Downloading: http://repo1.maven.org/maven2/org/sonatype/flexmojos/flexmojos-maven-plugin/3.9/flexmojos-maven-plugin-3.9.jar
[INFO] Unable to find resource 'org.sonatype.flexmojos:flexmojos-maven-plugin:maven-plugin:3.9' in repository central (http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
Please, advise. Thanks!
There seems to be something wrong with the 3.9 build. I can successfully download version 3.8 without any problems. But 3.9 triggers an "unable to find resource" error.
I doubt you've had problems resolving the repositories. Sometimes the Maven output doesn't do a great job of showing its efforts it reading from remote repos. Particularly when you repeatedly run the same failing command (e.g. mvn clean install).
Take a look in your local repository. If you can find anything under org/sonatype/flexmojos then you're certainly resolving the repository correctly.
I would suggest you post this on the mailing list: https://docs.sonatype.org/display/FLEXMOJOS/Project+Information

Resources