Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

angular.json to war

 <properties>
    <angular.project.location>angular-project</angular.project.location>
    <angular.project.nodeinstallation>node_installation</angular.project.nodeinstallation>
</properties>

 <plugin>
            <groupId>com.github.eirslett</groupId>
            <artifactId>frontend-maven-plugin</artifactId>
            <version>1.0</version>
            <configuration>
                <workingDirectory>${angular.project.location}</workingDirectory>
                <installDirectory>${angular.project.nodeinstallation}</installDirectory>
            </configuration>
            <executions>
                <!-- It will install nodejs and npm -->
                <execution>
                    <id>install node and npm</id>
                    <goals>
                        <goal>install-node-and-npm</goal>
                    </goals>
                    <configuration>
                        <nodeVersion>v6.10.0</nodeVersion>
                        <npmVersion>3.10.10</npmVersion>
                    </configuration>
                </execution>

                <!-- It will execute command "npm install" inside "/e2e-angular2" directory -->
                <execution>
                    <id>npm install</id>
                    <goals>
                        <goal>npm</goal>
                    </goals>
                    <configuration>
                        <arguments>install</arguments>
                    </configuration>
                </execution>
                <!-- It will execute command "npm build" inside "/e2e-angular2" directory 
                    to clean and create "/dist" directory -->
                <execution>
                    <id>npm build</id>
                    <goals>
                        <goal>npm</goal>
                    </goals>
                    <configuration>
                        <arguments>run build</arguments>
                    </configuration>
                </execution>
            </executions>
        </plugin>

        <!-- Plugin to copy the content of /angular/dist/ directory to output 
            directory (ie/ /target/transactionManager-1.0/) -->
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-resources-plugin</artifactId>
            <version>2.4.2</version>
            <executions>
                <execution>
                    <id>default-copy-resources</id>
                    <phase>process-resources</phase>
                    <goals>
                        <goal>copy-resources</goal>
                    </goals>
                    <configuration>
                        <overwrite>true</overwrite>
                        <!-- This folder is the folder where your angular files 
                        will be copied to. It must match the resulting war-file name.
                        So if you have customized the name of war-file for ex. as "app.war"
                        then below value should be ${project.build.directory}/app/ 
                        Value given below is as per default war-file name -->
                        <outputDirectory>${project.build.directory}/${project.artifactId}-${project.version}/</outputDirectory>
                        <resources>
                            <resource>
                                <directory>${project.basedir}/${angular.project.location}/dist</directory>
                            </resource>
                        </resources>
                    </configuration>
                </execution>
            </executions>
        </plugin>
Comment

PREVIOUS NEXT
Code Example
Javascript :: slack icon emoji for alertmanager 
Javascript :: angular injector.create example 
Javascript :: vue get component hash 
Javascript :: react router tutorial medium 
Javascript :: based on scroll position and get data attribute javascript 
Javascript :: youtube movie trailer angular 
Javascript :: useful javascript code snippet for console 
Javascript :: jhow to make a fish in javascript 
Javascript :: how display same paragraph in all pages of website in js 
Javascript :: pupetter create incognitor browser 
Javascript :: ajax comet 
Javascript :: open lightbox in backend 
Javascript :: how to check record successfully delete in mongodb node js 
Javascript :: devexpress winforms get readonly colour for current themes 
Javascript :: icon api node js to browser 
Javascript :: how to find the current date and time of a city in js 
Javascript :: manipulação de array javascript 
Javascript :: how to made disktop program on react website 
Javascript :: JavaScript Operator Precedence Values 
Javascript :: js number 123 to string one two three 
Javascript :: how to get the data from clicking on notification on web in reactjs 
Javascript :: on first time this.file.readAsDataURL not working ios 
Javascript :: swiperjs doesnot works inside modal 
Javascript :: javascript how to give variable names inside for loop corresponding to value of iterator javascript 
Javascript :: firebase update return result 
Javascript :: react native typescript nodejs timeout 
Javascript :: create an all day event by drag and drop 
Javascript :: how to get button text in javascript 
Javascript :: bootstrap tab with nvd3 graphs in it 
Javascript :: scrolling a page using node and puppeteer 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =