I'm trying to mavenize a Flex project using Flash Builder 4 as IDE.
I'm using flexmojos 4.0-beta-7 with flex sdk 4.5.0.19786.
In my pom.xml I have:
<build>
<sourceDirectory>${basedir}/src/main/flex</sourceDirectory>
...
</build>
and I have this directory structure ${basedir}/src/main/flex/assets/icons/**.png.
I have ${basedir}/pom.xml. I followed OpenScales fx samples as a model for my project.
FlashBuilder compiles normally, but invoking $>mvn clean package lots of unable to resolve 'assets/icons/*.png' for transcoding errors are raised.
Does assets folder have to be added explicitly for compiling? How?
Here it is my complete ${basedir}/pom.xml and here the output from $>mvn clean package.
I had the same problem a long time ago. And solved it replacing all the paths in Embed directives from 'assets/icons/food_fr.gif' to '/assets/icons/food_fr.gif'.
Related
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.
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.
We've been tirelessly working on trying to catch up on our deployment that was due on Tuesday, so now that we have reached a point of deploying our application, Ant seems to be having difficulties with the mxmlc.jar.
We've tried searching most of this morning on what is going on, but have come up empty. Most of the questions i've asked on here, have an answer that works, so here I am once again.
When trying to run our Ant file I get a these error messages:
BUILD FAILED
C:\workspace\brp\script\build.xml:122: The following error occurred while executing this line:
C:\workspace\brp\script\build.xml:99: The class not found in jar file: mxmlc.jar
The resulting lines of code from that are:
<target name="mxml_compile">
<mxmlc file="${flex.src.dir}/${proj.name}.mxml"
keep-generated-actionscript="false"
output="${build.dir}/${proj.name}.swf">
<load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
<source-path path-element="${FLEX_HOME}/frameworks" />
</mxmlc>
with line 122 being the call to mxml_compile.
The development environment is
Eclipse Indigo SR2
Flash Builder 4.6 Plugin
Flex Compiler is set to SDK 4.6 and Use Flex 3 compatibility mode checked.
We usually do a deployment every two weeks, and nothing other than some java side functionality and quite a few UI changes have been made. We are at a loss as far as where to go from here.
I've tried copying the flexTasks.jar from the sdk file to the source directory that ant is using, as I did find a post somewhere that said that could solve the problem, however it didn't change a thing.
Any thoughts?
I faced the error and I realized that it was because of two mistakes.
1. My project sdk was 4.6.0, but my flex.properties was referring 4.1.0. I changed the sdk in flex.properties to 4.6.0
I had copied flextasks.jar from 4.1.0/ant directory to my project home/lib. I replaced it with the jar from 4.6.0/ant directory.
And then the problem got resolved
So I know you can use ant and mvn to test the project, but I was wondering if there was a way to deploy the project directly as a executable jar or otherwise compile it into a format that can be directly ran? Thanks!
if you are serious about making a launchable desktop program (and especially if its going to be a game), you should use launch4j to make an exe file that launches the jar. It isn't hard to use, and it makes the program much more end user friendly
If your project was generated from the 1.7.2 PlayN archetype or newer, that functionality is already built in. Simply invoke:
mvn package
and a dependencies-included jar file will be generated in:
yourgame/java/target/yourgame-java-1.0-SNAPSHOT-jar-with-dependencies.jar
you can test it by running it standalone like so:
java -jar yourgame/java/target/yourgame-java-1.0-SNAPSHOT-jar-with-dependencies.jar
If your game was generated via an older PlayN archetype, the you can add the necessary bits to your java/pom.xml file by pasting in this in (merging with any existing <build> <plugins> blob):
maven-assembly-plugin
2.4
jar-with-dependencies
${mainClass}
make-assembly
package
single
Then just run mvn package as above to generate the file. Note that you will need to be building against PlayN 1.7.2 or newer as that version is the first one that supported automatic unpacking of the LWJGL native libraries needed to run on the desktop.
I am writing an Adobe AIR application that needs to build in a CI using maven and nexus. I tried to follow this article which is the most up to date article from the source, but I still don't understand these things:
Are the first and second pom.xml examples in the article in the same pom.xml file?
How do I get the Flex SDK dependencies on my CI?
It would be awesome if someone had a complete project setup and went through the whole thing.
This blog has some useful information on building Air applications with Maven 2.
As far as your numbered questions are concerned
Part 1: The two POMs in the tutorial are different. The first creates the swf package containing your application components. The second POM has a dependency on the swf package (note the dependency in the second POM for the artifactId Air in the first). The second POM defines processing to unpack the swf package (using the dependency plugin), then uses the exec plugin to invoke adt on the unpacked package contents.
The process described is therefore in two parts. The first POM packages the swf files so they are available in the repository. The second POM will retrieve any packages required from the Maven repository and invoke adt to compile them. So if you have multiple Air packages, the second POM can be modified to download the extra packages and compile them.
Part 2: Most of the dependencies you need are hosted in the Sonatype public repository, one notable exception seems to be the adt.jar. You can deploy the adt.jar to a Maven repository manager such as Nexus using the deploy plugin's deploy-file goal.
This would deploy the adt.jar to the repository with credentials matching the tutorial:
mvn deploy:deploy-file -Durl=http://path/to/repository -DrepositoryId=[some.id]
-Dfile=adt.jar -DgroupId=com.adobe.flex.compiler -DartifactId=adt
-Dversion=3.3.0.4852 -DgeneratePom=true -DgeneratePom.description="Flex ADT"
To reference the Nexus public repository, add a repository declaration to your settings.xml or pom.xml like this:
<repositories>
<repository>
<id>nexus-public</id>
<url>http://repository.sonatype.org/content/groups/public</url>
</repository>
</repositories>