Class PomUpdater
java.lang.Object
fr.paris.lutece.plugins.releaser.util.pom.PomUpdater
The Class PomUpdater.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidsave(fr.paris.lutece.plugins.releaser.business.jaxb.maven.Model model, OutputStream outputStream) Save.static <T> Tunmarshal(Class<T> docClass, InputStream inputStream) Unmarshal.static voidupdatePomVersion(String strPomPath, String strNewVersion) Update only the project version of a pom file, without touching dependencies.static StringupdateSiteAfterTag(Site site, String strSiteLocalPomPath) Update site after tag.static StringupdateSiteBeforeTag(Site site, String strSiteLocalPomPath) Update site before tag.
-
Constructor Details
-
PomUpdater
public PomUpdater()
-
-
Method Details
-
updateSiteBeforeTag
public static String updateSiteBeforeTag(Site site, String strSiteLocalPomPath) throws javax.xml.bind.JAXBException Update site before tag.- Parameters:
site- the sitestrSiteLocalPomPath- the str site local pom path- Returns:
- the string
- Throws:
javax.xml.bind.JAXBException- the JAXB exception
-
updateSiteAfterTag
public static String updateSiteAfterTag(Site site, String strSiteLocalPomPath) throws javax.xml.bind.JAXBException Update site after tag.- Parameters:
site- the sitestrSiteLocalPomPath- the str site local pom path- Returns:
- the string
- Throws:
javax.xml.bind.JAXBException- the JAXB exception
-
updatePomVersion
public static void updatePomVersion(String strPomPath, String strNewVersion) throws javax.xml.bind.JAXBException Update only the project version of a pom file, without touching dependencies. Used by the "release from tag" workflow when modifying a checked-out pom on a single branch (master or develop) or in detached HEAD on the source tag.- Parameters:
strPomPath- the absolute path to the pom.xmlstrNewVersion- the new version to set- Throws:
javax.xml.bind.JAXBException- the JAXB exception
-
save
public static void save(fr.paris.lutece.plugins.releaser.business.jaxb.maven.Model model, OutputStream outputStream) throws javax.xml.bind.JAXBException Save.- Parameters:
model- the modeloutputStream- the output stream- Throws:
javax.xml.bind.JAXBException- the JAXB exception
-
unmarshal
public static <T> T unmarshal(Class<T> docClass, InputStream inputStream) throws javax.xml.bind.JAXBException Unmarshal.- Type Parameters:
T- the generic type- Parameters:
docClass- the doc classinputStream- the input stream- Returns:
- the t
- Throws:
javax.xml.bind.JAXBException- the JAXB exception
-